SPIGOT-1499: Outdated server message not working

This commit is contained in:
md_5 2016-02-21 19:22:37 +11:00
parent fbdb33981e
commit 02af1ff93f
2 changed files with 3 additions and 3 deletions

View file

@ -13,12 +13,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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 {

View file

@ -206,7 +206,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ 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);