Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
5418a57043 | |||
0e8b25c42f | |||
8ac23f0c6d | |||
0ee0975574 |
184
pom.xml
184
pom.xml
@@ -1,93 +1,93 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.viper</groupId>
|
<groupId>com.viper</groupId>
|
||||||
<artifactId>PlaceholderSIGN</artifactId>
|
<artifactId>PlaceholderSIGN</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>3.0.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>PlaceholderSIGN</name>
|
<name>PlaceholderSIGN</name>
|
||||||
<description>Ein Bukkit-Plugin zur Verwaltung von Schildern mit PlaceholderAPI-Unterstützung.</description>
|
<description>Ein Bukkit-Plugin zur Verwaltung von Schildern mit PlaceholderAPI-Unterstützung.</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<!-- Spigot Repository -->
|
<!-- Spigot Repository -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>spigot-repo</id>
|
<id>spigot-repo</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<!-- PlaceholderAPI Repository -->
|
<!-- PlaceholderAPI Repository -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>placeholderapi</id>
|
<id>placeholderapi</id>
|
||||||
<url>https://repo.extendedclip.com/repository/maven-public/</url>
|
<url>https://repo.extendedclip.com/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Spigot API -->
|
<!-- Spigot API -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.21.1-R0.1-SNAPSHOT</version>
|
<version>1.21.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- PlaceholderAPI (soft dependency) -->
|
<!-- PlaceholderAPI (soft dependency) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.11.6</version>
|
<version>2.11.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.name}-${project.version}</finalName>
|
<finalName>${project.name}-${project.version}</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>plugin.yml</include>
|
<include>plugin.yml</include>
|
||||||
<include>config.yml</include>
|
<include>config.yml</include>
|
||||||
</includes>
|
</includes>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- Maven Compiler Plugin -->
|
<!-- Maven Compiler Plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.11.0</version>
|
<version>3.11.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>17</source>
|
<source>17</source>
|
||||||
<target>17</target>
|
<target>17</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Maven Shade Plugin -->
|
<!-- Maven Shade Plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.5.0</version>
|
<version>3.5.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>shade</goal>
|
<goal>shade</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
@@ -1,88 +1,88 @@
|
|||||||
package com.viper.PlaceholderSIGN;
|
package com.viper.PlaceholderSIGN;
|
||||||
|
|
||||||
import com.viper.PlaceholderSIGN.command.SignCommand;
|
import com.viper.PlaceholderSIGN.command.SignCommand;
|
||||||
import com.viper.PlaceholderSIGN.handler.SignListener;
|
import com.viper.PlaceholderSIGN.handler.SignListener;
|
||||||
import com.viper.PlaceholderSIGN.sign.SignManager;
|
import com.viper.PlaceholderSIGN.sign.SignManager;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
public class Main extends JavaPlugin {
|
public class Main extends JavaPlugin {
|
||||||
public static String noperm;
|
public static String noperm;
|
||||||
public static String click;
|
public static String click;
|
||||||
public static String abort;
|
public static String abort;
|
||||||
public static String numbers;
|
public static String numbers;
|
||||||
public static String usage;
|
public static String usage;
|
||||||
public static String update;
|
public static String update;
|
||||||
private static Main instance;
|
private static Main instance;
|
||||||
private static SignManager sm;
|
private static SignManager sm;
|
||||||
private boolean papi = false;
|
private boolean papi = false;
|
||||||
private boolean rgb = true;
|
private boolean rgb = true;
|
||||||
private int signMinimumDistance;
|
private int signMinimumDistance;
|
||||||
private int scrollSign;
|
private int scrollSign;
|
||||||
private int updateInterval;
|
private int updateInterval;
|
||||||
|
|
||||||
public static Main getInstance() {
|
public static Main getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SignManager getPSManager() {
|
public static SignManager getPSManager() {
|
||||||
return sm;
|
return sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return "3.0.0";
|
return "3.0.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasPAPI() {
|
public boolean hasPAPI() {
|
||||||
return this.papi;
|
return this.papi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasRGB() {
|
public boolean hasRGB() {
|
||||||
return this.rgb;
|
return this.rgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSignMinimumDistance() {
|
public int getSignMinimumDistance() {
|
||||||
return this.signMinimumDistance;
|
return this.signMinimumDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getScrollSign() {
|
public int getScrollSign() {
|
||||||
return this.scrollSign;
|
return this.scrollSign;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUpdateInterval() {
|
public int getUpdateInterval() {
|
||||||
return this.updateInterval;
|
return this.updateInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
instance = this;
|
instance = this;
|
||||||
getConfig().options().copyDefaults(true);
|
getConfig().options().copyDefaults(true);
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
|
|
||||||
if (!Objects.requireNonNull(getConfig().getString("version")).equals("3.0.0")) {
|
if (!Objects.requireNonNull(getConfig().getString("version")).equals("3.0.0")) {
|
||||||
(new FileUtil()).updateConfig("config.yml");
|
(new FileUtil()).updateConfig("config.yml");
|
||||||
}
|
}
|
||||||
|
|
||||||
noperm = getConfig().getString("no_permission");
|
noperm = getConfig().getString("no_permission");
|
||||||
usage = getConfig().getString("usage_correct");
|
usage = getConfig().getString("usage_correct");
|
||||||
numbers = getConfig().getString("invalid_number");
|
numbers = getConfig().getString("invalid_number");
|
||||||
abort = getConfig().getString("aborted_action");
|
abort = getConfig().getString("aborted_action");
|
||||||
click = getConfig().getString("click_to_edit");
|
click = getConfig().getString("click_to_edit");
|
||||||
update = getConfig().getString("update_message");
|
update = getConfig().getString("update_message");
|
||||||
|
|
||||||
this.papi = Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI");
|
this.papi = Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI");
|
||||||
this.signMinimumDistance = getConfig().getInt("sign-minimum-distance");
|
this.signMinimumDistance = getConfig().getInt("sign-minimum-distance");
|
||||||
this.scrollSign = getConfig().getInt("scroll-time");
|
this.scrollSign = getConfig().getInt("scroll-time");
|
||||||
this.updateInterval = getConfig().getInt("update-interval", 1);
|
this.updateInterval = getConfig().getInt("update-interval", 1);
|
||||||
|
|
||||||
sm = new SignManager();
|
sm = new SignManager();
|
||||||
new SignCommand();
|
new SignCommand();
|
||||||
new SignListener();
|
new SignListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
sm.saveAll();
|
sm.saveAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user