Added standard attribute prefix

This commit is contained in:
boy0001 2015-06-05 22:42:45 +10:00
parent ffbc2f9611
commit 4119b66583

View File

@ -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);
} }
} }