Skip to content

Commit

Permalink
Superperms compliant plugin.yml. Fixes CITIZENS-705.
Browse files Browse the repository at this point in the history
In this commit I have registered all permissions used in the source code. I have also manually created all applicable wildcard (.*) nodes. By doing this no external
permission manager plugin is required. Additionally external permission managers that are superperms based will now work without bugs.

This commit is 99% backwards compatible current server configurations. The only change made to the nodes is the removal of underscores in citizens.npc.controllable.*
permissions. This change was made to achieve consistency with citizens.npc.create.* permissions.

Signed Off By: Olof "Cayorion" Larsson
  • Loading branch information
oloflarsson committed Oct 3, 2013
1 parent 5f90568 commit 818c620
Show file tree
Hide file tree
Showing 2 changed files with 1,297 additions and 74 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/citizensnpcs/commands/NPCCommands.java
Expand Up @@ -212,7 +212,7 @@ public void anchor(CommandContext args, CommandSender sender, NPC npc) throws Co
flags = "myn")
public void controllable(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
if ((npc.isSpawned() && !sender.hasPermission("citizens.npc.controllable."
+ npc.getBukkitEntity().getType().toString().toLowerCase()))
+ npc.getBukkitEntity().getType().name().toLowerCase().replace("_", "")))
|| !sender.hasPermission("citizens.npc.controllable"))
throw new NoPermissionsException();
if (!npc.hasTrait(Controllable.class)) {
Expand Down

0 comments on commit 818c620

Please sign in to comment.