Skip to content

Commit 76c2fa0

Browse files
committed
rename to long name
1 parent 63914f6 commit 76c2fa0

29 files changed

+59
-59
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public BannedItemNames() {
5656
})
5757
.filter(Objects::nonNull)
5858
.collect(Collectors.toCollection(() -> EnumSet.noneOf(Material.class)));
59-
if (handling == IllegalHandling.STRICT) {
59+
if (illegalHandling == IllegalHandling.STRICT) {
6060
// Add listener for preview in anvil (for example)
6161
optionalListeners.add(new Listener() {
6262
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@@ -101,7 +101,7 @@ private void onPrepareResult(PrepareResultEvent event) {
101101

102102
@Override
103103
public void handleItem(ItemStack itemStack, ItemLegality legality) {
104-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
104+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
105105

106106
if (legality == ItemLegality.ILLEGAL) {
107107
if (delete) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public BannedMaterials() {
7979

8080
@Override
8181
public void handleItem(ItemStack itemStack, ItemLegality legality) {
82-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return;
82+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
8383

8484
if (legality != ItemLegality.LEGAL) {
8585
itemStack.setAmount(0);

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
public abstract class IllegalItemModule extends AEFModule implements Listener {
5656

5757
protected final AEFPermission bypassPermission;
58-
protected final IllegalHandling handling;
58+
protected final IllegalHandling illegalHandling;
5959
protected final boolean guiPluginsSupported;
6060

6161
protected final Set<Listener> optionalListeners;
@@ -82,11 +82,11 @@ public IllegalItemModule(String configPath, boolean defEnabled, AEFPermission by
8282
handling = IllegalHandling.PREVENT_USE_ONLY;
8383
warn("Handling option '" + configuredHandling + "' not recognized. Defaulting to " + handling.name());
8484
}
85-
this.handling = handling;
85+
this.illegalHandling = handling;
8686

8787
this.guiPluginsSupported = config.getBoolean(configPath + ".gui-plugins-supported", false, """
8888
Enable this if you have problems with the plugin removing items from chest guis.""");
89-
if (this.handling == IllegalHandling.STRICT) {
89+
if (this.illegalHandling == IllegalHandling.STRICT) {
9090
optionalListeners.add(new Listener() {
9191
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
9292
private void onInventoryOpen(InventoryOpenEvent event) {
@@ -206,7 +206,7 @@ public ItemLegality legalityOf(@Nullable Iterable<ItemStack> itemStacks) {
206206

207207
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
208208
public void onPlayerItemConsume(PlayerItemConsumeEvent event) {
209-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
209+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
210210

211211
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getPlayer().getUniqueId())) {
212212
event.setCancelled(true);
@@ -223,7 +223,7 @@ public void onPlayerItemConsume(PlayerItemConsumeEvent event) {
223223

224224
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
225225
public void onBlockDispense(BlockDispenseEvent event) {
226-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
226+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
227227

228228
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getBlock().getLocation())) {
229229
event.setCancelled(true);
@@ -238,7 +238,7 @@ public void onBlockDispense(BlockDispenseEvent event) {
238238

239239
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
240240
public void onPlayerArmorChange(PlayerArmorChangeEvent event) {
241-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // Cant cancel this event
241+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // Cant cancel this event
242242

243243
if (!AnarchyExploitFixes.permissions().permissionValue(event.getPlayer(), bypassPermission.node()).toBoolean()) {
244244
handleItem(event.getNewItem(), legalityOf(event.getNewItem()));
@@ -250,7 +250,7 @@ public void onPlayerArmorChange(PlayerArmorChangeEvent event) {
250250
public void onInventoryClick(InventoryClickEvent event) {
251251
if (guiPluginsSupported && event.getInventory().getLocation() == null) return;
252252

253-
if (handling == IllegalHandling.PREVENT_USE_ONLY) {
253+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) {
254254
if ( event.isCancelled()
255255
|| event.getClick() == ClickType.DROP
256256
|| event.getClick() == ClickType.CONTROL_DROP
@@ -286,7 +286,7 @@ public void onInventoryClick(InventoryClickEvent event) {
286286

287287
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
288288
public void onInventoryDrag(InventoryDragEvent event) {
289-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return;
289+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
290290
if (guiPluginsSupported && event.getInventory().getLocation() == null) return;
291291

292292
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getWhoClicked().getUniqueId())) {
@@ -308,7 +308,7 @@ public void onInventoryDrag(InventoryDragEvent event) {
308308

309309
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
310310
public void onPrePlayerAttackEntity(PrePlayerAttackEntityEvent event) {
311-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
311+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
312312

313313
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getPlayer().getUniqueId())) {
314314
event.setCancelled(true);
@@ -336,7 +336,7 @@ public void onPrePlayerAttackEntity(PrePlayerAttackEntityEvent event) {
336336

337337
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
338338
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
339-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
339+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
340340

341341
if (event.getDamager().getType() == EntityType.PLAYER) {
342342
final Player player = (Player) event.getDamager();
@@ -369,7 +369,7 @@ public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
369369
if (EntityUtil.isLivingEntity(event.getDamager())) {
370370
if (legalityOf(((LivingEntity) event.getDamager()).getActiveItem()) != ItemLegality.LEGAL) {
371371
event.setCancelled(true);
372-
if (handling != IllegalHandling.PREVENT_USE_ONLY)
372+
if (illegalHandling != IllegalHandling.PREVENT_USE_ONLY)
373373
event.getDamager().getScheduler().execute(plugin, event.getDamager()::remove, null, 1L);
374374
return;
375375
}
@@ -378,15 +378,15 @@ public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
378378
if (EntityUtil.isInventoryHolder(event.getDamager())) {
379379
if (legalityOf(((InventoryHolder) event.getDamager()).getInventory()) != ItemLegality.LEGAL) {
380380
event.setCancelled(true);
381-
if (handling != IllegalHandling.PREVENT_USE_ONLY)
381+
if (illegalHandling != IllegalHandling.PREVENT_USE_ONLY)
382382
event.getDamager().getScheduler().execute(plugin, event.getDamager()::remove, null, 1L);
383383
}
384384
}
385385
}
386386

387387
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
388388
public void onPlayerAttemptPickupItem(PlayerAttemptPickupItemEvent event) {
389-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
389+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
390390

391391
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getPlayer().getUniqueId())) {
392392
event.setCancelled(true);
@@ -407,7 +407,7 @@ public void onPlayerAttemptPickupItem(PlayerAttemptPickupItemEvent event) {
407407

408408
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
409409
public void onPlayerDropItem(PlayerDropItemEvent event) {
410-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
410+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
411411

412412
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getPlayer().getUniqueId())) {
413413
event.setCancelled(true);
@@ -427,7 +427,7 @@ public void onPlayerDropItem(PlayerDropItemEvent event) {
427427

428428
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
429429
public void onPlayerInteract(PlayerInteractEvent event) {
430-
if (event.useItemInHand() == Event.Result.DENY && handling == IllegalHandling.PREVENT_USE_ONLY) return;
430+
if (event.useItemInHand() == Event.Result.DENY && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
431431

432432
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getPlayer().getUniqueId())) {
433433
event.setCancelled(true);
@@ -447,7 +447,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {
447447

448448
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
449449
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
450-
if (event.isCancelled() && handling == IllegalHandling.PREVENT_USE_ONLY) return;
450+
if (event.isCancelled() && illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
451451

452452
if (listenerCooldowns.get(event.getClass(), createIfAbsent).contains(event.getPlayer().getUniqueId())) {
453453
event.setCancelled(true);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public IllegalPotions() {
4242

4343
@Override
4444
public void handleItem(ItemStack itemStack, ItemLegality legality) {
45-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
45+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
4646

4747
switch (legality) {
4848
case CONTAINS_ILLEGAL -> itemStack.setAmount(0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public InvalidStackSize() {
6565

6666
@Override
6767
public void handleItem(ItemStack itemStack, ItemLegality legality) {
68-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
68+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
6969

7070
switch (legality) {
7171
case ILLEGAL -> {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public ItemAttributes() {
6868

6969
@Override
7070
public void handleItem(ItemStack itemStack, ItemLegality legality) {
71-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
71+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
7272

7373
switch (legality) {
7474
case CONTAINS_ILLEGAL -> itemStack.setAmount(0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public PlayerHeads() {
4040

4141
@Override
4242
public void handleItem(ItemStack itemStack, ItemLegality legality) {
43-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
43+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
4444

4545
if (legality != ItemLegality.LEGAL) {
4646
itemStack.setAmount(0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public SpawnEggs() {
6363

6464
@Override
6565
public void handleItem(ItemStack itemStack, ItemLegality legality) {
66-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
66+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
6767

6868
if (legality != ItemLegality.LEGAL) {
6969
itemStack.setAmount(0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public Unbreakables() {
8585

8686
@Override
8787
public void handleItem(ItemStack itemStack, ItemLegality legality) {
88-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return;
88+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return;
8989

9090
switch (legality) {
9191
case CONTAINS_ILLEGAL -> itemStack.setAmount(0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public HigherEnchants() {
9191
@Override
9292
public void handleItem(ItemStack itemStack, ItemLegality legality) {
9393
if (legality == ItemLegality.LEGAL) return;
94-
if (handling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
94+
if (illegalHandling == IllegalHandling.PREVENT_USE_ONLY) return; // We are cancelling the action in the super class
9595

9696
if (legality == ItemLegality.CONTAINS_ILLEGAL) {
9797
itemStack.setAmount(0);

0 commit comments

Comments
 (0)