diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java index 8df8ed028..16ffd2913 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java @@ -131,7 +131,7 @@ public BlockLimit() { for (String configuredMaterial : section.getKeys(false)) { try { Material blockMaterial = Material.valueOf(configuredMaterial); - Integer maxAmountPerChunk = Integer.valueOf(section.getString(configuredMaterial)); + Integer maxAmountPerChunk = Integer.parseInt(section.getString(configuredMaterial)); this.blockLimits.put(blockMaterial, maxAmountPerChunk); } catch (NumberFormatException e) { notRecognized(Integer.class, configuredMaterial); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java index e2e4fa6a5..a1778ca5c 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java @@ -135,7 +135,7 @@ public CustomEntityLimit() { Make sure your minecraft version is matching as well."""); for (String configuredEntity : section.getKeys(false)) { try { - Integer maxAmountPerChunk = Integer.valueOf(section.getString(configuredEntity)); + Integer maxAmountPerChunk = Integer.parseInt(section.getString(configuredEntity)); EntityType limitedEntity = EntityType.valueOf(configuredEntity); entityLimits.put(limitedEntity, maxAmountPerChunk); } catch (NumberFormatException e) { diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java index 6aa628b6f..3ed74dd8d 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java @@ -60,7 +60,7 @@ public CustomAgeLimits() { for (String configuredEntity : section.getKeys(false)) { try { EntityType limitedEntity = EntityType.valueOf(configuredEntity); - Integer maxAmountPerChunk = Integer.valueOf(section.getString(configuredEntity)); + Integer maxAmountPerChunk = Integer.parseInt(section.getString(configuredEntity)); entityLimits.put(limitedEntity, maxAmountPerChunk); } catch (NumberFormatException e) { notRecognized(Integer.class, configuredEntity); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java index 829a60f84..a0811b950 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java @@ -37,7 +37,7 @@ public WitherSpawningAtSpawn() { ConfigSection section = config.getConfigSection(configPath + ".worlds", defaults); for (String world : section.getKeys(false)) { try { - Integer radius = Integer.valueOf(section.getString(world)); + Integer radius = Integer.parseInt(section.getString(world)); this.worldsAndTheirRadiuses.put(world, radius); } catch (NumberFormatException e) { warn("Radius for world '" + world + "' is not a valid integer."); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java index db4cadaf6..bf633d78a 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/BlockLimit.java @@ -132,7 +132,7 @@ public BlockLimit() { for (String configuredMaterial : section.getKeys(false)) { try { Material blockMaterial = Material.valueOf(configuredMaterial); - Integer maxAmountPerChunk = Integer.valueOf(section.getString(configuredMaterial)); + Integer maxAmountPerChunk = Integer.parseInt(section.getString(configuredMaterial)); blockLimits.put(blockMaterial, maxAmountPerChunk); } catch (NumberFormatException e) { notRecognized(Integer.class, configuredMaterial); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java index ae2cc3ff4..6d44e7626 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits/CustomEntityLimit.java @@ -125,7 +125,7 @@ public CustomEntityLimit() { for (String configuredEntity : section.getKeys(false)) { try { EntityType limitedEntity = EntityType.valueOf(configuredEntity); - Integer maxAmountPerChunk = Integer.valueOf(section.getString(configuredEntity)); + Integer maxAmountPerChunk = Integer.parseInt(section.getString(configuredEntity)); entityLimits.put(limitedEntity, maxAmountPerChunk); } catch (NumberFormatException e) { notRecognized(Integer.class, configuredEntity); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java index 3a33b18d7..ab16fbfe9 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/agelimits/CustomAgeLimits.java @@ -54,7 +54,7 @@ public CustomAgeLimits() { for (String configuredEntity : section.getKeys(false)) { try { EntityType limitedEntity = EntityType.valueOf(configuredEntity); - Integer maxAmountPerChunk = Integer.valueOf(section.getString(configuredEntity)); + Integer maxAmountPerChunk = Integer.parseInt(section.getString(configuredEntity)); entityLimits.put(limitedEntity, maxAmountPerChunk); } catch (NumberFormatException e) { notRecognized(Integer.class, configuredEntity); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java index 04e4fe692..53dd3c3e9 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/preventions/withers/WitherSpawningAtSpawn.java @@ -36,7 +36,7 @@ public WitherSpawningAtSpawn() { ConfigSection section = config.getConfigSection(configPath + ".worlds", defaults); for (String world : section.getKeys(false)) { try { - Integer radius = Integer.valueOf(section.getString(world)); + Integer radius = Integer.parseInt(section.getString(world)); this.worldsAndTheirRadiuses.put(world, radius); } catch (NumberFormatException e) { warn("Radius for world '" + world + "' is not a valid integer.");