diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index f6595e3e70..62d370897b 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -120,11 +120,15 @@ public class ServerConfigurationManager { worldserver.chunkProviderServer.getChunkAt((int) entityplayer.locX >> 4, (int) entityplayer.locZ >> 4); - while (worldserver.a(entityplayer, entityplayer.boundingBox).size() != 0) { - entityplayer.setPosition(entityplayer.locX, entityplayer.locY + 1.0D, entityplayer.locZ); + // CraftBukkit start + if (!cserver.useExactLoginLocation()) { + while (worldserver.a(entityplayer, entityplayer.boundingBox).size() != 0) { + entityplayer.setPosition(entityplayer.locX, entityplayer.locY + 1.0D, entityplayer.locZ); + } + } else { + entityplayer.setPosition(entityplayer.locX, entityplayer.locY + entityplayer.getBukkitEntity().getEyeHeight(), entityplayer.locZ); } - // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(this.cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " joined the game."); this.cserver.getPluginManager().callEvent(playerJoinEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 5f8216f5d3..a7e98d74a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -771,6 +771,10 @@ public final class CraftServer implements Server { return this.console.allowFlight; } + public boolean useExactLoginLocation() { + return configuration.getBoolean("settings.use-exact-login-location"); + } + public ChunkGenerator getGenerator(String world) { ConfigurationSection section = configuration.getConfigurationSection("worlds"); ChunkGenerator result = null; diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml index 392ca9c0ac..cf93fab41b 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -20,6 +20,7 @@ settings: permissions-file: permissions.yml update-folder: update ping-packet-limit: 100 + use-exact-login-location: false aliases: icanhasbukkit: - version