Skip to content

Commit 35b888f

Browse files
committed
skip if contains illegal
1 parent 6f49c59 commit 35b888f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void onPlayerArmorChange(PlayerArmorChangeEvent event) {
262262
if (newItem == null || MaterialUtil.AIR.get().contains(newItem.getType())) return;
263263

264264
ItemLegality legality = legalityOf(newItem);
265-
if (legality == ItemLegality.LEGAL) return;
265+
if (legality != ItemLegality.ILLEGAL) return; // We are looking for illegals not stored inside containers
266266

267267
// Revert item if configured to do so
268268
if (illegalHandling != IllegalHandling.PREVENT_USE_ONLY) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public void onPlayerArmorChange(PlayerArmorChangeEvent event) {
261261
if (newItem == null || MaterialUtil.AIR.get().contains(newItem.getType())) return;
262262

263263
ItemLegality legality = legalityOf(newItem);
264-
if (legality == ItemLegality.LEGAL) return;
264+
if (legality != ItemLegality.ILLEGAL) return; // We are looking for illegals not stored inside containers
265265

266266
// Revert item if configured to do so
267267
if (illegalHandling != IllegalHandling.PREVENT_USE_ONLY) {

0 commit comments

Comments
 (0)