mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-12-22 12:48:47 +00:00
feat: 修改显示前缀
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
eaddb97888
commit
5f628e08f1
@ -25,7 +25,7 @@ import pw.yumc.YumCore.kit.LogKit;
|
||||
* @author 喵♂呜
|
||||
*/
|
||||
public class MonitorManager {
|
||||
public static String prefix = "§6[§bYum §a能耗监控§6] ";
|
||||
public static String prefix = "§6[§a能耗监控§6] ";
|
||||
private static String errMsg = prefix + "§c命令执行异常 请反馈下列信息给腐竹!";
|
||||
private static String errP = "§6插件名称: §b%s";
|
||||
private static String errN = "§6异常名称: §c%s";
|
||||
@ -75,8 +75,7 @@ public class MonitorManager {
|
||||
|
||||
public static MonitorInfo getMonitorInfo(String pname) {
|
||||
double per = 100.00;
|
||||
return new MonitorInfo(monitor.get(pname) / totalTime * per, cmd.get(pname) / totalTime * per, event.get(pname)
|
||||
/ totalTime * per, task.get(pname) / totalTime * per);
|
||||
return new MonitorInfo(monitor.get(pname) / totalTime * per, cmd.get(pname) / totalTime * per, event.get(pname) / totalTime * per, task.get(pname) / totalTime * per);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
@ -105,11 +104,7 @@ public class MonitorManager {
|
||||
int l = e.getStackTrace().length > 5 ? 5 : e.getStackTrace().length;
|
||||
for (int i = 0; i < l; i++) {
|
||||
StackTraceElement ste = e.getStackTrace()[i];
|
||||
elog(String.format(errStackTrace,
|
||||
ste.getClassName(),
|
||||
ste.getMethodName(),
|
||||
ste.getFileName(),
|
||||
ste.getLineNumber()));
|
||||
elog(String.format(errStackTrace, ste.getClassName(), ste.getMethodName(), ste.getFileName(), ste.getLineNumber()));
|
||||
}
|
||||
if (debug) {
|
||||
Log.console(devInfo);
|
||||
@ -132,12 +127,7 @@ public class MonitorManager {
|
||||
}
|
||||
|
||||
public static void sendObject(CommandSender sender) {
|
||||
sender.sendMessage(String.format("totalTime@%s monitor@%s cmd@%s event@%s task@%s",
|
||||
totalTime,
|
||||
sum(monitor.values()),
|
||||
sum(cmd.values()),
|
||||
sum(event.values()),
|
||||
sum(task.values())));
|
||||
sender.sendMessage(String.format("totalTime@%s monitor@%s cmd@%s event@%s task@%s", totalTime, sum(monitor.values()), sum(cmd.values()), sum(event.values()), sum(task.values())));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import pw.yumc.YumCore.kit.PKit;
|
||||
public class NetworkManager {
|
||||
|
||||
public static void register(Yum plugin) {
|
||||
Bukkit.getConsoleSender().sendMessage("§6[§bYum §a网络管理§6] §a注入网络管理系统 将托管服务器网络!");
|
||||
Bukkit.getConsoleSender().sendMessage("§6[§a网络管理§6] §a注入网络管理系统 将托管服务器网络!");
|
||||
ProxySelector.setDefault(new YumProxySelector(ProxySelector.getDefault(), plugin));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user