diff --git a/src/main/java/eu/m724/tweaks/worldborder/WorldBorderExpanderListener.java b/src/main/java/eu/m724/tweaks/worldborder/WorldBorderExpanderListener.java index 3c4bc45..e94051c 100644 --- a/src/main/java/eu/m724/tweaks/worldborder/WorldBorderExpanderListener.java +++ b/src/main/java/eu/m724/tweaks/worldborder/WorldBorderExpanderListener.java @@ -17,6 +17,13 @@ public class WorldBorderExpanderListener implements Listener { public void onWorldLoad(WorldLoadEvent event) { ServerLevel level = ((CraftWorld) event.getWorld()).getHandle(); + if (level.getWorldBorder().getSize() < 5.9999968E7D) { + // if the world border was modified we don't touch it + return; + } + level.getWorldBorder().setAbsoluteMaxSize(30000000); + // to align with player hitbox because player can't go beyond 30m - 1 and player's hitbox is 0.6 wide so we make it "hug" the border + level.getWorldBorder().setSize(59999998.6); } }