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