mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared
This commit is contained in:
@ -223,14 +223,14 @@ public class LikePlotMeConverter {
|
||||
PS.get().config.set("worlds." + world + ".road.width", pathwidth);
|
||||
|
||||
Integer pathheight = PLOTME_DG_YML.getInt("worlds." + plotMeWorldName + ".RoadHeight"); //
|
||||
if ((pathheight == null) || (pathheight == 0)) {
|
||||
if (pathheight == 0) {
|
||||
pathheight = 64;
|
||||
}
|
||||
PS.get().config.set("worlds." + world + ".road.height", pathheight);
|
||||
PS.get().config.set("worlds." + world + ".wall.height", pathheight);
|
||||
PS.get().config.set("worlds." + world + ".plot.height", pathheight);
|
||||
Integer plotsize = PLOTME_DG_YML.getInt("worlds." + plotMeWorldName + ".PlotSize"); //
|
||||
if ((plotsize == null) || (plotsize == 0)) {
|
||||
if (plotsize == 0) {
|
||||
plotsize = 32;
|
||||
}
|
||||
PS.get().config.set("worlds." + world + ".plot.size", plotsize);
|
||||
|
@ -157,7 +157,6 @@ public class ChunkListener implements Listener {
|
||||
final int z = Z << 4;
|
||||
final int x2 = x + 15;
|
||||
final int z2 = z + 15;
|
||||
Thread thread = new Thread();
|
||||
Plot plot = new Location(world, x, 1, z).getOwnedPlotAbs();
|
||||
if (plot != null && plot.hasOwner()) {
|
||||
return false;
|
||||
|
@ -158,9 +158,6 @@ public class BukkitUtil extends WorldUtil {
|
||||
public int getBiomeFromString(final String biomeStr) {
|
||||
try {
|
||||
final Biome biome = Biome.valueOf(biomeStr.toUpperCase());
|
||||
if (biome == null) {
|
||||
return -1;
|
||||
}
|
||||
return Arrays.asList(Biome.values()).indexOf(biome);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
return -1;
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.plotsquared.bukkit.util.block;
|
||||
|
||||
import com.intellectualcrafters.plot.util.PlotChunk;
|
||||
import com.intellectualcrafters.plot.util.SetQueue;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import org.bukkit.Chunk;
|
||||
|
||||
public class FastChunk_1_9 extends PlotChunk<Chunk> {
|
||||
|
||||
public FastChunk_1_9(SetQueue.ChunkWrapper wrap) {
|
||||
super(wrap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAbs() {
|
||||
SetQueue.ChunkWrapper loc = getChunkWrapper();
|
||||
return BukkitUtil.getWorld(loc.world).getChunkAt(loc.x, loc.z);
|
||||
}
|
||||
|
||||
@Override public void setBlock(int x, int y, int z, int id, byte data) {
|
||||
|
||||
}
|
||||
|
||||
@Override public void setBiome(int x, int z, int biome) {
|
||||
|
||||
}
|
||||
|
||||
@Override public PlotChunk clone() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public PlotChunk shallowClone() {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -49,11 +49,8 @@ public class FastQueue_1_8_3 extends SlowQueue {
|
||||
private final RefClass classBlockPosition = getRefClass("{nms}.BlockPosition");
|
||||
private final RefClass classChunkSection = getRefClass("{nms}.ChunkSection");
|
||||
public HashMap<ChunkWrapper, Chunk> toUpdate = new HashMap<>();
|
||||
private RefMethod methodGetHandlePlayer;
|
||||
private RefMethod methodGetHandleChunk;
|
||||
private RefConstructor MapChunk;
|
||||
private RefField connection;
|
||||
private RefMethod send;
|
||||
private RefMethod methodInitLighting;
|
||||
private RefConstructor classBlockPositionConstructor;
|
||||
private RefConstructor classChunkSectionConstructor;
|
||||
@ -64,12 +61,9 @@ public class FastQueue_1_8_3 extends SlowQueue {
|
||||
private RefMethod methodGetIdArray;
|
||||
|
||||
public FastQueue_1_8_3() throws NoSuchMethodException, RuntimeException {
|
||||
methodGetHandlePlayer = classCraftPlayer.getMethod("getHandle");
|
||||
methodGetHandleChunk = classCraftChunk.getMethod("getHandle");
|
||||
methodInitLighting = classChunk.getMethod("initLighting");
|
||||
MapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), boolean.class, int.class);
|
||||
connection = classEntityPlayer.getField("playerConnection");
|
||||
send = classConnection.getMethod("sendPacket", classPacket.getRealClass());
|
||||
classBlockPositionConstructor = classBlockPosition.getConstructor(int.class, int.class, int.class);
|
||||
methodX = classWorld.getMethod("x", classBlockPosition.getRealClass());
|
||||
fieldSections = classChunk.getField("sections");
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.plotsquared.bukkit.util.block;
|
||||
|
||||
import com.intellectualcrafters.plot.util.PlotChunk;
|
||||
import com.intellectualcrafters.plot.util.SetQueue;
|
||||
import org.bukkit.Chunk;
|
||||
|
||||
public class FastQueue_1_9 extends SlowQueue {
|
||||
|
||||
@Override public PlotChunk<Chunk> getChunk(SetQueue.ChunkWrapper wrap) {
|
||||
return new FastChunk_1_9(wrap);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user