Fix PreClickEvent canceling being ignored when the inventory condition doesn't cancel

This commit is contained in:
themode 2020-12-15 06:04:58 +01:00
parent 9b9dab56eb
commit 5c9fd9294a

View File

@ -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);
}
}