Permissions nodes let's say I made A Plugin and I wanted to add permission nodes I would do: Example Code: public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ Player player = (Player) sender; if(commandLabel.equalsIgnoreCase("captureblue")){ Bukkit.broadcastMessage(ChatColor.BLUE + " Blue Team has captured" + ChatColor.RED + " Reds flag!" + " (1) Point Blue!"); player.sendMessage(ChatColor.GREEN + "Successfully Captured Reds flag!"); And I would add to it, if(player.hasPermission("allow.capture.flag") Now, Code: public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ Player player = (Player) sender; if(commandLabel.equalsIgnoreCase("captureblue")){ Bukkit.broadcastMessage(ChatColor.BLUE + " Blue Team has captured" + ChatColor.RED + " Reds flag!" + " (1) Point Blue!"); player.sendMessage(ChatColor.GREEN + "Successfully Captured Reds flag!"); if(player.hasPermission("allow.capture.flag") Then the Config.yml would look like? permissions: capture.*: description: Gives access to capture the flag default: allow.capture.flag: true allow.capture.flag: description: Allows you to capture the flag! default: true Put how would the plugin.yml look?
you do not actually have to register the permissions in the plugin.yml, your supposed to but it is not needed.
Alright thank you but is the codeing right for the adding permission nodes into the plugin, I tried it but it didn't work.
Yes, but if you want them to be added by default as true, then they do infact need to be in the plugin.yml. you can find a guide on how to set up permissions in the plugin.yml on the bukkit wiki.
you should @ tag somebody or quote them if you would like a reply most of the time. I for instance usually don't ever see a response if there is no alert to me
@nala3 name: Captureflag main: me.jollygiant13.captureflag.captureflag version: 1.2.5 depend: GroupManager, PermissionEX ???? loaddepend: GroupManager, PermissionEX ???? permissions: captureflag.*: description: Gives you all access to all Captureflag commands children: allow.capture.flag: true deny.capture.flag: false allow.capture.flag: Description: Allows you to capture the flag default: true
Code: name: CaptureFlag description: An awesome CTF plugin written by JollyGiant13! main: me.jollygiant13.captureflag.captureflag version 1.2.5 permissions: captureflag.*: description: All CaptureFlag permisssions children: captureflag.allow: true captureflag.deny: false captureflag.allow: description: Allow capturing the flag default: true captureflag.deny: description: Deny capturing the flag (overrides captureflag.allow) default: false you should make captureflag.deny override captureflag.allow in the code, it only makes sense
@nala3 Code: name: CaptureFlag description: An awesome CTF plugin written by JollyGiant13! main: me.jollygiant13.captureflag.captureflag version 1.2.5 permissions: captureflag.*: description: All CaptureFlag permisssions children: captureflag.allow: true captureflag.deny: false captureflag.allow: description: Allow capturing the flag default: true captureflag.deny: description: Deny capturing the flag (overrides captureflag.allow) default: false Same thing in the Config.yml?
@nala3 Alright so would you add Code: if(player.hasPermission("helpcenter.*")); Aswell, and what about the ./hcreload