diff --git a/.idea/artifacts/T2CodeLib_10_0.xml b/.idea/artifacts/T2CodeLib_10_1.xml similarity index 63% rename from .idea/artifacts/T2CodeLib_10_0.xml rename to .idea/artifacts/T2CodeLib_10_1.xml index eebabbb..7db3d92 100644 --- a/.idea/artifacts/T2CodeLib_10_0.xml +++ b/.idea/artifacts/T2CodeLib_10_1.xml @@ -1,7 +1,7 @@ - + $PROJECT_DIR$/../../Plugins/T2CodeLib/.jar - + diff --git a/pom.xml b/pom.xml index 97a1bb2..91ad358 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.t2code T2CodeLib - 10.0 + 10.1 jar T2CodeLib diff --git a/src/main/java/net/t2code/lib/Spigot/Lib/register/Register.java b/src/main/java/net/t2code/lib/Spigot/Lib/register/Register.java index a01af2f..81c30cf 100644 --- a/src/main/java/net/t2code/lib/Spigot/Lib/register/Register.java +++ b/src/main/java/net/t2code/lib/Spigot/Lib/register/Register.java @@ -5,9 +5,6 @@ import org.bukkit.permissions.Permission; import org.bukkit.event.Listener; import org.bukkit.permissions.PermissionDefault; import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.java.JavaPlugin; - -import java.util.Collections; public class Register { public static void listener(Listener listener, Plugin plugin) { @@ -35,4 +32,8 @@ public class Register { plugin.getServer().getPluginManager().getPermission(permission).setDefault(setDefault); plugin.getServer().getPluginManager().getPermission(permission).getChildren().put(children, setBoolean); } + public static void permissionDescription(String permission, String description, Plugin plugin) { + plugin.getServer().getPluginManager().getPermission(permission).setDescription(description); + + } } diff --git a/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java b/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java index 983e409..d2313dc 100644 --- a/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java +++ b/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java @@ -55,7 +55,19 @@ public class UpdateAPI { public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String pluginVersion, String publicVersion) { send.console("§4=========== " + Prefix + " §4==========="); - send.console("§6A new version was found!"); + if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")){ + if (publicVersion.toLowerCase().contains("dev")){ + send.console("§6A new §4DEV§6 version was found!"); + } + if (publicVersion.toLowerCase().contains("beta")){ + send.console("§6A new §2BETA§6 version was found!"); + } + if (publicVersion.toLowerCase().contains("snapshot")){ + send.console("§6A new §eSNAPSHOT§6 version was found!"); + } + } else { + send.console("§6A new version was found!"); + } send.console("§6Your version: §c" + pluginVersion + " §7- §6Current version: §a" + publicVersion); send.console("§6You can download it here: §e" + Spigot); send.console("§6You can find more information on Discord: §e" + Discord); @@ -67,9 +79,27 @@ public class UpdateAPI { return; } send.player(player, Prefix); - TextComponent comp = new TextBuilder(Prefix + " §6A new version was found!") - .addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); - player.spigot().sendMessage(comp); + if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")){ + if (publicVersion.toLowerCase().contains("dev")){ + TextComponent comp = new TextBuilder(Prefix + " §6A new §4DEV§6 version was found!") + .addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); + player.spigot().sendMessage(comp); + } + if (publicVersion.toLowerCase().contains("beta")){ + TextComponent comp = new TextBuilder(Prefix + " §6A new §2BETA§6 version was found!") + .addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); + player.spigot().sendMessage(comp); + } + if (publicVersion.toLowerCase().contains("snapshot")){ + TextComponent comp = new TextBuilder(Prefix + " §6A new §eSNAPSHOT§6 version was found!") + .addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); + player.spigot().sendMessage(comp); + } + } else { + TextComponent comp = new TextBuilder(Prefix + " §6A new version was found!") + .addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); + player.spigot().sendMessage(comp); + } TextComponent comp1 = new TextBuilder(Prefix + " §c" + pluginVersion + " §7-> §a" + publicVersion) .addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); player.spigot().sendMessage(comp1); diff --git a/target/classes/bungee.yml b/target/classes/bungee.yml index 6fb495f..452343e 100644 --- a/target/classes/bungee.yml +++ b/target/classes/bungee.yml @@ -1,5 +1,5 @@ name: T2CodeLib -version: 10.0 +version: 10.1 main: net.t2code.lib.Bungee.BMain author: JaTiTV, Jkobs description: Libarie from T2Code Plugins \ No newline at end of file diff --git a/target/classes/net/t2code/lib/Bungee/Lib/yamlConfiguration/BConfig.class b/target/classes/net/t2code/lib/Bungee/Lib/yamlConfiguration/BConfig.class index bbe2514..7e4eb60 100644 Binary files a/target/classes/net/t2code/lib/Bungee/Lib/yamlConfiguration/BConfig.class and b/target/classes/net/t2code/lib/Bungee/Lib/yamlConfiguration/BConfig.class differ diff --git a/target/classes/net/t2code/lib/Spigot/Lib/register/Register.class b/target/classes/net/t2code/lib/Spigot/Lib/register/Register.class index a60ec24..aaa067a 100644 Binary files a/target/classes/net/t2code/lib/Spigot/Lib/register/Register.class and b/target/classes/net/t2code/lib/Spigot/Lib/register/Register.class differ diff --git a/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3$1.class b/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3$1.class index d429c19..a692bb9 100644 Binary files a/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3$1.class and b/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3$1.class differ diff --git a/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3.class b/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3.class index 5d68ed7..379c1f7 100644 Binary files a/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3.class and b/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI$3.class differ diff --git a/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI.class b/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI.class index da2a328..bc4cf6e 100644 Binary files a/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI.class and b/target/classes/net/t2code/lib/Spigot/Lib/update/UpdateAPI.class differ diff --git a/target/classes/plugin.yml b/target/classes/plugin.yml index 1e0bc41..23d5655 100644 --- a/target/classes/plugin.yml +++ b/target/classes/plugin.yml @@ -1,5 +1,5 @@ name: T2CodeLib -version: 10.0 +version: 10.1 main: net.t2code.lib.Spigot.system.Main api-version: 1.13 prefix: T2CodeLib