mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 06:32:17 -07:00
Add another slot sanity check
This commit is contained in:
@@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
int j2;
|
int j2;
|
||||||
|
|
||||||
if (actionType == ClickType.SWAP) {
|
if (actionType == ClickType.SWAP) {
|
||||||
+ if (slotIndex < 0) return; // Paper
|
+ if (slotIndex < 0 || button < 0) return; // Paper
|
||||||
slot2 = (Slot) this.slots.get(slotIndex);
|
slot2 = (Slot) this.slots.get(slotIndex);
|
||||||
itemstack1 = playerinventory.getItem(button);
|
itemstack1 = playerinventory.getItem(button);
|
||||||
itemstack = slot2.getItem();
|
itemstack = slot2.getItem();
|
||||||
|
Reference in New Issue
Block a user