diff --git a/src/main/java/me/loganb1max/minionsplus/manager/MinionManager.java b/src/main/java/me/loganb1max/minionsplus/manager/MinionManager.java index e10580e..9b6a7dc 100644 --- a/src/main/java/me/loganb1max/minionsplus/manager/MinionManager.java +++ b/src/main/java/me/loganb1max/minionsplus/manager/MinionManager.java @@ -111,7 +111,7 @@ public class MinionManager implements Listener { @EventHandler(priority = EventPriority.HIGHEST) public void onRightClick(final PlayerArmorStandManipulateEvent e) { - this.minions.stream().filter(minion -> minion.getId().equals(e.getRightClicked().getUniqueId())).findFirst().ifPresent(minion -> { + this.minions.stream().filter(minion -> minion.getId() != null).filter(minion -> minion.getId().equals(e.getRightClicked().getUniqueId())).findFirst().ifPresent(minion -> { e.setCancelled(true); if (!minion.getOwner().equals(e.getPlayer().getUniqueId())) { e.getPlayer().sendMessage(Text.color("&cOnly the owner of the minion can interact with it.")); diff --git a/src/main/java/me/loganb1max/minionsplus/model/Minion.java b/src/main/java/me/loganb1max/minionsplus/model/Minion.java index 3643272..b6ec96d 100644 --- a/src/main/java/me/loganb1max/minionsplus/model/Minion.java +++ b/src/main/java/me/loganb1max/minionsplus/model/Minion.java @@ -248,6 +248,7 @@ public abstract class Minion { toReturn = new BreederMinion(owner, ownerName, location, energy, level, linkedBlocks); break; } + toReturn.findStand(); return toReturn; }