From e4dfbbcd2d60a1ff12e093e4e16f47e768c4a853 Mon Sep 17 00:00:00 2001 From: InstantlyMoist Date: Wed, 11 Mar 2020 16:43:58 +0100 Subject: [PATCH] fixed bug regarding older versions not loading correctly --- src/main/java/me/kyllian/xRay/XRayPlugin.java | 3 ++- src/main/resources/plugin.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/kyllian/xRay/XRayPlugin.java b/src/main/java/me/kyllian/xRay/XRayPlugin.java index 9de05d1..91de5e9 100644 --- a/src/main/java/me/kyllian/xRay/XRayPlugin.java +++ b/src/main/java/me/kyllian/xRay/XRayPlugin.java @@ -65,7 +65,8 @@ public void initializeConfig() { Map tempData = new HashMap<>(); for (String block : getConfig().getStringList("Settings.xRayBlocks")) { - tempData.put(block, WrappedBlockData.createData(Material.valueOf(block))); + if (Bukkit.getVersion().contains("1.8") || Bukkit.getVersion().contains("1.7")) tempData.put(block, WrappedBlockData.createData(Material.valueOf(block), 1)); + else tempData.put(block, WrappedBlockData.createData(Material.valueOf(block))); } data = Collections.unmodifiableMap(tempData); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 604b046..4de23d6 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: xRay -version: 3.1 +version: 3.11 main: me.kyllian.xRay.XRayPlugin description: A legit xRay depend: [ProtocolLib]