mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Re-add WorldEdit check
This commit is contained in:
parent
fab60a0d53
commit
f7810860da
@ -13,7 +13,6 @@ import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod.RefExecutor;
|
|||||||
import com.intellectualcrafters.plot.util.SetQueue;
|
import com.intellectualcrafters.plot.util.SetQueue;
|
||||||
import com.intellectualcrafters.plot.util.SetQueue.ChunkWrapper;
|
import com.intellectualcrafters.plot.util.SetQueue.ChunkWrapper;
|
||||||
import com.intellectualcrafters.plot.util.TaskManager;
|
import com.intellectualcrafters.plot.util.TaskManager;
|
||||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
|
||||||
import com.plotsquared.bukkit.util.SendChunk;
|
import com.plotsquared.bukkit.util.SendChunk;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -261,17 +260,6 @@ public class FastQueue_1_8_3 extends SlowQueue {
|
|||||||
return new FastChunk_1_8_3(wrap);
|
return new FastChunk_1_8_3(wrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void regenerateChunk(String worldname, ChunkLoc loc) {
|
|
||||||
World world = BukkitUtil.getWorld(worldname);
|
|
||||||
Chunk chunk = world.getChunkAt(loc.x, loc.z);
|
|
||||||
if (chunk.getTileEntities().length > 0) {
|
|
||||||
Object w = methodGetHandleWorld.of(world).call();
|
|
||||||
((Collection) this.tileEntityListTick.of(w).get()).clear();
|
|
||||||
}
|
|
||||||
super.regenerateChunk(worldname, loc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This should be overridden by any specialized queues
|
* This should be overridden by any specialized queues
|
||||||
* @param plotChunk
|
* @param plotChunk
|
||||||
|
@ -80,18 +80,6 @@ public class FastQueue_1_9 extends SlowQueue {
|
|||||||
MainUtil.initCache();
|
MainUtil.initCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void regenerateChunk(String worldname, ChunkLoc loc) {
|
|
||||||
World world = BukkitUtil.getWorld(worldname);
|
|
||||||
Chunk chunk = world.getChunkAt(loc.x, loc.z);
|
|
||||||
if (chunk.getTileEntities().length > 0) {
|
|
||||||
Object c = methodGetHandleChunk.of(chunk).call();
|
|
||||||
Object w = methodGetWorld.of(c).call();
|
|
||||||
((Collection) this.tileEntityListTick.of(w).get()).clear();
|
|
||||||
}
|
|
||||||
super.regenerateChunk(worldname, loc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This should be overridden by any specialized queues
|
* This should be overridden by any specialized queues
|
||||||
* @param plotChunk
|
* @param plotChunk
|
||||||
|
@ -171,10 +171,16 @@ public class PS {
|
|||||||
if (Settings.KILL_ROAD_MOBS || Settings.KILL_ROAD_VEHICLES) {
|
if (Settings.KILL_ROAD_MOBS || Settings.KILL_ROAD_VEHICLES) {
|
||||||
this.IMP.runEntityTask();
|
this.IMP.runEntityTask();
|
||||||
}
|
}
|
||||||
if (this.IMP.initWorldEdit()) {
|
try {
|
||||||
this.worldedit = WorldEdit.getInstance();
|
if (this.IMP.initWorldEdit()) {
|
||||||
WorldEdit.getInstance().getEventBus().register(new WESubscriber());
|
this.worldedit = WorldEdit.getInstance();
|
||||||
new WE_Anywhere();
|
WorldEdit.getInstance().getEventBus().register(new WESubscriber());
|
||||||
|
new WE_Anywhere();
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
PS.debug("Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
|
Loading…
Reference in New Issue
Block a user