This commit is contained in:
坏黑 2019-04-10 22:27:21 +08:00
commit e9d7eb967f
5 changed files with 7 additions and 7 deletions

Binary file not shown.

View File

@ -1,6 +1,5 @@
#Sat Mar 02 13:40:08 CST 2019
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

View File

@ -69,11 +69,11 @@ public final class TranslatableComponent extends BaseComponent {
* Creates a translatable component with the passed substitutions * Creates a translatable component with the passed substitutions
* *
* @param translate the translation key * @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 * {@link BaseComponent}s to use into the
* translation * translation
* @see #translate * @see #translate
* @see #setWith(java.util.List) * @see #setWith(List)
*/ */
public TranslatableComponent(String translate, Object... with) { public TranslatableComponent(String translate, Object... with) {
setTranslate(translate); setTranslate(translate);

View File

@ -17,6 +17,7 @@ import java.io.IOException;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.*; import java.util.*;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.logging.Level; import java.util.logging.Level;
@ -171,7 +172,7 @@ public class Metrics {
} }
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
GZIPOutputStream gzip = new GZIPOutputStream(outputStream); GZIPOutputStream gzip = new GZIPOutputStream(outputStream);
gzip.write(str.getBytes("UTF-8")); gzip.write(str.getBytes(StandardCharsets.UTF_8));
gzip.close(); gzip.close();
return outputStream.toByteArray(); return outputStream.toByteArray();
} }
@ -262,7 +263,7 @@ public class Metrics {
playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed
} }
int onlineMode = Bukkit.getOnlineMode() ? 1 : 0; 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); bukkitVersion = bukkitVersion.substring(bukkitVersion.indexOf("MC: ") + 4, bukkitVersion.length() - 1);
// OS/Java specific data // OS/Java specific data

View File

@ -47,7 +47,7 @@ public class TListenerHandler implements Listener {
*/ */
public static void setupListener(Plugin plugin) { public static void setupListener(Plugin plugin) {
for (Class<?> pluginClass : TabooLibLoader.getPluginClassSafely(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 { try {
TListener tListener = pluginClass.getAnnotation(TListener.class); TListener tListener = pluginClass.getAnnotation(TListener.class);
// 检查注册条件 // 检查注册条件