diff --git a/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java b/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java index 4ddd12a5b..3718f6afe 100644 --- a/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java +++ b/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java @@ -1802,7 +1802,7 @@ public class NPCCommands { if (args.hasValueFlag("world")) { String world = args.getFlag("world"); for (NPC rem : Lists.newArrayList(CitizensAPI.getNPCRegistry())) { - Location loc = npc.getStoredLocation(); + Location loc = rem.getStoredLocation(); if (loc != null && loc.getWorld() != null && (loc.getWorld().getUID().toString().equals(world) || loc.getWorld().getName().equalsIgnoreCase(world))) { history.add(sender, new RemoveNPCHistoryItem(rem));