mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-09-27 14:53:09 +02:00
Make some create flags require admin
This commit is contained in:
parent
64b200837d
commit
3702b019cd
@ -681,6 +681,10 @@ public class NPCCommands {
|
||||
&& !sender.hasPermission("citizens.npc.create." + type.name().toLowerCase().replace("_", "")))
|
||||
throw new NoPermissionsException();
|
||||
|
||||
if ((at != null || registryName != null || traits != null || templateName != null)
|
||||
&& !sender.hasPermission("citizens.npc.admin"))
|
||||
throw new NoPermissionsException();
|
||||
|
||||
NPCRegistry registry = CitizensAPI.getNPCRegistry();
|
||||
if (registryName != null) {
|
||||
registry = CitizensAPI.getNamedNPCRegistry(registryName);
|
||||
|
Loading…
Reference in New Issue
Block a user