mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Bug fixes
Fixed (I guess) killAllEntities() Fixed plot clear
This commit is contained in:
parent
5601315c41
commit
1d0587dbe8
@ -447,7 +447,7 @@ public class PlotHelper {
|
|||||||
PlotHelper.removeSign(requester, plot);
|
PlotHelper.removeSign(requester, plot);
|
||||||
PlayerFunctions.sendMessage(requester, C.CLEARING_PLOT);
|
PlayerFunctions.sendMessage(requester, C.CLEARING_PLOT);
|
||||||
World world = requester.getWorld();
|
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);
|
Location pos2 = getPlotTopLoc(world, plot.id);
|
||||||
SetBlockFast setBlockClass = null;
|
SetBlockFast setBlockClass = null;
|
||||||
|
|
||||||
|
@ -676,13 +676,15 @@ public class PlotMain extends JavaPlugin {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (String w: getPlotWorlds()) {
|
for (String w: getPlotWorlds()) {
|
||||||
World world = Bukkit.getWorld(w);
|
World world = Bukkit.getServer().getWorld(w);
|
||||||
try {
|
try {
|
||||||
if(world.getLoadedChunks().length < 1) {
|
if(world.getLoadedChunks().length < 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (Chunk chunk : world.getLoadedChunks()) {
|
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)
|
if (entity.getType() == EntityType.PLAYER)
|
||||||
continue;
|
continue;
|
||||||
location = entity.getLocation();
|
location = entity.getLocation();
|
||||||
@ -716,6 +718,10 @@ public class PlotMain extends JavaPlugin {
|
|||||||
config.set(node.getKey(), node.getValue());
|
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)) {
|
for (String node:config.getConfigurationSection("worlds").getKeys(false)) {
|
||||||
World world = Bukkit.getWorld(node);
|
World world = Bukkit.getWorld(node);
|
||||||
if (world==null) {
|
if (world==null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user