From 5b0945732d9fabcfc977d8bc048185ae550aa53e Mon Sep 17 00:00:00 2001 From: Sn0wStorm Date: Thu, 1 Nov 2018 00:06:07 +0100 Subject: [PATCH] Split Catch Block again --- src/com/dre/brewery/LegacyUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/dre/brewery/LegacyUtil.java b/src/com/dre/brewery/LegacyUtil.java index 8334a9d..e51f87a 100644 --- a/src/com/dre/brewery/LegacyUtil.java +++ b/src/com/dre/brewery/LegacyUtil.java @@ -31,6 +31,9 @@ public class LegacyUtil { try { GET_MATERIAL = Material.class.getDeclaredMethod("getMaterial", int.class); GET_BLOCK_TYPE_ID_AT = World.class.getDeclaredMethod("getBlockTypeIdAt", Location.class); + } catch (NoSuchMethodException | SecurityException ignored) { + } + try { SET_DATA = Class.forName(Bukkit.getServer().getClass().getPackage().getName() + ".block.CraftBlock").getDeclaredMethod("setData", byte.class); } catch (ClassNotFoundException | NoSuchMethodException | SecurityException ignored) { }