mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-29 19:41:50 +01:00
Allow /npc zombiemod to work for pig zombies
This commit is contained in:
parent
29806e00e6
commit
db88b84c97
@ -265,7 +265,7 @@ public class NPCCommands {
|
||||
}
|
||||
|
||||
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();
|
||||
@ -337,7 +337,7 @@ public class NPCCommands {
|
||||
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();
|
||||
@ -1004,7 +1004,7 @@ public class NPCCommands {
|
||||
@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(
|
||||
@ -1510,7 +1510,7 @@ public class NPCCommands {
|
||||
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')) {
|
||||
|
Loading…
Reference in New Issue
Block a user