Make teleport centered

This commit is contained in:
Allink 2022-05-17 17:08:11 +01:00
parent c42e41b98f
commit fbc5958947
No known key found for this signature in database
GPG key ID: 7F1F1B98F0FAAD13

View file

@ -184,7 +184,7 @@ public final class EntitySpawn implements Listener {
final WorldBorder worldBorder = world.getWorldBorder();
if (PLUGIN.getConfig().getBoolean("randomizeSpawn") && event.getPlayer().getBedSpawnLocation() != event.getSpawnLocation()) {
event.setSpawnLocation(new Location(world, RANDOM.nextDouble(-300000000D, 30000000D), 100D, RANDOM.nextDouble(-300000000D, 30000000D)));
event.setSpawnLocation(new Location(world, RANDOM.nextDouble(-300000000D, 30000000D) + .5, 100D, RANDOM.nextDouble(-300000000D, 30000000D) + .5));
}
}