3
0
Mirror von https://github.com/St3venAU/ArmorStandTools.git synchronisiert 2024-12-26 03:20:07 +01:00

v4.4.5 - Compatibility with 1.20.6

Dieser Commit ist enthalten in:
Steven 2024-05-21 02:27:51 +08:00
Ursprung ed0b0db409
Commit d401855aaf
4 geänderte Dateien mit 2 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -9,7 +9,7 @@ I wanted to create an armor stand for each kit in my mini-game, and I quickly be
Compatibility 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 v3.x.x - Spigot/CraftBukkit 1.13 - 1.16
- Armor Stand Tools v2.4.3 - Spigot/CraftBukkit 1.8 - 1.12 - Armor Stand Tools v2.4.3 - Spigot/CraftBukkit 1.8 - 1.12

Datei anzeigen

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.st3venau.plugins</groupId> <groupId>com.gmail.st3venau.plugins</groupId>
<artifactId>ArmorStandTools</artifactId> <artifactId>ArmorStandTools</artifactId>
<version>4.4.4</version> <version>4.4.5</version>
<name>ArmorStandTools</name> <name>ArmorStandTools</name>
<repositories> <repositories>

Datei anzeigen

@ -43,7 +43,6 @@ public class AST extends JavaPlugin {
static final HashMap<UUID, AbstractMap.SimpleEntry<UUID, Integer>> waitingForSkull = new HashMap<>(); // Player UUID, <ArmorStand UUID, Task ID> static final HashMap<UUID, AbstractMap.SimpleEntry<UUID, Integer>> waitingForSkull = new HashMap<>(); // Player UUID, <ArmorStand UUID, Task ID>
static AST plugin; static AST plugin;
static String nmsVersion;
static final Pattern MC_USERNAME_PATTERN = Pattern.compile("^[a-zA-Z0-9_]{1,16}$"); static final Pattern MC_USERNAME_PATTERN = Pattern.compile("^[a-zA-Z0-9_]{1,16}$");
@ -67,24 +66,6 @@ public class AST extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
plugin = this; 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().getPluginManager().registerEvents(new MainListener(), this);
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord"); getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
Commands cmds = new Commands(); Commands cmds = new Commands();

Datei anzeigen

@ -5,7 +5,6 @@ import org.bukkit.ChatColor;
import org.bukkit.GameRule; import org.bukkit.GameRule;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.ArmorStand; import org.bukkit.entity.ArmorStand;
@ -37,14 +36,12 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.EntityEquipment; import org.bukkit.inventory.EntityEquipment;
import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import java.util.regex.Pattern;
@SuppressWarnings("CommentedOutCode") @SuppressWarnings("CommentedOutCode")
public class MainListener implements Listener { public class MainListener implements Listener {