Added a validity check for entities.

This commit is contained in:
Brianna O'Keefe 2019-03-25 17:39:37 -04:00
parent 1d16886f8b
commit 9a42d01511

View File

@ -64,7 +64,7 @@ public class StackingTask extends BukkitRunnable {
nextEntity:
for (Entity entityO : entities) {
if (entityO == null || entityO instanceof Player) continue;
if (entityO == null || entityO instanceof Player || !entityO.isValid()) continue;
if (entityO instanceof Item && instance.getConfig().getBoolean("Main.Stack Items")) {
ItemStack item = ((Item) entityO).getItemStack();