From 1d0587dbe8dbd5bb8336a0a7a0e29f006c183c10 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Tue, 23 Sep 2014 19:01:00 +1000 Subject: [PATCH] Bug fixes Fixed (I guess) killAllEntities() Fixed plot clear --- .../src/com/intellectualcrafters/plot/PlotHelper.java | 2 +- .../src/com/intellectualcrafters/plot/PlotMain.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java b/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java index 0b8225fd2..6123f15dc 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java @@ -447,7 +447,7 @@ public class PlotHelper { PlotHelper.removeSign(requester, plot); PlayerFunctions.sendMessage(requester, C.CLEARING_PLOT); World world = requester.getWorld(); - Location pos1 = getPlotBottomLoc(world, plot.id); + Location pos1 = getPlotBottomLoc(world, plot.id).add(1,0,1); Location pos2 = getPlotTopLoc(world, plot.id); SetBlockFast setBlockClass = null; diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java index 54f10875c..7f85fbd07 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java @@ -676,13 +676,15 @@ public class PlotMain extends JavaPlugin { @Override public void run() { for (String w: getPlotWorlds()) { - World world = Bukkit.getWorld(w); + World world = Bukkit.getServer().getWorld(w); try { if(world.getLoadedChunks().length < 1) { continue; } for (Chunk chunk : world.getLoadedChunks()) { - for (Entity entity : chunk.getEntities()){ + Entity[] entities = chunk.getEntities(); + for (int i = entities.length-1; i>=0;i--){ + Entity entity = entities[i]; if (entity.getType() == EntityType.PLAYER) continue; location = entity.getLocation(); @@ -716,6 +718,10 @@ public class PlotMain extends JavaPlugin { config.set(node.getKey(), node.getValue()); } } + Web.ENABLED = config.getBoolean("web.enabled"); + Web.PORT = config.getInt("web.port"); + Settings.KILL_ROAD_MOBS = config.getBoolean("kill_road_mobs"); + for (String node:config.getConfigurationSection("worlds").getKeys(false)) { World world = Bukkit.getWorld(node); if (world==null) {