mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Added useExactLoginLocation(). Closes BUKKIT-145
useExactLoginLocation() looks for settings.use-exact-login-location within bukkit.yml. If true, we will bypass Vanilla's behaviour of checking for collisions and moving the player if needed when they login. If false, we will continue to follow Vanilla's behaviour and move players that 'collide' with objects when they login.
This commit is contained in:
1 parent
c5a4bfd291
commit
f1a35effb0
3 files changed
+12
-3
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user