mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix SO
This commit is contained in:
parent
a843203ca3
commit
6ec96870c0
@ -544,7 +544,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
return;
|
||||
}
|
||||
Integer border = area.getBorder();
|
||||
if (x2 > border) {
|
||||
if (x2 > border && this.tmpTeleport) {
|
||||
to.setX(x2 - 1);
|
||||
this.tmpTeleport = false;
|
||||
player.teleport(event.getTo());
|
||||
@ -552,7 +552,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
MainUtil.sendMessage(pp, C.BORDER);
|
||||
return;
|
||||
}
|
||||
if (x2 < -border) {
|
||||
if (x2 < -border && this.tmpTeleport) {
|
||||
to.setX(x2 + 1);
|
||||
this.tmpTeleport = false;
|
||||
player.teleport(event.getTo());
|
||||
@ -606,13 +606,13 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
return;
|
||||
}
|
||||
Integer border = area.getBorder();
|
||||
if (z2 > border) {
|
||||
if (z2 > border && this.tmpTeleport) {
|
||||
to.setZ(z2 - 1);
|
||||
this.tmpTeleport = false;
|
||||
player.teleport(event.getTo());
|
||||
this.tmpTeleport = true;
|
||||
MainUtil.sendMessage(pp, C.BORDER);
|
||||
} else if (z2 < -border) {
|
||||
} else if (z2 < -border && this.tmpTeleport) {
|
||||
to.setZ(z2 + 1);
|
||||
this.tmpTeleport = false;
|
||||
player.teleport(event.getTo());
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.plotsquared.bukkit.util.block;
|
||||
|
||||
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
|
||||
|
||||
import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
import com.intellectualcrafters.plot.object.ChunkWrapper;
|
||||
import com.intellectualcrafters.plot.object.PseudoRandom;
|
||||
@ -11,11 +9,6 @@ import com.intellectualcrafters.plot.util.ReflectionUtils;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.block.BasicLocalBlockQueue;
|
||||
import com.plotsquared.bukkit.util.SendChunk;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
@ -25,6 +18,13 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
|
||||
|
||||
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
|
||||
|
||||
public class BukkitLocalQueue_1_8_3 extends BukkitLocalQueue<char[]> {
|
||||
|
||||
@ -276,7 +276,7 @@ public class BukkitLocalQueue_1_8_3 extends BukkitLocalQueue<char[]> {
|
||||
Field tileEntities = clazz.getDeclaredField("tileEntities");
|
||||
Field entitySlices = clazz.getDeclaredField("entitySlices");
|
||||
Object[] sections = (Object[]) sections1.get(c);
|
||||
HashMap<?, ?> tiles = (HashMap<?, ?>) tileEntities.get(c);
|
||||
Map<?, ?> tiles = (Map<?, ?>) tileEntities.get(c);
|
||||
Collection<?>[] entities = (Collection<?>[]) entitySlices.get(c);
|
||||
|
||||
Method getX = null;
|
||||
|
@ -9,7 +9,6 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@ -254,7 +253,7 @@ public class BukkitLocalQueue_1_9 extends BukkitLocalQueue<char[]> {
|
||||
Field tf = clazz.getDeclaredField("tileEntities");
|
||||
Field entitySlices = clazz.getDeclaredField("entitySlices");
|
||||
Object[] sections = (Object[]) sf.get(c);
|
||||
HashMap<?, ?> tiles = (HashMap<?, ?>) tf.get(c);
|
||||
Map<?, ?> tiles = (Map<?, ?>) tf.get(c);
|
||||
Collection<?>[] entities = (Collection<?>[]) entitySlices.get(c);
|
||||
|
||||
Method xm = null;
|
||||
|
Loading…
Reference in New Issue
Block a user