Fixed ArrayIndexOutOfBoundsException

This commit is contained in:
Auxilor 2021-01-12 18:53:11 +00:00
parent 307b57bf6e
commit 5e299d9d4a

View File

@ -70,6 +70,9 @@ public class Soulbound extends EcoEnchant {
Player player = event.getPlayer();
this.getPlugin().getScheduler().runLater(() -> {
if (!player.hasMetadata("soulbound-items")) {
return;
}
List<ItemStack> soulboundItems = (List<ItemStack>) player.getMetadata("soulbound-items").get(0).value();
if (soulboundItems == null) {