From 2a02b37ac2651017df3327af7f501484d9775f69 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Apr 2014 18:04:17 +1000 Subject: [PATCH] Strip dashes when sending UUIDs to older clients. --- .../0124-Old-New-Version-Support.patch | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CraftBukkit-Patches/0124-Old-New-Version-Support.patch b/CraftBukkit-Patches/0124-Old-New-Version-Support.patch index 1decc1f25b..5bf5cee1c8 100644 --- a/CraftBukkit-Patches/0124-Old-New-Version-Support.patch +++ b/CraftBukkit-Patches/0124-Old-New-Version-Support.patch @@ -1,4 +1,4 @@ -From 465e79587b965603307f8a3497f552dd463137cc Mon Sep 17 00:00:00 2001 +From 2ef1e42e7e5489229c4c20ae2ae880fc992ca9b5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Apr 2014 15:11:15 +1000 Subject: [PATCH] Old / New Version Support. @@ -128,12 +128,15 @@ index 0000000..011a9aa + } +} diff --git a/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java b/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java -index 7bae405..edab87b 100644 +index 7bae405..5e24f7e 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java -@@ -68,6 +68,7 @@ public class PacketPlayOutNamedEntitySpawn extends Packet { +@@ -66,8 +66,9 @@ public class PacketPlayOutNamedEntitySpawn extends Packet { + packetdataserializer.b(this.a); + UUID uuid = this.b.getId(); - packetdataserializer.a(uuid == null ? "" : uuid.toString()); +- packetdataserializer.a(uuid == null ? "" : uuid.toString()); ++ packetdataserializer.a( uuid == null ? "" : ( ( packetdataserializer.version >= 5 ) ? uuid.toString() : uuid.toString().replaceAll( "-", "" ) ) ); // Spigot packetdataserializer.a(this.b.getName().length() > 16 ? this.b.getName().substring(0, 16) : this.b.getName()); // CraftBukkit - Limit name length to 16 characters + if (packetdataserializer.version >= 5 ) { // Spigot packetdataserializer.b(this.b.getProperties().size());