From aab53b890967c6debbe0947380bf0c9ee25c7964 Mon Sep 17 00:00:00 2001 From: "B. Kelly" Date: Fri, 17 Jul 2020 14:40:16 -0400 Subject: [PATCH] MC 1.16.1 compatibility - Update Spigot and NBTAPI so that the plugin functions at all - Update AnvilGUI so the search and permissions UIs work - ask for SkullOwner instead of Owner, since the latter is no longer present --- pom.xml | 8 ++++---- .../energeticstorage/listeners/BlockBreakListener.java | 2 +- .../energeticstorage/listeners/BlockPlaceListener.java | 2 +- .../listeners/PlayerInteractListener.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 38a6e34..941b40c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.seanomik energeticstorage - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT jar EnergeticStorage @@ -101,19 +101,19 @@ org.spigotmc spigot - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT provided de.tr7zw item-nbt-api - 2.3.0 + 2.4.1 compile com.github.WesJD.AnvilGUI anvilgui - 7a87a9dd65 + ef71db62ecd6e14405eb7891d7d1c58341b9e61e diff --git a/src/main/java/net/seanomik/energeticstorage/listeners/BlockBreakListener.java b/src/main/java/net/seanomik/energeticstorage/listeners/BlockBreakListener.java index 914c68a..434a477 100644 --- a/src/main/java/net/seanomik/energeticstorage/listeners/BlockBreakListener.java +++ b/src/main/java/net/seanomik/energeticstorage/listeners/BlockBreakListener.java @@ -29,7 +29,7 @@ public class BlockBreakListener implements Listener { Player player = event.getPlayer(); NBTTileEntity blockNBT = new NBTTileEntity(block.getState()); - if (blockNBT.getCompound("Owner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture())) { + if (blockNBT.getCompound("SkullOwner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture())) { ESSystem esSystem = Utils.findSystemAtLocation(block.getLocation()); if (esSystem != null) { diff --git a/src/main/java/net/seanomik/energeticstorage/listeners/BlockPlaceListener.java b/src/main/java/net/seanomik/energeticstorage/listeners/BlockPlaceListener.java index 6fd7ad2..3c17dcb 100644 --- a/src/main/java/net/seanomik/energeticstorage/listeners/BlockPlaceListener.java +++ b/src/main/java/net/seanomik/energeticstorage/listeners/BlockPlaceListener.java @@ -29,7 +29,7 @@ public class BlockPlaceListener implements Listener { NBTTileEntity blockNBT = new NBTTileEntity(block.getState()); - if (blockNBT.getCompound("Owner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture())) { + if (blockNBT.getCompound("SkullOwner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture())) { if (PermissionChecks.canCreateSystem(player)) { ESSystem newSystem = new ESSystem(player.getUniqueId(), UUID.randomUUID(), block.getLocation()); PlayersFile.savePlayerSystem(newSystem); diff --git a/src/main/java/net/seanomik/energeticstorage/listeners/PlayerInteractListener.java b/src/main/java/net/seanomik/energeticstorage/listeners/PlayerInteractListener.java index e91aeae..bc7f7d6 100644 --- a/src/main/java/net/seanomik/energeticstorage/listeners/PlayerInteractListener.java +++ b/src/main/java/net/seanomik/energeticstorage/listeners/PlayerInteractListener.java @@ -26,7 +26,7 @@ public class PlayerInteractListener implements Listener { NBTTileEntity blockNBT = new NBTTileEntity(block.getState()); - if (blockNBT.getCompound("Owner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture())) { + if (blockNBT.getCompound("SkullOwner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture())) { event.setCancelled(true); ESSystem esSystem = Utils.findSystemAtLocation(block.getLocation());