From 956afc03820b723512606401b6bdd7290b7433e5 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Sun, 2 May 2021 15:03:43 -0400 Subject: [PATCH] Fix kit-auto-equip not working on versions < 1.14 (#4130) --- Essentials/src/main/java/com/earth2me/essentials/Kit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/Kit.java b/Essentials/src/main/java/com/earth2me/essentials/Kit.java index 9db9f91d9..f8725bd4f 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/Kit.java +++ b/Essentials/src/main/java/com/earth2me/essentials/Kit.java @@ -9,6 +9,7 @@ import com.earth2me.essentials.textreader.SimpleTextInput; import com.earth2me.essentials.utils.DateUtil; import com.earth2me.essentials.utils.MaterialUtil; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.VersionUtil; import net.ess3.api.IEssentials; import net.ess3.api.events.KitClaimEvent; import org.bukkit.Bukkit; @@ -281,6 +282,6 @@ public class Kit { } private boolean isEmptyStack(ItemStack stack) { - return stack == null || stack.getType().isAir(); + return stack == null || stack.getType() == Material.AIR || (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_14_4_R01) && stack.getType().isAir()); } }