Fixes #868
Fixes #778
Fixes attributes passing wrong key to persistent meta
Fixes blob compatibility with JDBC driver for persistent meta
Fix stackoverflow from countEntities under certain circumstances
Minor cleanup
This commit is contained in:
Jesse Boyd
2016-02-26 01:17:07 +11:00
parent efae2c2e63
commit 7659884e73
8 changed files with 78 additions and 177 deletions

View File

@ -5,7 +5,6 @@ import com.intellectualcrafters.plot.commands.RequiredType;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.PlotGamemode;
import com.intellectualcrafters.plot.util.PlotWeather;
import com.intellectualcrafters.plot.util.UUIDHandler;
@ -147,33 +146,6 @@ public class SpongePlayer extends PlotPlayer {
throw new UnsupportedOperationException("NOT IMPLEMENTED YET");
}
@Override
public void setAttribute(String key) {
key = "plotsquared_user_attributes." + key;
if ((EconHandler.manager == null) || player.hasPermission("plotsquared_user_attributes.*")) {
setMeta(key, true);
return;
}
EconHandler.manager.setPermission(getName(), key, true);
}
@Override
public boolean getAttribute(String key) {
key = "plotsquared_user_attributes." + key;
if ((EconHandler.manager == null) || player.hasPermission("plotsquared_user_attributes.*")) {
final Object v = getMeta(key);
return v == null ? false : (Boolean) v;
}
return player.hasPermission(key);
}
@Override
public void removeAttribute(String key) {
key = "plotsquared_user_attributes." + key;
EconHandler.manager.setPermission(getName(), key, false);
deleteMeta(key);
}
@Override
public void setWeather(final PlotWeather weather) {
// TODO Auto-generated method stub