Actually add 1.14 and 1.16.2 support

This commit is contained in:
SeanOMik 2020-09-03 15:50:30 -05:00
parent e518e26d17
commit 0c24e0bd31
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 2 additions and 2 deletions

View File

@ -131,9 +131,9 @@ public class Utils {
public static boolean isBlockASystem(Block block) {
NBTTileEntity blockNBT = new NBTTileEntity(block.getState());
String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
if (version.equals("v1_15_R1")) {
if (version.substring(0, 5).equals("v1_15") || version.substring(0, 5).equals("v1_14")) {
return blockNBT.getCompound("Owner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture());
} else if (version.equals("v1_16_R1")) {
} else if (version.substring(0, 5).equals("v1_16")) {
return blockNBT.getCompound("SkullOwner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture());
}