Skip to content

Commit

Permalink
Allow /npc zombiemod to work for pig zombies
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Feb 1, 2014
1 parent b14d516 commit 1479954
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/citizensnpcs/commands/NPCCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public void copy(CommandContext args, CommandSender sender, NPC npc) throws Comm
}

CommandSenderCreateNPCEvent event = sender instanceof Player ? new PlayerCreateNPCEvent((Player) sender, copy)
: new CommandSenderCreateNPCEvent(sender, copy);
: new CommandSenderCreateNPCEvent(sender, copy);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
event.getNPC().destroy();
Expand Down Expand Up @@ -337,7 +337,7 @@ public void create(CommandContext args, CommandSender sender, NPC npc) throws Co
spawnLoc = args.getSenderLocation();
}
CommandSenderCreateNPCEvent event = sender instanceof Player ? new PlayerCreateNPCEvent((Player) sender, npc)
: new CommandSenderCreateNPCEvent(sender, npc);
: new CommandSenderCreateNPCEvent(sender, npc);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
npc.destroy();
Expand Down Expand Up @@ -1004,7 +1004,7 @@ public void pose(CommandContext args, CommandSender sender, NPC npc) throws Comm
@Requirements(selected = true, ownership = true, types = { EntityType.CREEPER })
public void power(CommandContext args, CommandSender sender, NPC npc) {
Messaging
.sendTr(sender, npc.getTrait(Powered.class).toggle() ? Messages.POWERED_SET : Messages.POWERED_STOPPED);
.sendTr(sender, npc.getTrait(Powered.class).toggle() ? Messages.POWERED_SET : Messages.POWERED_STOPPED);
}

@Command(
Expand Down Expand Up @@ -1510,7 +1510,7 @@ public void wolf(CommandContext args, CommandSender sender, NPC npc) throws Comm
min = 1,
max = 1,
permission = "citizens.npc.zombiemodifier")
@Requirements(selected = true, ownership = true, types = EntityType.ZOMBIE)
@Requirements(selected = true, ownership = true, types = { EntityType.ZOMBIE, EntityType.PIG_ZOMBIE })
public void zombieModifier(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
ZombieModifier trait = npc.getTrait(ZombieModifier.class);
if (args.hasFlag('b')) {
Expand Down

0 comments on commit 1479954

Please sign in to comment.