From 0255042f282f2a94b7fdc438a8246e68281ad01e Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 25 Apr 2016 17:50:26 +0200 Subject: [PATCH] Unknown inventory change protection --- src/com/massivecraft/massivecore/util/InventoryUtil.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/massivecore/util/InventoryUtil.java b/src/com/massivecraft/massivecore/util/InventoryUtil.java index a2dddfe7..f54f21ee 100644 --- a/src/com/massivecraft/massivecore/util/InventoryUtil.java +++ b/src/com/massivecraft/massivecore/util/InventoryUtil.java @@ -523,9 +523,8 @@ public class InventoryUtil { switch (action) { - // TODO - case UNKNOWN: - break; + // What is the best thing to do? + case UNKNOWN: return InventoryAlter.BOTH; // Possibly both case HOTBAR_SWAP: @@ -564,6 +563,9 @@ public class InventoryUtil } else { + // What is the best thing to do? + if (action == InventoryAction.UNKNOWN) return InventoryAlter.BOTH; + if (action == InventoryAction.MOVE_TO_OTHER_INVENTORY) return InventoryAlter.GIVE; // This one will possibly take, but we cannot be 100% sure.