From d401855aaf29a41e070495df6ae61a1ad9ef91b8 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 21 May 2024 02:27:51 +0800 Subject: [PATCH] v4.4.5 - Compatibility with 1.20.6 --- README.md | 2 +- pom.xml | 2 +- .../St3venAU/plugins/ArmorStandTools/AST.java | 19 ------------------- .../plugins/ArmorStandTools/MainListener.java | 3 --- 4 files changed, 2 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 08d6def..6c30ef9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ I wanted to create an armor stand for each kit in my mini-game, and I quickly be Compatibility ------------- -- Armor Stand Tools v4.x.x - Spigot/CraftBukkit 1.17, 1.18+ +- Armor Stand Tools v4.x.x - Spigot/CraftBukkit 1.17 and later - Armor Stand Tools v3.x.x - Spigot/CraftBukkit 1.13 - 1.16 - Armor Stand Tools v2.4.3 - Spigot/CraftBukkit 1.8 - 1.12 diff --git a/pom.xml b/pom.xml index a139568..adb6486 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.gmail.st3venau.plugins ArmorStandTools -4.4.4 +4.4.5 ArmorStandTools diff --git a/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/AST.java b/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/AST.java index 4c1bfca..45ec580 100644 --- a/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/AST.java +++ b/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/AST.java @@ -43,7 +43,6 @@ public class AST extends JavaPlugin { static final HashMap> waitingForSkull = new HashMap<>(); // Player UUID, static AST plugin; - static String nmsVersion; static final Pattern MC_USERNAME_PATTERN = Pattern.compile("^[a-zA-Z0-9_]{1,16}$"); @@ -67,24 +66,6 @@ public class AST extends JavaPlugin { @Override public void onEnable() { plugin = this; - nmsVersion = getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3]; - if( nmsVersion.startsWith("v1_4") || - nmsVersion.startsWith("v1_5") || - nmsVersion.startsWith("v1_6") || - nmsVersion.startsWith("v1_7") || - nmsVersion.startsWith("v1_8") || - nmsVersion.startsWith("v1_9") || - nmsVersion.startsWith("v1_10") || - nmsVersion.startsWith("v1_11") || - nmsVersion.startsWith("v1_12") || - nmsVersion.startsWith("v1_13") || - nmsVersion.startsWith("v1_14") || - nmsVersion.startsWith("v1_15") || - nmsVersion.startsWith("v1_16")) { - getLogger().warning("This Craftbukkit/Spigot version is not supported. Craftbukkit/Spigot 1.17+ required. Loading plugin failed."); - setEnabled(false); - return; - } getServer().getPluginManager().registerEvents(new MainListener(), this); getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord"); Commands cmds = new Commands(); diff --git a/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/MainListener.java b/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/MainListener.java index a858462..1e6614d 100644 --- a/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/MainListener.java +++ b/src/main/java/com/gmail/St3venAU/plugins/ArmorStandTools/MainListener.java @@ -5,7 +5,6 @@ import org.bukkit.ChatColor; import org.bukkit.GameRule; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.OfflinePlayer; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.ArmorStand; @@ -37,14 +36,12 @@ import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.EntityEquipment; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.scheduler.BukkitRunnable; import java.util.Arrays; import java.util.List; import java.util.UUID; -import java.util.regex.Pattern; @SuppressWarnings("CommentedOutCode") public class MainListener implements Listener {