From 9fc464e896d091ff3f698bbbf0a4b3b62748515f Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 10 Dec 2016 00:44:42 +1100 Subject: [PATCH] Shorter border teleportation --- .../com/plotsquared/bukkit/listeners/PlayerEvents.java | 8 ++++---- .../com/intellectualcrafters/plot/object/PlotArea.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 4307b653d..5faadc20b 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -545,7 +545,7 @@ public class PlayerEvents extends PlotListener implements Listener { } Integer border = area.getBorder(); if (x2 > border) { - to.setX(border - 4); + to.setX(x2 - 1); this.tmpTeleport = false; player.teleport(event.getTo()); this.tmpTeleport = true; @@ -553,7 +553,7 @@ public class PlayerEvents extends PlotListener implements Listener { return; } if (x2 < -border) { - to.setX(-border + 4); + to.setX(x2 + 1); this.tmpTeleport = false; player.teleport(event.getTo()); this.tmpTeleport = true; @@ -607,13 +607,13 @@ public class PlayerEvents extends PlotListener implements Listener { } Integer border = area.getBorder(); if (z2 > border) { - to.setZ(border - 4); + to.setZ(z2 - 1); this.tmpTeleport = false; player.teleport(event.getTo()); this.tmpTeleport = true; MainUtil.sendMessage(pp, C.BORDER); } else if (z2 < -border) { - to.setZ(-border + 4); + to.setZ(z2 + 1); this.tmpTeleport = false; player.teleport(event.getTo()); this.tmpTeleport = true; diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/PlotArea.java b/Core/src/main/java/com/intellectualcrafters/plot/object/PlotArea.java index aff675458..b260949c4 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/PlotArea.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/PlotArea.java @@ -698,7 +698,7 @@ public abstract class PlotArea { public int getBorder() { Integer meta = (Integer) getMeta("worldBorder"); if (meta != null) { - int border = meta + 16; + int border = meta + 1; if (border == 0) { return Integer.MAX_VALUE; } else {