1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-22 01:48:50 +00:00

feat: 添加插件前缀设置

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-30 23:07:19 +08:00
parent f5a9fc1131
commit ca367d1eaa

View File

@ -17,8 +17,8 @@ import org.bukkit.command.CommandSender;
public class Log { public class Log {
private static boolean debug = new File(String.format("plugins%1$sYumCore%1$sdebug", File.separatorChar)).exists(); private static boolean debug = new File(String.format("plugins%1$sYumCore%1$sdebug", File.separatorChar)).exists();
private static final Logger logger = P.instance.getLogger(); private static final Logger logger = P.instance.getLogger();
private static final String prefix = String.format("§6[§b%s§6]§r ", P.instance.getName());
private static final CommandSender console = Bukkit.getConsoleSender(); private static final CommandSender console = Bukkit.getConsoleSender();
private static String prefix = String.format("§6[§b%s§6]§r ", P.instance.getName());
private Log() { private Log() {
} }
@ -240,6 +240,14 @@ public class Log {
logger.log(level, msg, thrown); logger.log(level, msg, thrown);
} }
/**
* @param prefix
* 插件前缀
*/
public static void setPrefix(final String prefix) {
Log.prefix = prefix;
}
/** /**
* Log a SEVERE message. * Log a SEVERE message.
* <p> * <p>