From 6e841543b8a1ec771461e811c842f4860911ada6 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 9 Nov 2017 10:57:17 +1100 Subject: [PATCH] Closes #1731 --- .../bukkit/listeners/PlayerEvents_1_8.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java index c7cca4887..3da41932e 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java @@ -68,15 +68,33 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener { } } if (!"[(+NBT)]".equals(newLore) || (current.equals(newItem) && newLore.equals(oldLore))) { - return; + switch (newItem.getType()) { + case BANNER: + case SKULL_ITEM: + if (newMeta != null) break; + default: + return; + } } + HashSet blocks = null; Block block = player.getTargetBlock(blocks, 7); BlockState state = block.getState(); if (state == null) { return; } - if (state.getType() != newItem.getType()) { + Material stateType = state.getType(); + Material itemType = newItem.getType(); + if (stateType != itemType) { + switch (stateType) { + case STANDING_BANNER: + case WALL_BANNER: + if (itemType == Material.BANNER) break; + case SKULL: + if (itemType == Material.SKULL_ITEM) break; + default: + return; + } return; } Location l = BukkitUtil.getLocation(state.getLocation());