From 8a1c663032c51efbaf3d0681623c1d98471f32a3 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 9 Apr 2014 20:44:07 +0100 Subject: [PATCH] Check the length of the response as the API can sometimes be incorrect --- .../0129-Convert-player-heads-async.patch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CraftBukkit-Patches/0129-Convert-player-heads-async.patch b/CraftBukkit-Patches/0129-Convert-player-heads-async.patch index 36b230cc17..277eaca9a1 100644 --- a/CraftBukkit-Patches/0129-Convert-player-heads-async.patch +++ b/CraftBukkit-Patches/0129-Convert-player-heads-async.patch @@ -1,4 +1,4 @@ -From 2734342f54016d2ca4440bd07ed371a6458f5ccc Mon Sep 17 00:00:00 2001 +From 91bdfad229c2a64a1308cb3733e11af2a88d6959 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 9 Apr 2014 13:29:57 +0100 Subject: [PATCH] Convert player heads async @@ -112,10 +112,10 @@ index b241cfe..925e017 100644 public Packet getUpdatePacket() { diff --git a/src/main/java/org/spigotmc/HeadConverter.java b/src/main/java/org/spigotmc/HeadConverter.java new file mode 100644 -index 0000000..a284768 +index 0000000..d84a862 --- /dev/null +++ b/src/main/java/org/spigotmc/HeadConverter.java -@@ -0,0 +1,168 @@ +@@ -0,0 +1,169 @@ +package org.spigotmc; + +import com.google.common.base.Charsets; @@ -200,7 +200,8 @@ index 0000000..a284768 + { + inputStreamReader.close(); + } -+ if ( response.get( "size" ).getAsInt() != 1 ) ++ if ( response.get( "size" ).getAsInt() != 1 || ++ response.getAsJsonArray( "profiles" ).size() != 1 ) + { + return; + }