From ccc7b0ec658f10c24d11da2e9d4d32d653a8f15a Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 20 Dec 2019 06:03:23 +0000 Subject: [PATCH] Fix #2634 no such method error --- .../bukkit/listeners/PlayerEvents.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java index 3a1e9e8de..69752719f 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1943,13 +1943,21 @@ import java.util.regex.Pattern; Material type = event.getMaterial(); // in the following, lb needs to have the material of the item in hand i.e. type - if (type == Material.REDSTONE || type == Material.STRING - || type == Material.PUMPKIN_SEEDS || type == Material.MELON_SEEDS - || type == Material.COCOA_BEANS || type == Material.WHEAT_SEEDS - || type == Material.BEETROOT_SEEDS || type == Material.SWEET_BERRIES || type - .isBlock()) { - //eventType = PlayerBlockEventType.PLACE_BLOCK; - return; + switch (type) { + case REDSTONE: + case STRING: + case PUMPKIN_SEEDS: + case MELON_SEEDS: + case COCOA_BEANS: + case WHEAT_SEEDS: + case BEETROOT_SEEDS: + case SWEET_BERRIES: + return; + default: + //eventType = PlayerBlockEventType.PLACE_BLOCK; + if (type.isBlock()) { + return; + } } if (PaperLib.isPaper()) { if (MaterialTags.SPAWN_EGGS.isTagged(type) || Material.EGG.equals(type)) {