diff --git a/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java b/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java index afbbaeff2..de453a0f4 100644 --- a/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java +++ b/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java @@ -1483,7 +1483,7 @@ public class NPCCommands { old = old.equals("hover") ? "true" : "" + !Boolean.parseBoolean(old); } npc.data().setPersistent(NPC.Metadata.NAMEPLATE_VISIBLE, old); - Messaging.sendTr(sender, Messages.NAMEPLATE_VISIBILITY_TOGGLED); + Messaging.sendTr(sender, Messages.NAMEPLATE_VISIBILITY_SET, old); } @Command(aliases = { "npc" }, desc = "Show basic NPC information", max = 0, permission = "citizens.npc.info") diff --git a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java index 3f33026c4..b5955bcd6 100644 --- a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java @@ -701,12 +701,16 @@ public class CommandTrait extends Trait { } } } - for (String key : Sets.difference(Sets.newHashSet(lastUsed.keySet()), commandKeys)) { + Set diff = Sets.newHashSet(lastUsed.keySet()); + diff.removeAll(commandKeys); + for (String key : diff) { lastUsed.remove(key); nUsed.remove(key); } if (globalCooldowns != null) { - for (String key : Sets.difference(Sets.newHashSet(globalCooldowns.keySet()), commandKeys)) { + diff = Sets.newHashSet(globalCooldowns.keySet()); + diff.removeAll(commandKeys); + for (String key : diff) { globalCooldowns.remove(key); } } diff --git a/main/src/main/java/net/citizensnpcs/trait/text/Text.java b/main/src/main/java/net/citizensnpcs/trait/text/Text.java index 7f26bdc6c..38c416feb 100644 --- a/main/src/main/java/net/citizensnpcs/trait/text/Text.java +++ b/main/src/main/java/net/citizensnpcs/trait/text/Text.java @@ -240,9 +240,10 @@ public class Text extends Trait implements Runnable, Listener, ConversationAband boolean sendPage(CommandSender player, int page) { Paginator paginator = new Paginator().header("Current Texts").enablePageSwitcher(); - for (int i = 0; i < text.size(); i++) + for (int i = 0; i < text.size(); i++) { paginator.addLine("" + text.get(i) + " (<<&eedit:suggest(edit " + i + " )>>) (<<&c-:command(remove " + i + "):Remove this text>>)"); + } return paginator.sendPage(player, page); } diff --git a/main/src/main/java/net/citizensnpcs/util/Messages.java b/main/src/main/java/net/citizensnpcs/util/Messages.java index 4e97c0a64..7b7086057 100644 --- a/main/src/main/java/net/citizensnpcs/util/Messages.java +++ b/main/src/main/java/net/citizensnpcs/util/Messages.java @@ -231,7 +231,7 @@ public class Messages { public static final String MOVETO_FORMAT = "citizens.commands.npc.moveto.format"; public static final String MOVETO_TELEPORTED = "citizens.commands.npc.moveto.teleported"; public static final String MUSHROOM_COW_VARIANT_SET = "citizens.commands.npc.mushroomcow.variant-set"; - public static final String NAMEPLATE_VISIBILITY_TOGGLED = "citizens.commands.npc.nameplate.toggled"; + public static final String NAMEPLATE_VISIBILITY_SET = "citizens.commands.npc.nameplate.set"; public static final String NO_HORSE_MODIFIERS_GIVEN = "citizens.commands.npc.horse.no-modifiers"; public static final String NO_NPC_WITH_ID_FOUND = "citizens.commands.npc.spawn.missing-npc-id"; public static final String NO_STORED_SPAWN_LOCATION = "citizens.commands.npc.spawn.no-location"; diff --git a/main/src/main/resources/messages_en.properties b/main/src/main/resources/messages_en.properties index 2afd84b90..005155cd1 100644 --- a/main/src/main/resources/messages_en.properties +++ b/main/src/main/resources/messages_en.properties @@ -155,7 +155,7 @@ citizens.commands.npc.mount.mount-on-itself=Can''t mount NPC on itself. citizens.commands.npc.moveto.teleported=[[{0}]] teleported to [[{1}]]. citizens.commands.npc.mushroomcow.invalid-variant=Invalid variant. Valid values are: [[{0}]]. citizens.commands.npc.mushroomcow.variant-set=[[{0}]]''s variant set to [[{1}]]. -citizens.commands.npc.nameplate.toggled=Nameplate visibility toggled. +citizens.commands.npc.nameplate.set=Nameplate visibility set to [[{0}]]. citizens.commands.npc.ocelot.deprecated=Ocelot types don''t work in this version of Minecraft. Use [[/npc type cat]] if you want to change the colour. citizens.commands.npc.ocelot.invalid-type=Invalid ocelot type. Valid types are: [[{0}]]. citizens.commands.npc.owner.already-owner={0} is already the owner of [[{1}]].