summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/CommandDispatcher.patch24
1 files changed, 15 insertions, 9 deletions
diff --git a/nms-patches/CommandDispatcher.patch b/nms-patches/CommandDispatcher.patch
index f9842a44..0c03bf60 100644
--- a/nms-patches/CommandDispatcher.patch
+++ b/nms-patches/CommandDispatcher.patch
@@ -33,7 +33,7 @@
this.b.setConsumer((commandcontext, flag, i) -> {
((CommandListenerWrapper) commandcontext.getSource()).a(commandcontext, flag, i);
});
-@@ -114,7 +126,58 @@
+@@ -114,8 +126,63 @@
}
@@ -73,6 +73,11 @@
+ }
+
public int a(CommandListenerWrapper commandlistenerwrapper, String s) {
+- String s1 = s;
++ return this.a(commandlistenerwrapper, s, s);
++ }
++
++ public int a(CommandListenerWrapper commandlistenerwrapper, String s, String label) {
+ // Some commands use the worldserver variable but we leave it full of null values,
+ // so we must temporarily populate it with the world of the commandsender
+ WorldServer[] prev = MinecraftServer.getServer().worldServer;
@@ -88,11 +93,12 @@
+ }
+ server.worldServer[pos] = world;
+ }
++ String s1 = label;
+ // CraftBukkit end
- String s1 = s;
if (s.startsWith("/")) {
-@@ -126,7 +189,6 @@
+ s = s.substring(1);
+@@ -126,7 +193,6 @@
byte b0;
try {
@@ -100,7 +106,7 @@
ChatComponentText chatcomponenttext;
try {
-@@ -135,54 +197,59 @@
+@@ -135,54 +201,59 @@
return i;
} catch (CommandException commandexception) {
commandlistenerwrapper.sendFailureMessage(commandexception.a());
@@ -152,17 +158,17 @@
} catch (Exception exception) {
- chatcomponenttext = new ChatComponentText;
- }
-+ ChatMessage chatmessage1 = new ChatMessage("command.failed", new Object[0]);
-
+-
- 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()) {
+- StackTraceElement[] astacktraceelement = exception.getStackTrace();
+ chatcomponenttext = new ChatComponentText(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
+ if (CommandDispatcher.a.isDebugEnabled()) {
+ StackTraceElement[] astacktraceelement = exception.getStackTrace();
-- if (CommandDispatcher.a.isDebugEnabled()) {
-- StackTraceElement[] astacktraceelement = exception.getStackTrace();
--
- 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) {