Skip to content

Commit 211815f

Browse files
committed
do nothing if only prevent usage
1 parent 35b888f commit 211815f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/items/IllegalItemModule.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ public void onInventoryClick(InventoryClickEvent event) {
307307
}
308308
}
309309

310+
// We don't really care about item on cursor if we only want to prevent item usage
311+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
312+
310313
ItemLegality cursorLegality = legalityOf(event.getCursor());
311314

312315
if (cursorLegality != ItemLegality.LEGAL) {

AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/items/IllegalItemModule.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ public void onInventoryClick(InventoryClickEvent event) {
306306
}
307307
}
308308

309+
// We don't really care about item on cursor if we only want to prevent item usage
310+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
311+
309312
ItemLegality cursorLegality = legalityOf(event.getCursor());
310313

311314
if (cursorLegality != ItemLegality.LEGAL) {

0 commit comments

Comments
 (0)