Bug fixes

Fixed (I guess) killAllEntities()
Fixed plot clear
This commit is contained in:
boy0001 2014-09-23 19:01:00 +10:00
parent 5601315c41
commit 1d0587dbe8
2 changed files with 9 additions and 3 deletions

View File

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

View File

@ -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) {