mirror of https://github.com/MilkBowl/Vault.git
added Transient Permission check to playerHas for GM/P2
This commit is contained in:
parent
3c1a2bb7e3
commit
d6499eb532
|
@ -99,6 +99,11 @@ public class Permission_GroupManager extends Permission {
|
|||
|
||||
@Override
|
||||
public boolean playerHas(String worldName, String playerName, String permission) {
|
||||
Player p = plugin.getServer().getPlayer(playerName);
|
||||
if (p != null) {
|
||||
if (p.hasPermission(permission))
|
||||
return true;
|
||||
}
|
||||
return perms.has(plugin.getServer().getPlayer(playerName), permission);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,6 +97,11 @@ public class Permission_Permissions2 extends Permission {
|
|||
|
||||
@Override
|
||||
public boolean playerHas(String worldName, String playerName, String permission) {
|
||||
Player p = plugin.getServer().getPlayer(playerName);
|
||||
if (p != null) {
|
||||
if (p.hasPermission(permission))
|
||||
return true;
|
||||
}
|
||||
return this.perms.has(worldName, playerName, permission);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue