From 34c123309ba44ad2616e2b853d5e19110fac1631 Mon Sep 17 00:00:00 2001 From: ASangarin Date: Tue, 20 Oct 2020 19:20:40 +0200 Subject: [PATCH] Invalid droptables no longer spams the console to infinity --- .../net/Indyuce/mmoitems/api/droptable/item/MMOItemDropItem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/Indyuce/mmoitems/api/droptable/item/MMOItemDropItem.java b/src/main/java/net/Indyuce/mmoitems/api/droptable/item/MMOItemDropItem.java index b81bbe61..f8a78f0c 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/droptable/item/MMOItemDropItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/droptable/item/MMOItemDropItem.java @@ -50,6 +50,7 @@ public class MMOItemDropItem extends DropItem { @Override public ItemStack getItem(PlayerData player, int amount) { + if(!MMOItems.plugin.getTemplates().hasTemplate(type, id)) return null; ItemStack item = player == null ? MMOItems.plugin.getItem(type, id) : MMOItems.plugin.getItem(type, id, player); if (item == null || item.getType() == Material.AIR) return null;