From 15ebefed538d5997e43261a33ca43989913dfabd Mon Sep 17 00:00:00 2001 From: Brianna Date: Mon, 27 May 2019 00:40:57 -0400 Subject: [PATCH] Fixed reflection issue and typo. --- .gitlab-ci.yml | 2 +- src/main/java/com/songoda/epichoppers/gui/GUIOverview.java | 2 +- src/main/java/com/songoda/epichoppers/tasks/HopTask.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4509caf..efc5e68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "EpicHoppers" path: "/builds/$CI_PROJECT_PATH" - version: "4-pre-release-1" + version: "4-pre-release-2" build: stage: build diff --git a/src/main/java/com/songoda/epichoppers/gui/GUIOverview.java b/src/main/java/com/songoda/epichoppers/gui/GUIOverview.java index 5cec27b..e3b1ad8 100644 --- a/src/main/java/com/songoda/epichoppers/gui/GUIOverview.java +++ b/src/main/java/com/songoda/epichoppers/gui/GUIOverview.java @@ -64,7 +64,7 @@ public class GUIOverview extends AbstractGUI { perlmeta.setLore(loreperl); perl.setItemMeta(perlmeta); - ItemStack filter = new ItemStack(plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.COMPARATOR : Material.valueOf("REDSTONE_COMPARATR"), 1); + ItemStack filter = new ItemStack(plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.COMPARATOR : Material.valueOf("REDSTONE_COMPARATOR"), 1); ItemMeta filtermeta = filter.getItemMeta(); filtermeta.setDisplayName(plugin.getLocale().getMessage("interface.hopper.filtertitle")); ArrayList lorefilter = new ArrayList<>(); diff --git a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java index 244ee74..c68e90e 100644 --- a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java +++ b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java @@ -324,7 +324,8 @@ public class HopTask extends BukkitRunnable { getHandle = clazzCraftWorld.getMethod("getHandle"); updateAdjacentComparators = clazzWorld.getMethod("updateAdjacentComparators", clazzBlockPosition, clazzBlock); - getNMSBlock = clazzCraftBlock.getMethod("getNMSBlock"); + getNMSBlock = clazzCraftBlock.getDeclaredMethod("getNMSBlock"); + getNMSBlock.setAccessible(true); } // invoke and cast objects.