Browse Source

Hack around nms bug

T00thpick1 12 years ago
parent
commit
f37a7d759a
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java

+ 7 - 3
src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java

@@ -79,11 +79,15 @@ public class Unarmed {
 
 
                 nextSlot++;
                 nextSlot++;
             }
             }
+        } else if (firstEmpty != -1) {
+            dropStack.setAmount(dropAmount);
+            inventory.setItem(firstEmpty, dropStack);
+            return true;
+        } else {
+            // This should never happen as event contract states that the amount on the stack is equal to the amount they can actually pick up
+            return true;
         }
         }
 
 
-        dropStack.setAmount(dropAmount); // Even when only partially finished we need to prevent dupes
-        drop.setItemStack(dropStack);
-
         return false;
         return false;
     }
     }
 }
 }