Don't allow 1.8 clients to join...
they crash when encountering 1.8 blocks/items/etc
Dieser Commit ist enthalten in:
Ursprung
8c8900b752
Commit
c1d8afce9b
@ -1,4 +1,4 @@
|
||||
From 8f6c0f5ec64da2c1ac31fc0b2edfd0188185a06e Mon Sep 17 00:00:00 2001
|
||||
From ffe49c3d17d1d1fb36e483d72f25c20684bd25a9 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <Zbob750@live.com>
|
||||
Date: Sun, 7 Sep 2014 15:45:58 -0500
|
||||
Subject: [PATCH] Implement a few 1.8 features
|
||||
@ -397,6 +397,25 @@ index 381ae78..e72e4e1 100644
|
||||
}
|
||||
|
||||
protected Item getLoot() {
|
||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
index e0a1708..49568ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
@@ -72,7 +72,13 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- if (packethandshakinginsetprotocol.d() > 5 && packethandshakinginsetprotocol.d() != 47) { // Spigot
|
||||
+ // PaperSpigot start - DC non-1.8 clients
|
||||
+ if (packethandshakinginsetprotocol.d() != 47) {
|
||||
+ chatcomponenttext = new ChatComponentText( "You must join using a 1.8 client!" );
|
||||
+ this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]);
|
||||
+ this.b.close(chatcomponenttext);
|
||||
+ } else if (packethandshakinginsetprotocol.d() > 5 && packethandshakinginsetprotocol.d() != 47) { // Spigot
|
||||
+ // PaperSpigot end
|
||||
chatcomponenttext = new ChatComponentText( org.spigotmc.SpigotConfig.outdatedServerMessage ); // Spigot
|
||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]);
|
||||
this.b.close(chatcomponenttext);
|
||||
diff --git a/src/main/java/net/minecraft/server/Item.java b/src/main/java/net/minecraft/server/Item.java
|
||||
index 4382f1a..7493e42 100644
|
||||
--- a/src/main/java/net/minecraft/server/Item.java
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren