mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 06:38:56 +00:00
Split Catch Block again
This commit is contained in:
@@ -31,6 +31,9 @@ public class LegacyUtil {
|
|||||||
try {
|
try {
|
||||||
GET_MATERIAL = Material.class.getDeclaredMethod("getMaterial", int.class);
|
GET_MATERIAL = Material.class.getDeclaredMethod("getMaterial", int.class);
|
||||||
GET_BLOCK_TYPE_ID_AT = World.class.getDeclaredMethod("getBlockTypeIdAt", Location.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);
|
SET_DATA = Class.forName(Bukkit.getServer().getClass().getPackage().getName() + ".block.CraftBlock").getDeclaredMethod("setData", byte.class);
|
||||||
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException ignored) {
|
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException ignored) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user