Fix NullPointerException in StackingTask

Kinda related to c6320cb141
This commit is contained in:
Christian Koop 2022-10-26 22:06:11 +02:00
parent c6320cb141
commit e9b7eee57b
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3

View File

@ -284,6 +284,10 @@ public class StackingTask extends BukkitRunnable {
// Make the friend the new stack host.
EntityStack newStack = stackManager.updateStack(livingEntity, entity);
if (newStack == null) {
continue;
}
// Add our entity to that stack
plugin.getDataManager().createStackedEntity(newStack, newStack.addEntityToStack(livingEntity));