Fix kit-auto-equip not working on versions < 1.14 (#4130)

This commit is contained in:
Josh Roy 2021-05-02 15:03:43 -04:00 committed by GitHub
parent 312ff110ec
commit 956afc0382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}
}