From 8251b2f5d49c78018229bcdc6f914a67d14f2303 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 7 Sep 2016 21:29:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=A6=E6=88=AA=E7=B1=BB=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../java/pw/yumc/YumCore/bukkit/compatible/C.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 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 f3fe36e..6c30716 100644 --- a/src/main/java/pw/yumc/YumCore/bukkit/compatible/C.java +++ b/src/main/java/pw/yumc/YumCore/bukkit/compatible/C.java @@ -52,7 +52,7 @@ public class C { getHandle = typeCraftPlayer.getMethod("getHandle"); playerConnection = typeNMSPlayer.getField("playerConnection"); sendPacket = typePlayerConnection.getMethod("sendPacket", Class.forName(a("Packet"))); - } catch (final Exception e) { + } catch (final Throwable e) { Log.warning(C.class.getSimpleName() + " 兼容性工具初始化失败 可能造成部分功能不可用!"); e.printStackTrace(); } @@ -144,7 +144,8 @@ public class C { } while (time > 0); } - }).start();; + }).start(); + ; } /** @@ -337,7 +338,11 @@ public class C { Object packet = null; // Send if set if ((fadeInTime != -1) && (fadeOutTime != -1) && (stayTime != -1)) { - packet = packetTitle.getConstructor(packetActions, nmsIChatBaseComponent, Integer.TYPE, Integer.TYPE, Integer.TYPE).newInstance(actions[2], null, fadeInTime * 20, stayTime * 20, fadeOutTime * 20); + packet = packetTitle.getConstructor(packetActions, nmsIChatBaseComponent, Integer.TYPE, Integer.TYPE, Integer.TYPE).newInstance(actions[2], + null, + fadeInTime * 20, + stayTime * 20, + fadeOutTime * 20); sendPacket.invoke(connection, packet); } // Send title