The Vanilla worldborder uses the diameter, not the radius

This commit is contained in:
Max Lee 2016-07-09 16:52:26 +02:00 committed by GitHub
parent 827189d96a
commit 094675d1cd

View File

@ -629,10 +629,10 @@ public class RandomTeleport extends JavaPlugin implements CommandExecutor {
} }
org.bukkit.WorldBorder wb = world.getWorldBorder(); org.bukkit.WorldBorder wb = world.getWorldBorder();
double wbMaxX = wb.getCenter().getX() + wb.getSize(); double wbMaxX = wb.getCenter().getX() + wb.getSize() / 2;
double wbMinX = wb.getCenter().getX() - wb.getSize(); double wbMinX = wb.getCenter().getX() - wb.getSize() / 2;
double wbMaxZ = wb.getCenter().getZ() + wb.getSize(); double wbMaxZ = wb.getCenter().getZ() + wb.getSize() / 2;
double wbMinZ = wb.getCenter().getZ() - wb.getSize(); double wbMinZ = wb.getCenter().getZ() - wb.getSize() / 2;
if(x > wbMaxX || x < wbMinX) { if(x > wbMaxX || x < wbMinX) {
return false; return false;