Don't convert skulls if the request fails for some reason

This commit is contained in:
Thinkofdeath 2014-04-10 21:12:49 +01:00
parent a67082c90e
commit 63233d4a0e

View File

@ -1,4 +1,4 @@
From c0929058940f075b24985d67861f7adb2cd4d739 Mon Sep 17 00:00:00 2001 From eb8cdddd79ecd5713472caac985feb874c8e9950 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com> From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Wed, 9 Apr 2014 13:29:57 +0100 Date: Wed, 9 Apr 2014 13:29:57 +0100
Subject: [PATCH] Convert player heads async Subject: [PATCH] Convert player heads async
@ -112,10 +112,10 @@ index b241cfe..925e017 100644
public Packet getUpdatePacket() { public Packet getUpdatePacket() {
diff --git a/src/main/java/org/spigotmc/HeadConverter.java b/src/main/java/org/spigotmc/HeadConverter.java diff --git a/src/main/java/org/spigotmc/HeadConverter.java b/src/main/java/org/spigotmc/HeadConverter.java
new file mode 100644 new file mode 100644
index 0000000..3c522d9 index 0000000..8cf9162
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/HeadConverter.java +++ b/src/main/java/org/spigotmc/HeadConverter.java
@@ -0,0 +1,159 @@ @@ -0,0 +1,164 @@
+package org.spigotmc; +package org.spigotmc;
+ +
+import com.google.common.base.Charsets; +import com.google.common.base.Charsets;
@ -223,6 +223,11 @@ index 0000000..3c522d9
+ gameProfile.getName() ); + gameProfile.getName() );
+ MinecraftServer.getServer().newSessionService.fillProfileProperties( newStyleProfile ); + MinecraftServer.getServer().newSessionService.fillProfileProperties( newStyleProfile );
+ +
+ if ( newStyleProfile.getProperties().size() < 1)
+ {
+ return;
+ }
+
+ +
+ for ( String key : newStyleProfile.getProperties().keys() ) + for ( String key : newStyleProfile.getProperties().keys() )
+ { + {