mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-30 14:43:54 +01:00
Fix CITIZENS-485 (require per-mob type permission in /npc create)
This commit is contained in:
parent
aa022f8fae
commit
131453f775
@ -303,6 +303,9 @@ public class NPCCommands {
|
|||||||
type = EntityType.PLAYER;
|
type = EntityType.PLAYER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!sender.hasPermission("citizens.npc.create.*")
|
||||||
|
&& !sender.hasPermission("citizens.npc.create." + type.name().toLowerCase().replace("_", "")))
|
||||||
|
throw new NoPermissionsException();
|
||||||
|
|
||||||
npc = npcRegistry.createNPC(type, name);
|
npc = npcRegistry.createNPC(type, name);
|
||||||
String msg = "You created [[" + npc.getName() + "]]";
|
String msg = "You created [[" + npc.getName() + "]]";
|
||||||
|
Loading…
Reference in New Issue
Block a user