feat: 独立Bukkit插件部分 完善console输出 完善format格式化

This commit is contained in:
coding
2017-10-26 16:40:01 +00:00
parent e387863061
commit c7293370ea
22 changed files with 663 additions and 654 deletions

View File

@ -20,6 +20,7 @@
this.log = function () {
log.info(this.name + Array.prototype.join.call(arguments, ' '));
};
this.info = this.log;
this.warn = function () {
log.warning(this.name + Array.prototype.join.call(arguments, ' '));
};
@ -71,9 +72,9 @@
}
track.forEach(function (stack) {
if (stack.className.startsWith('<')) {
this.console(String.format(' §e位于 §c%s => §c%s §4行%s', stack.fileName, stack.methodName, stack.lineNumber));
this.console(' §e位于 §c%s => §c%s §4行%s'.format(stack.fileName, stack.methodName, stack.lineNumber));
} else {
this.console(String.format(' §e位于 §c%s.%s(§4%s:%s§c)', stack.className, stack.methodName, stack.fileName, stack.lineNumber));
this.console(' §e位于 §c%s.%s(§4%s:%s§c)'.format(stack.className, stack.methodName, stack.fileName, stack.lineNumber));
}
}.bind(this));
}