mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 19:18:12 +01:00
Fix PreClickEvent canceling being ignored when the inventory condition doesn't cancel
This commit is contained in:
parent
9b9dab56eb
commit
5c9fd9294a
@ -521,9 +521,9 @@ public class InventoryClickProcessor {
|
||||
cursor = inventoryPreClickEvent.getCursorItem();
|
||||
clicked = inventoryPreClickEvent.getClickedItem();
|
||||
|
||||
clickResult.setCancel(inventoryPreClickEvent.isCancelled());
|
||||
if (inventoryPreClickEvent.isCancelled()) {
|
||||
clickResult.setRefresh(true);
|
||||
clickResult.setCancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -542,9 +542,9 @@ public class InventoryClickProcessor {
|
||||
clickResult.setCursor(cursor);
|
||||
clickResult.setClicked(clicked);
|
||||
|
||||
clickResult.setCancel(result.isCancel());
|
||||
if (result.isCancel()) {
|
||||
clickResult.setRefresh(true);
|
||||
clickResult.setCancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user