1.6
This commit is contained in:
parent
69fd07b183
commit
03d4e8f8ed
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>de.jatitv</groupId>
|
||||
<artifactId>PaPiTest</artifactId>
|
||||
<version>1.5</version>
|
||||
<version>1.6</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>PaPiTest</name>
|
||||
@ -78,7 +78,7 @@
|
||||
<dependency>
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2CodeLib</artifactId>
|
||||
<version>13.0</version>
|
||||
<version>13.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -7,7 +7,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public static String getRequiredT2CodeLibVersion() {
|
||||
return "13.0";
|
||||
return "13.4";
|
||||
}
|
||||
|
||||
public static String getPrefix() {
|
||||
@ -18,8 +18,12 @@ public class Util {
|
||||
return 90439;
|
||||
}
|
||||
|
||||
public static String getGit() {
|
||||
return "JaTiTV/PaPiTest";
|
||||
}
|
||||
|
||||
public static Integer getBstatsID() {
|
||||
return 10342;
|
||||
return 10767;
|
||||
}
|
||||
|
||||
public static String getSpigot() {
|
||||
|
@ -15,7 +15,9 @@ public class Config {
|
||||
|
||||
public static Integer ConfigVersion = 1;
|
||||
|
||||
public static Boolean UpdateCheckOnJoin = true;
|
||||
public static Boolean updateCheckOnJoin;
|
||||
public static Boolean updateCheckSeePreReleaseUpdates;
|
||||
public static Integer updateCheckTimeInterval;
|
||||
public static Boolean Titel = true;
|
||||
|
||||
public static void configCreate() {
|
||||
@ -27,12 +29,27 @@ public class Config {
|
||||
|
||||
yamlConfiguration.set("ConfigVersion", ConfigVersion);
|
||||
|
||||
if (yamlConfiguration.contains("Plugin.UpdateCheckOnJoin")) {
|
||||
UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheckOnJoin");
|
||||
if (yamlConfiguration.contains("Plugin.updateCheck.onJoin")) {
|
||||
updateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.updateCheck.onJoin");
|
||||
} else {
|
||||
yamlConfiguration.set("Plugin.UpdateCheckOnJoin", true);
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §4Setting §6UpdateCheckOnJoin §4was added to §9Config.yml§4!");
|
||||
yamlConfiguration.set("Plugin.updateCheck.onJoin", true);
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §4Setting §6updateCheck onJoin §4was added to §9Config.yml§4!");
|
||||
}
|
||||
|
||||
if (yamlConfiguration.contains("Plugin.updateCheck.seePreReleaseUpdates")) {
|
||||
updateCheckSeePreReleaseUpdates = yamlConfiguration.getBoolean("Plugin.updateCheck.seePreReleaseUpdates");
|
||||
} else {
|
||||
yamlConfiguration.set("Plugin.updateCheck.seePreReleaseUpdates", true);
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §4Setting §6updateCheck seePreReleaseUpdates §4was added to §9Config.yml§4!");
|
||||
}
|
||||
|
||||
if (yamlConfiguration.contains("Plugin.updateCheck.timeInterval")) {
|
||||
updateCheckTimeInterval = yamlConfiguration.getInt("Plugin.updateCheck.timeInterval");
|
||||
} else {
|
||||
yamlConfiguration.set("Plugin.updateCheck.timeInterval", 60);
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §4Setting §6updateCheck timeInterval §4was added to §9Config.yml§4!");
|
||||
}
|
||||
|
||||
if (!T2CmcVersion.isMc1_8()) {
|
||||
if (yamlConfiguration.contains("Titel.Enable")) {
|
||||
Titel = yamlConfiguration.getBoolean("Titel.Enable");
|
||||
|
@ -6,6 +6,7 @@ import de.jatitv.papitest.Util;
|
||||
import de.jatitv.papitest.commands.CmdExecuter;
|
||||
import de.jatitv.papitest.commands.TabComplete;
|
||||
import de.jatitv.papitest.config.Config;
|
||||
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
|
||||
import net.t2code.t2codelib.SPIGOT.api.plugins.T2CpluginCheck;
|
||||
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -34,8 +35,7 @@ public final class Main extends JavaPlugin {
|
||||
if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return;
|
||||
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §4Plugin load...");
|
||||
T2CupdateAPI.onUpdateCheck(plugin,Util.getPrefix(),Util.getSpigotID(),Util.getDiscord());
|
||||
Metrics.Bstats(Main.plugin, Util.getBstatsID());
|
||||
|
||||
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §8-------------------------------");
|
||||
Config.configCreate();
|
||||
@ -55,8 +55,9 @@ public final class Main extends JavaPlugin {
|
||||
getCommand("papitest").setTabCompleter(new TabComplete());
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), this);
|
||||
|
||||
int pluginId = 10767; // <-- Replace with the id of your plugin!
|
||||
Metrics metrics = new Metrics(this, pluginId);
|
||||
T2CupdateAPI.onUpdateCheck(plugin, Util.getPrefix(), Util.getGit(), Util.getSpigotID(), Util.getDiscord()
|
||||
, Config.updateCheckOnJoin, Config.updateCheckSeePreReleaseUpdates, Config.updateCheckTimeInterval);
|
||||
Metrics.Bstats(Main.plugin, Util.getBstatsID());
|
||||
|
||||
|
||||
}
|
||||
@ -64,6 +65,7 @@ public final class Main extends JavaPlugin {
|
||||
@Override
|
||||
public void onDisable() {
|
||||
// Plugin shutdown logic
|
||||
T2Ctemplate.onDisable(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
|
||||
}
|
||||
|
||||
public static Boolean pluginNotFound(String pl, Integer spigotID, String ver) {
|
||||
|
Loading…
Reference in New Issue
Block a user