From 0a6225a8a318813afbeb0f68ff9471bc2c38f781 Mon Sep 17 00:00:00 2001 From: fullwall Date: Tue, 19 Apr 2022 18:13:40 +0800 Subject: [PATCH] Fix /npc remove --world --- main/src/main/java/net/citizensnpcs/commands/NPCCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));