mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
really fix it this time
This commit is contained in:
parent
7c9c8dd546
commit
3d4aae4ca4
@ -120,8 +120,6 @@ public class NPCCommands {
|
||||
public void renameNPC(CommandContext args, Player player, NPC npc) {
|
||||
String oldName = npc.getName();
|
||||
npc.setName(args.getString(1));
|
||||
// Must reselect NPC after it is despawned
|
||||
npcManager.selectNPC(player, npc);
|
||||
Messaging.send(
|
||||
player,
|
||||
ChatColor.GREEN + "You renamed " + StringHelper.wrap(oldName) + " to "
|
||||
|
@ -52,7 +52,7 @@ public class CitizensNPCManager implements NPCManager {
|
||||
|
||||
public void despawn(NPC npc, boolean deselect) {
|
||||
npc.getTrait(SpawnLocation.class).setLocation(npc.getBukkitEntity().getLocation());
|
||||
if (deselect)
|
||||
if (!deselect)
|
||||
selected.removeAll(npc.getId());
|
||||
npc.getBukkitEntity().remove();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user