mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 03:55:30 +01:00
Fix /npc passive flipped message
This commit is contained in:
parent
e757344d41
commit
6642923b49
@ -2025,9 +2025,9 @@ public class NPCCommands {
|
|||||||
permission = "citizens.npc.passive")
|
permission = "citizens.npc.passive")
|
||||||
public void passive(CommandContext args, CommandSender sender, NPC npc, @Flag("set") Boolean set)
|
public void passive(CommandContext args, CommandSender sender, NPC npc, @Flag("set") Boolean set)
|
||||||
throws CommandException {
|
throws CommandException {
|
||||||
boolean passive = set != null ? set : !npc.data().get(NPC.Metadata.DAMAGE_OTHERS, true);
|
boolean damageOthers = set != null ? set : !npc.data().get(NPC.Metadata.DAMAGE_OTHERS, true);
|
||||||
npc.data().setPersistent(NPC.Metadata.DAMAGE_OTHERS, passive);
|
npc.data().setPersistent(NPC.Metadata.DAMAGE_OTHERS, damageOthers);
|
||||||
Messaging.sendTr(sender, passive ? Messages.PASSIVE_SET : Messages.PASSIVE_UNSET, npc.getName());
|
Messaging.sendTr(sender, damageOthers ? Messages.PASSIVE_UNSET : Messages.PASSIVE_SET, npc.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
|
Loading…
Reference in New Issue
Block a user