From d722e9f4ade7eee1e10c7b4bc3fa154bd820384e Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 27 Nov 2021 11:32:45 -0800 Subject: [PATCH] Version 1.15.2 (#118) * Add support for 1.16.5 --- pom.xml | 2 +- .../world/bentobox/acidisland/world/AcidTask.java | 14 ++++++++++++-- src/main/resources/addon.yml | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 3ab1981..1f1065b 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ -LOCAL - 1.15.1 + 1.15.2 BentoBoxWorld_AcidIsland bentobox-world diff --git a/src/main/java/world/bentobox/acidisland/world/AcidTask.java b/src/main/java/world/bentobox/acidisland/world/AcidTask.java index e190e08..1e9dab2 100644 --- a/src/main/java/world/bentobox/acidisland/world/AcidTask.java +++ b/src/main/java/world/bentobox/acidisland/world/AcidTask.java @@ -1,7 +1,7 @@ package world.bentobox.acidisland.world; import java.util.ArrayList; -import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; @@ -21,6 +21,8 @@ import org.bukkit.entity.Monster; import org.bukkit.entity.WaterMob; import org.bukkit.scheduler.BukkitTask; +import com.google.common.base.Enums; + import world.bentobox.acidisland.AcidIsland; import world.bentobox.acidisland.events.EntityDamageByAcidEvent; import world.bentobox.acidisland.events.EntityDamageByAcidEvent.Acid; @@ -29,7 +31,15 @@ import world.bentobox.acidisland.listeners.AcidEffect; public class AcidTask { private final AcidIsland addon; - private static final List IMMUNE = Arrays.asList(EntityType.TURTLE, EntityType.POLAR_BEAR, EntityType.DROWNED, EntityType.AXOLOTL); + private static final List IMMUNE; + static { + List i = new ArrayList<>(); + i.add(EntityType.POLAR_BEAR); + i.add(EntityType.TURTLE); + i.add(EntityType.DROWNED); + Enums.getIfPresent(EntityType.class, "AXOLOTL").toJavaUtil().ifPresent(i::add); + IMMUNE = Collections.unmodifiableList(i); + } private Map itemsInWater = new ConcurrentHashMap<>(); private final BukkitTask findMobsTask; diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index f31684a..e519db3 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -1,7 +1,7 @@ name: AcidIsland main: world.bentobox.acidisland.AcidIsland version: ${version}${build.number} -api-version: ${bentobox.version} +api-version: 1.16.5 metrics: true repository: "BentoBoxWorld/AcidIsland" icon: "OAK_BOAT"