mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-04 14:31:45 +01:00
Fixed thread crash when clicking in a non interactive inventory slot (-1)
This commit is contained in:
parent
e1a886aa3a
commit
bf10f0d3f7
@ -301,8 +301,8 @@ public class PlayerInventory implements InventoryModifier, InventoryClickHandler
|
||||
|
||||
// Refresh slot
|
||||
update();
|
||||
//problem with ghost item when clicking on a slot which has a different internal id
|
||||
//refreshSlot(slot);
|
||||
// FIXME: replace update() to refreshSlot, currently not possible because our inventory click handling is not exactly the same as what the client expects
|
||||
//refreshSlot((short) slot);
|
||||
}
|
||||
|
||||
protected void setItemStackInternal(int slot, ItemStack itemStack) {
|
||||
|
@ -32,6 +32,11 @@ public class WindowListener {
|
||||
|
||||
boolean successful = false;
|
||||
|
||||
// prevent click in a non interactive slot (why does it exist?)
|
||||
if (slot == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case 0:
|
||||
switch (button) {
|
||||
|
Loading…
Reference in New Issue
Block a user