Don't spam warnings when Mojang's API goes down. (Which happens a lot)
Dieser Commit ist enthalten in:
Ursprung
98825a6430
Commit
5f03f206c3
@ -1,4 +1,4 @@
|
||||
From d303eb8ffc3f82badc690c1bad71782f0d5f7b57 Mon Sep 17 00:00:00 2001
|
||||
From 2734342f54016d2ca4440bd07ed371a6458f5ccc Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||
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..bc949a1
|
||||
index 0000000..a284768
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/HeadConverter.java
|
||||
@@ -0,0 +1,163 @@
|
||||
@@ -0,0 +1,168 @@
|
||||
+package org.spigotmc;
|
||||
+
|
||||
+import com.google.common.base.Charsets;
|
||||
@ -148,6 +148,7 @@ index 0000000..bc949a1
|
||||
+ .setNameFormat( "Head Conversion Thread - %1$d" )
|
||||
+ .build()
|
||||
+ );
|
||||
+ private static boolean hasWarned = false;
|
||||
+
|
||||
+ public static void convertHead(final TileEntitySkull head)
|
||||
+ {
|
||||
@ -267,7 +268,11 @@ index 0000000..bc949a1
|
||||
+ e.printStackTrace();
|
||||
+ } catch ( IOException e )
|
||||
+ {
|
||||
+ Bukkit.getLogger().warning( "Error connecting to Mojang servers, cannot convert player heads" );
|
||||
+ if (!hasWarned)
|
||||
+ {
|
||||
+ hasWarned = true;
|
||||
+ Bukkit.getLogger().warning( "Error connecting to Mojang servers, cannot convert player heads" );
|
||||
+ }
|
||||
+ } finally
|
||||
+ {
|
||||
+ if ( connection != null )
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren