mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36:45 +01:00
Added standard attribute prefix
This commit is contained in:
parent
ffbc2f9611
commit
4119b66583
@ -156,6 +156,7 @@ public class BukkitPlayer implements PlotPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAttribute(String key) {
|
public void setAttribute(String key) {
|
||||||
|
key = "plotsquared_user_attributes." + key;
|
||||||
Permission perm = Bukkit.getServer().getPluginManager().getPermission(key);
|
Permission perm = Bukkit.getServer().getPluginManager().getPermission(key);
|
||||||
if (perm == null) {
|
if (perm == null) {
|
||||||
perm = new Permission(key, PermissionDefault.FALSE);
|
perm = new Permission(key, PermissionDefault.FALSE);
|
||||||
@ -167,11 +168,13 @@ public class BukkitPlayer implements PlotPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getAttribute(String key) {
|
public boolean getAttribute(String key) {
|
||||||
|
key = "plotsquared_user_attributes." + key;
|
||||||
return player.hasPermission(key);
|
return player.hasPermission(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeAttribute(String key) {
|
public void removeAttribute(String key) {
|
||||||
|
key = "plotsquared_user_attributes." + key;
|
||||||
EconHandler.manager.setPermission(this, key, false);
|
EconHandler.manager.setPermission(this, key, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user