Make some create flags require admin

This commit is contained in:
fullwall 2023-06-11 17:06:22 +08:00
parent 64b200837d
commit 3702b019cd
1 changed files with 4 additions and 0 deletions

View File

@ -680,6 +680,10 @@ public class NPCCommands {
if (!sender.hasPermission("citizens.npc.create.*") && !sender.hasPermission("citizens.npc.createall")
&& !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) {