3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

SPIGOT-1499: Outdated server message not working

Dieser Commit ist enthalten in:
md_5 2016-02-21 19:22:37 +11:00 committet von Zach Brown
Ursprung 4c5668268b
Commit e51180b777
2 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From 746ebed064e6b6e4ed3cb8dea091883103e34faa Mon Sep 17 00:00:00 2001
From 172258793066b82c106ae96b396420d0872326cb Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 19:21:58 +1000
Subject: [PATCH] Configurable Messages
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index 2d937c1..53823c6 100644
index 2d937c1..a1cae86 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -62,11 +62,11 @@ public class HandshakeListener implements PacketHandshakingInListener {
@ -13,17 +13,17 @@ index 2d937c1..53823c6 100644
if (packethandshakinginsetprotocol.b() > 47) {
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.8");
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8.8" ) ); // Spigot
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), "1.8.8" ) ); // Spigot
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
this.b.close(chatcomponenttext);
} else if (packethandshakinginsetprotocol.b() < 47) {
- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8.8");
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8.8" ) ); // Spigot
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), "1.8.8" ) ); // Spigot
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
this.b.close(chatcomponenttext);
} else {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 3838c75..49b908d 100644
index dd3ccd9..4050dba 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -418,7 +418,7 @@ public abstract class PlayerList {
@ -45,7 +45,7 @@ index 3838c75..49b908d 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5ef5f5a..ff60351 100644
index 3be88a3..c0f1d3c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -623,11 +623,7 @@ public final class CraftServer implements Server {
@ -103,5 +103,5 @@ index ca001e9..3726ea5 100644
+ }
}
--
2.1.4
2.5.0

Datei anzeigen

@ -1,4 +1,4 @@
From 0204f55807902b26e73cbeacf9cc7b35e663feac Mon Sep 17 00:00:00 2001
From 39d77ba60351ae8c806c79b5c5d88a2aad25e58d Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Sun, 20 Apr 2014 13:18:55 +0100
Subject: [PATCH] Convert player skulls async
@ -195,7 +195,7 @@ index 0048b65..58014c5 100644
public int getSkullType() {
return this.a;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index ead8a98..ce5425f 100644
index 8355d6c..ee78d00 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -68,13 +68,27 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@ -206,7 +206,7 @@ index ead8a98..ce5425f 100644
+ void applyToItem(final NBTTagCompound tag) { // Spigot - make final
super.applyToItem(tag);
if (hasOwner()) {
if (profile != null) {
NBTTagCompound owner = new NBTTagCompound();
GameProfileSerializer.serialize(owner, profile);
- tag.set(SKULL_OWNER.NBT, owner);
@ -229,5 +229,5 @@ index ead8a98..ce5425f 100644
}
--
2.1.4
2.5.0