Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/ By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
35
paper-server/nms-patches/LoginListener.patch
Normal file
35
paper-server/nms-patches/LoginListener.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
--- ../work/decompile-bb26c12b/net/minecraft/server/LoginListener.java 2014-11-27 08:59:46.797421424 +1100
|
||||
+++ src/main/java/net/minecraft/server/LoginListener.java 2014-11-27 08:42:10.172850872 +1100
|
||||
@@ -26,6 +26,7 @@
|
||||
private GameProfile i;
|
||||
private String j;
|
||||
private SecretKey loginKey;
|
||||
+ public String hostname = ""; // CraftBukkit - add field
|
||||
|
||||
public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) {
|
||||
this.g = EnumProtocolState.HELLO;
|
||||
@@ -64,10 +65,12 @@
|
||||
this.i = this.a(this.i);
|
||||
}
|
||||
|
||||
- String s = this.server.getPlayerList().attemptLogin(this.networkManager.getSocketAddress(), this.i);
|
||||
+ // CraftBukkit start - fire PlayerLoginEvent
|
||||
+ EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname);
|
||||
|
||||
- if (s != null) {
|
||||
- this.disconnect(s);
|
||||
+ if (s == null) {
|
||||
+ // this.disconnect(s);
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
this.g = EnumProtocolState.ACCEPTED;
|
||||
if (this.server.aI() >= 0 && !this.networkManager.c()) {
|
||||
@@ -75,7 +78,7 @@
|
||||
}
|
||||
|
||||
this.networkManager.handle(new PacketLoginOutSuccess(this.i));
|
||||
- this.server.getPlayerList().a(this.networkManager, this.server.getPlayerList().processLogin(this.i));
|
||||
+ this.server.getPlayerList().a(this.networkManager, this.server.getPlayerList().processLogin(this.i, s)); // CraftBukkit - add player reference
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user