From d49f6457271c221e1e47899e7bfc0d4535f3a9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8F=E9=BB=91?= Date: Thu, 11 Jul 2019 16:34:59 +0800 Subject: [PATCH] Update TLocale --- .../io/izzel/taboolib/module/locale/TLocale.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java b/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java index 390c615..851bb26 100644 --- a/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java @@ -27,6 +27,10 @@ public class TLocale { throw new AssertionError(); } + static void sendTo(String path, CommandSender sender, String[] args, Class callerClass) { + TLocaleLoader.sendTo(Ref.getCallerPlugin(callerClass), path, sender, args); + } + static String asString(String path, Class callerClass, String... args) { return TLocaleLoader.asString(Ref.getCallerPlugin(callerClass), path, args); } @@ -35,20 +39,12 @@ public class TLocale { return TLocaleLoader.asStringList(Ref.getCallerPlugin(callerClass), path, args); } - private static void sendTo(String path, CommandSender sender, String[] args, Class callerClass) { - TLocaleLoader.sendTo(Ref.getCallerPlugin(callerClass), path, sender, args); - } - - public static void sendToConsole(String path, String... args) { - Ref.getCallerClass(3).ifPresent(clazz -> sendTo(path, Bukkit.getConsoleSender(), args, clazz)); - } - public static void sendTo(CommandSender sender, String path, String... args) { Ref.getCallerClass(3).ifPresent(clazz -> sendTo(path, sender, args, clazz)); } - public static void sendTo(String path, CommandSender sender, String... args) { - Ref.getCallerClass(3).ifPresent(clazz -> sendTo(path, sender, args, clazz)); + public static void sendToConsole(String path, String... args) { + Ref.getCallerClass(3).ifPresent(clazz -> sendTo(path, Bukkit.getConsoleSender(), args, clazz)); } public static void broadcast(String path, String... args) {