@@ -85,7 +85,7 @@
|
||||
+ // CraftBukkit end
|
||||
StringReader stringreader = new StringReader(s);
|
||||
|
||||
if (stringreader.canRead() && stringreader.peek() == 47) {
|
||||
if(stringreader.canRead() && stringreader.peek() == 47) {
|
||||
@@ -128,7 +182,6 @@
|
||||
byte b0;
|
||||
|
||||
@@ -104,22 +104,22 @@
|
||||
+ return b0;
|
||||
} catch (CommandSyntaxException commandsyntaxexception) {
|
||||
commandlistenerwrapper.sendFailureMessage(ChatComponentUtils.a(commandsyntaxexception.getRawMessage()));
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
if(commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
- IChatBaseComponent ichatbasecomponent = (new ChatComponentText("")).a(EnumChatFormat.GRAY).a((chatmodifier) -> {
|
||||
- chatmodifier.setChatClickable(new ChatClickable(ChatClickable.EnumClickAction.SUGGEST_COMMAND, s));
|
||||
- });
|
||||
|
||||
+ chatcomponenttext = new ChatComponentText("");
|
||||
if (j > 10) {
|
||||
if(j > 10) {
|
||||
- ichatbasecomponent.a("...");
|
||||
+ chatcomponenttext.a("...");
|
||||
}
|
||||
|
||||
- ichatbasecomponent.a(commandsyntaxexception.getInput().substring(Math.max(0, j - 10), j));
|
||||
+ chatcomponenttext.a(commandsyntaxexception.getInput().substring(Math.max(0, j - 10), j));
|
||||
if (j < commandsyntaxexception.getInput().length()) {
|
||||
- IChatBaseComponent ichatbasecomponent1 = (new ChatComponentText(commandsyntaxexception.getInput().substring(j))).a(new EnumChatFormat[] { EnumChatFormat.RED, EnumChatFormat.UNDERLINE});
|
||||
if(j < commandsyntaxexception.getInput().length()) {
|
||||
- IChatBaseComponent ichatbasecomponent1 = (new ChatComponentText(commandsyntaxexception.getInput().substring(j))).a(new EnumChatFormat[]{EnumChatFormat.RED, EnumChatFormat.UNDERLINE});
|
||||
+ ChatComponentText chatcomponenttext1 = new ChatComponentText(commandsyntaxexception.getInput().substring(j));
|
||||
|
||||
- ichatbasecomponent.addSibling(ichatbasecomponent1);
|
||||
@@ -128,7 +128,7 @@
|
||||
+ chatcomponenttext.addSibling(chatcomponenttext1);
|
||||
}
|
||||
|
||||
- ichatbasecomponent.addSibling((new ChatMessage("command.context.here", new Object[0])).a(new EnumChatFormat[] { EnumChatFormat.RED, EnumChatFormat.ITALIC}));
|
||||
- ichatbasecomponent.addSibling((new ChatMessage("command.context.here", new Object[0])).a(new EnumChatFormat[]{EnumChatFormat.RED, EnumChatFormat.ITALIC}));
|
||||
- commandlistenerwrapper.sendFailureMessage(ichatbasecomponent);
|
||||
+ ChatMessage chatmessage = new ChatMessage("command.context.here", new Object[0]);
|
||||
+
|
||||
@@ -147,17 +147,17 @@
|
||||
- chatcomponenttext = new ChatComponentText;
|
||||
- }
|
||||
-
|
||||
- chatcomponenttext.<init>(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
||||
- chatcomponenttext.<init>(exception.getMessage() == null?exception.getClass().getName():exception.getMessage());
|
||||
- ChatComponentText chatcomponenttext1 = chatcomponenttext;
|
||||
+ ChatMessage chatmessage1 = new ChatMessage("command.failed", new Object[0]);
|
||||
|
||||
- if (CommandDispatcher.a.isDebugEnabled()) {
|
||||
- if(CommandDispatcher.a.isDebugEnabled()) {
|
||||
- StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
||||
+ chatcomponenttext = new ChatComponentText(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
||||
+ if (CommandDispatcher.a.isDebugEnabled()) {
|
||||
+ StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
||||
|
||||
- for (int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
||||
- for(int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
||||
- chatcomponenttext1.a("\n\n").a(astacktraceelement[k].getMethodName()).a("\n ").a(astacktraceelement[k].getFileName()).a(":").a(String.valueOf(astacktraceelement[k].getLineNumber()));
|
||||
+ for (int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
||||
+ chatcomponenttext.a("\n\n" + astacktraceelement[k].getMethodName() + "\n " + astacktraceelement[k].getFileName() + ":" + astacktraceelement[k].getLineNumber());
|
||||
|
||||
Reference in New Issue
Block a user