java - Bukkit plugin multiple permissions not working -


I am trying to make it, if a player opted out or one of at least two permission nodes Allow Player Player = (Player) Sender;

If (player.hasPermission ("perm.node1")) command

|| (player.promotion ("perm.node2") )) {Sender.sendMessage (ChatColor.RED + "Access denied!"); Back true; }

I was compiled with a plugin with a plugin and I'm opamed ingame as testing this plugin on a server with the same bukkit build, I have not given any permission to myself

with only one permission node (Player.hasPermission ("perm.node1")) need to be, the code works fine But it is listed with both permissions, "Access denied!".

The word "Access denied!" Elsewhere in the code So, it should come from this statement

I have tried to add another or I statement player.isOp () , but it has no effect < / P>

If I am in a user group with perm.node1 , then order the command in question without getting "Access denied!" But if I have Perm.node2 , then I get "code access.node1

If the subscriber is required for" perm.node2 " If approved, then your conditional assessment will evaluate (and refuse denial).

Try it:

  if (Player PlayerPrint ("perm.node1") and Player.hasPermisson ("perm.node2")) {// deny use ...}  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -