Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -10,7 +10,7 @@
+import org.bukkit.event.player.PlayerPreLoginEvent;
+// CraftBukkit end
+
public class LoginListener implements PacketLoginInListener, ITickable {
public class LoginListener implements PacketLoginInListener {
private static final AtomicInteger b = new AtomicInteger(0);
@@ -32,6 +38,7 @@
@@ -30,7 +30,7 @@
+ public void disconnect(String s) {
+ try {
+ IChatBaseComponent ichatbasecomponent = new ChatComponentText(s);
+ LoginListener.c.info("Disconnecting {}: {}", this.c(), s);
+ LoginListener.c.info("Disconnecting {}: {}", this.d(), s);
+ this.networkManager.sendPacket(new PacketLoginOutDisconnect(ichatbasecomponent));
+ this.networkManager.close(ichatbasecomponent);
+ } catch (Exception exception) {
@@ -41,7 +41,7 @@
+
public void disconnect(IChatBaseComponent ichatbasecomponent) {
try {
LoginListener.c.info("Disconnecting {}: {}", this.c(), ichatbasecomponent.getString());
LoginListener.c.info("Disconnecting {}: {}", this.d(), ichatbasecomponent.getString());
@@ -76,10 +97,12 @@
this.i = this.a(this.i);
}
@@ -57,7 +57,7 @@
+ // CraftBukkit end
} else {
this.g = LoginListener.EnumProtocolState.ACCEPTED;
if (this.server.aw() >= 0 && !this.networkManager.isLocal()) {
if (this.server.ay() >= 0 && !this.networkManager.isLocal()) {
@@ -93,9 +116,9 @@
if (entityplayer != null) {
@@ -70,9 +70,9 @@
}
}
@@ -140,6 +163,43 @@
@@ -143,6 +166,43 @@
LoginListener.this.i = LoginListener.this.server.ap().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s, this.a());
LoginListener.this.i = LoginListener.this.server.getMinecraftSessionService().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s, this.a());
if (LoginListener.this.i != null) {
+ // CraftBukkit start - fire PlayerPreLoginEvent
+ if (!networkManager.isConnected()) {
@@ -113,8 +113,8 @@
+ // CraftBukkit end
LoginListener.c.info("UUID of player {} is {}", LoginListener.this.i.getName(), LoginListener.this.i.getId());
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else if (LoginListener.this.server.H()) {
@@ -159,6 +219,11 @@
} else if (LoginListener.this.server.isEmbeddedServer()) {
@@ -162,6 +222,11 @@
LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down", new Object[0]));
LoginListener.c.error("Couldn't verify username because servers are unavailable");
}