mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-26 04:25:28 +01:00
The Vanilla worldborder uses the diameter, not the radius
This commit is contained in:
parent
827189d96a
commit
094675d1cd
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user