Scripting stuff + remove PlotSquared-Null

This commit is contained in:
boy0001
2015-08-02 02:12:49 +10:00
parent 858d1453f2
commit 0a3ec5dcd8
11 changed files with 295 additions and 32 deletions

View File

@ -1619,7 +1619,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
if (Settings.DELETE_PLOTS_ON_BAN && event.getPlayer().isBanned()) {
final Collection<Plot> plots = PS.get().getPlots(pp.getName()).values();
for (final Plot plot : plots) {
plot.delete();
plot.deletePlot(null);
PS.debug(String.format("&cPlot &6%s &cwas deleted + cleared due to &6%s&c getting banned", plot.getId(), event.getPlayer().getName()));
}
}

View File

@ -98,6 +98,9 @@ public class SpongeBlockManager extends BlockManager {
@Override
public int getHeighestBlock(String worldname, int x, int z) {
World world = SpongeUtil.getWorld(worldname);
if (world == null) {
return 64;
}
for (int y = 255; y > 0; y--) {
BlockState block = world.getBlock(x, y, z);
if (block != null && block.getType() != BlockTypes.AIR) {