mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-13 11:41:26 +01:00
Fix /npc remove --world
This commit is contained in:
parent
719f115f0c
commit
0a6225a8a3
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user