Skip to content

Commit

Permalink
Fix /npc passive flipped message
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 8, 2024
1 parent e757344 commit 6642923
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main/src/main/java/net/citizensnpcs/commands/NPCCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -2025,9 +2025,9 @@ public void painting(CommandContext args, CommandSender sender, NPC npc, @Flag("
permission = "citizens.npc.passive")
public void passive(CommandContext args, CommandSender sender, NPC npc, @Flag("set") Boolean set)
throws CommandException {
boolean passive = set != null ? set : !npc.data().get(NPC.Metadata.DAMAGE_OTHERS, true);
npc.data().setPersistent(NPC.Metadata.DAMAGE_OTHERS, passive);
Messaging.sendTr(sender, passive ? Messages.PASSIVE_SET : Messages.PASSIVE_UNSET, npc.getName());
boolean damageOthers = set != null ? set : !npc.data().get(NPC.Metadata.DAMAGE_OTHERS, true);
npc.data().setPersistent(NPC.Metadata.DAMAGE_OTHERS, damageOthers);
Messaging.sendTr(sender, damageOthers ? Messages.PASSIVE_UNSET : Messages.PASSIVE_SET, npc.getName());
}

@Command(
Expand Down

0 comments on commit 6642923

Please sign in to comment.