really fix it this time
This commit is contained in:
parent
158519efd6
commit
e72465179b
|
@ -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