From fb8f76f833dbac5443567e30ebdae768b73d4e8b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 9 Feb 2018 15:58:48 +1100 Subject: [PATCH] Debug bad persistent brush values --- .../com/boydti/fawe/bukkit/block/BrushBoundBaseBlock.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/block/BrushBoundBaseBlock.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/block/BrushBoundBaseBlock.java index f7988e18..3e2f0421 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/block/BrushBoundBaseBlock.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/block/BrushBoundBaseBlock.java @@ -59,7 +59,11 @@ public class BrushBoundBaseBlock extends BaseBlock implements BrushHolder { this.tool.setHolder(this); brushCache.put(getKey(item), tool); } catch (Throwable ignore) { - ignore.printStackTrace(); + Fawe.debug("Invalid brush for " + player + " holding " + item + ": " + json.getValue()); + if (item != null) { + item = Fawe.imp().getItemUtil().setNBT(item, null); + brushCache.remove(getKey(item)); + } } } }