diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 6b6ea3a..29953ea 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fa0d17b..e0b3fb8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sat Mar 02 13:40:08 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/src/main/scala/com/ilummc/tlib/bungee/api/chat/TranslatableComponent.java b/src/main/scala/com/ilummc/tlib/bungee/api/chat/TranslatableComponent.java index 796b749..23e3864 100644 --- a/src/main/scala/com/ilummc/tlib/bungee/api/chat/TranslatableComponent.java +++ b/src/main/scala/com/ilummc/tlib/bungee/api/chat/TranslatableComponent.java @@ -69,11 +69,11 @@ public final class TranslatableComponent extends BaseComponent { * Creates a translatable component with the passed substitutions * * @param translate the translation key - * @param with the {@link java.lang.String}s and + * @param with the {@link String}s and * {@link BaseComponent}s to use into the * translation * @see #translate - * @see #setWith(java.util.List) + * @see #setWith(List) */ public TranslatableComponent(String translate, Object... with) { setTranslate(translate); diff --git a/src/main/scala/me/skymc/taboolib/bstats/Metrics.java b/src/main/scala/me/skymc/taboolib/bstats/Metrics.java index 3685992..89db7bf 100644 --- a/src/main/scala/me/skymc/taboolib/bstats/Metrics.java +++ b/src/main/scala/me/skymc/taboolib/bstats/Metrics.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.*; import java.util.concurrent.Callable; import java.util.logging.Level; @@ -171,7 +172,7 @@ public class Metrics { } ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); GZIPOutputStream gzip = new GZIPOutputStream(outputStream); - gzip.write(str.getBytes("UTF-8")); + gzip.write(str.getBytes(StandardCharsets.UTF_8)); gzip.close(); return outputStream.toByteArray(); } @@ -262,7 +263,7 @@ public class Metrics { playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed } int onlineMode = Bukkit.getOnlineMode() ? 1 : 0; - String bukkitVersion = org.bukkit.Bukkit.getVersion(); + String bukkitVersion = Bukkit.getVersion(); bukkitVersion = bukkitVersion.substring(bukkitVersion.indexOf("MC: ") + 4, bukkitVersion.length() - 1); // OS/Java specific data diff --git a/src/main/scala/me/skymc/taboolib/listener/TListenerHandler.java b/src/main/scala/me/skymc/taboolib/listener/TListenerHandler.java index 4471817..f79bbe0 100644 --- a/src/main/scala/me/skymc/taboolib/listener/TListenerHandler.java +++ b/src/main/scala/me/skymc/taboolib/listener/TListenerHandler.java @@ -47,7 +47,7 @@ public class TListenerHandler implements Listener { */ public static void setupListener(Plugin plugin) { for (Class pluginClass : TabooLibLoader.getPluginClassSafely(plugin)) { - if (org.bukkit.event.Listener.class.isAssignableFrom(pluginClass) && pluginClass.isAnnotationPresent(TListener.class)) { + if (Listener.class.isAssignableFrom(pluginClass) && pluginClass.isAnnotationPresent(TListener.class)) { try { TListener tListener = pluginClass.getAnnotation(TListener.class); // 检查注册条件