mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
WEPIF: Use UUIDs wherever possible in PermissionsExResolver
This commit is contained in:
parent
bb2c5ba003
commit
6a6c590a07
@ -3,9 +3,9 @@ apply plugin: 'idea'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':worldedit-core')
|
compile project(':worldedit-core')
|
||||||
compile 'com.sk89q:dummypermscompat:1.7'
|
compile 'com.sk89q:dummypermscompat:1.8'
|
||||||
compile 'org.sk89q.bukkit:bukkit-classloader-check:1.7.2-R0.3'
|
compile 'org.sk89q.bukkit:bukkit-classloader-check:1.7.9-R0.2'
|
||||||
compile 'org.bukkit:bukkit:1.7.2-R0.3'
|
compile 'org.bukkit:bukkit:1.7.9-R0.2'
|
||||||
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
|
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class PermissionsExResolver extends DinnerPermsResolver {
|
|||||||
public boolean hasPermission(OfflinePlayer player, String permission) {
|
public boolean hasPermission(OfflinePlayer player, String permission) {
|
||||||
Permissible permissible = getPermissible(player);
|
Permissible permissible = getPermissible(player);
|
||||||
if (permissible == null) {
|
if (permissible == null) {
|
||||||
return manager.has(player.getName(), permission, null);
|
return manager.has(player.getUniqueId(), permission, null);
|
||||||
} else {
|
} else {
|
||||||
return permissible.hasPermission(permission);
|
return permissible.hasPermission(permission);
|
||||||
}
|
}
|
||||||
@ -65,18 +65,18 @@ public class PermissionsExResolver extends DinnerPermsResolver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(String worldName, OfflinePlayer player, String permission) {
|
public boolean hasPermission(String worldName, OfflinePlayer player, String permission) {
|
||||||
return hasPermission(worldName, player.getName(), permission);
|
return manager.has(player.getUniqueId(), permission, worldName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean inGroup(OfflinePlayer player, String group) {
|
public boolean inGroup(OfflinePlayer player, String group) {
|
||||||
return super.inGroup(player, group) || manager.getUser(player.getName()).inGroup(group);
|
return super.inGroup(player, group) || manager.getUser(player.getUniqueId()).inGroup(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getGroups(OfflinePlayer player) {
|
public String[] getGroups(OfflinePlayer player) {
|
||||||
if (getPermissible(player) == null) {
|
if (getPermissible(player) == null) {
|
||||||
PermissionUser user = manager.getUser(player.getName());
|
PermissionUser user = manager.getUser(player.getUniqueId());
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user