Fixed an issue with Bukkit being terrible.

This commit is contained in:
Matthew Miller 2018-08-07 11:49:50 +10:00
parent b850b5caf8
commit 1123270a07

View File

@ -169,7 +169,7 @@ public static Target createTarget(Block block) {
public static Target createTarget(ItemStack item) {
checkNotNull(item);
checkNotNull(item.getType());
return new ItemTarget(BukkitAdapter.asItemType(item.getType()));
return createTarget(item.getType()); // Delegate it, ItemStacks can contain both Blocks and Items in Spigot
}
/**