From fed4b94a8dda0ed363d03f1c9ec6c4564ef5b156 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Mon, 19 Sep 2016 16:49:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E8=88=AC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../pw/yumc/YumCore/bukkit/compatible/C.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/bukkit/compatible/C.java b/src/main/java/pw/yumc/YumCore/bukkit/compatible/C.java index 9713a53..669542d 100644 --- a/src/main/java/pw/yumc/YumCore/bukkit/compatible/C.java +++ b/src/main/java/pw/yumc/YumCore/bukkit/compatible/C.java @@ -6,7 +6,6 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collection; import java.util.UUID; -import java.util.logging.Level; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -58,6 +57,9 @@ public class C { } } + private C() { + } + public static String a(final String str) { return "net.minecraft.server." + version + "." + str; } @@ -76,6 +78,9 @@ public class C { } public static class ActionBar { + private ActionBar() { + } + /** * 公告发送ActionBar * @@ -108,6 +113,7 @@ public class C { try { Thread.sleep(1000); } catch (final InterruptedException e) { + // Ignore } time--; } while (time > 0); @@ -139,12 +145,13 @@ public class C { try { Thread.sleep(1000); } catch (final InterruptedException e) { + // Ignore } time--; } while (time > 0); } - }).start();; + }).start(); } /** @@ -168,7 +175,7 @@ public class C { final Object connection = playerConnection.get(player); sendPacket.invoke(connection, packet); } catch (final Exception ex) { - Log.log(Level.SEVERE, "ActionBar发包错误 %s " + version, ex); + Log.debug("ActionBar发包错误 " + version, ex); } } @@ -192,6 +199,7 @@ public class C { try { Thread.sleep(1000); } catch (final InterruptedException e) { + // Ignore } time--; } while (time > 0); @@ -210,9 +218,7 @@ public class C { private static Class gameProfileClass; private static Constructor gameProfileConstructor; private static Constructor craftOfflinePlayerConstructor; - private static Method getOnlinePlayers; - static { try { // getOnlinePlayers start @@ -250,6 +256,9 @@ public class C { } } + private Player() { + } + /** * 获取离线玩家(跳过网络获取) * @@ -282,6 +291,9 @@ public class C { } public static class Title { + private Title() { + } + /** * 发送Title公告 * @@ -407,7 +419,7 @@ public class C { sendPacket.invoke(connection, packet); } } catch (final Exception e) { - e.printStackTrace(); + Log.debug(e); } } }