summaryrefslogtreecommitdiffstats
path: root/nms-patches/CommandExecute.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/CommandExecute.patch')
-rw-r--r--nms-patches/CommandExecute.patch16
1 files changed, 11 insertions, 5 deletions
diff --git a/nms-patches/CommandExecute.patch b/nms-patches/CommandExecute.patch
index 9f937961..28b0d55c 100644
--- a/nms-patches/CommandExecute.patch
+++ b/nms-patches/CommandExecute.patch
@@ -1,8 +1,8 @@
--- a/net/minecraft/server/CommandExecute.java
+++ b/net/minecraft/server/CommandExecute.java
-@@ -2,6 +2,10 @@
-
+@@ -3,6 +3,10 @@
import java.util.Collection;
+ import java.util.Collections;
import java.util.List;
+// CraftBukkit start
+import org.bukkit.craftbukkit.command.ProxiedNativeCommandSender;
@@ -11,8 +11,8 @@
public class CommandExecute extends CommandAbstract {
-@@ -94,12 +98,31 @@
- ICommandHandler icommandhandler = MinecraftServer.getServer().getCommandHandler();
+@@ -97,22 +101,48 @@
+ ICommandHandler icommandhandler = minecraftserver.getCommandHandler();
try {
- int j = icommandhandler.a(icommandlistener1, s);
@@ -44,7 +44,13 @@
throw new CommandException("commands.execute.failed", new Object[] { s, entity.getName()});
}
}
-@@ -112,4 +135,11 @@
+ }
+
+ public List<String> tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, BlockPosition blockposition) {
+- return astring.length == 1 ? a(astring, minecraftserver.getPlayers()) : (astring.length > 1 && astring.length <= 4 ? a(astring, 1, blockposition) : (astring.length > 5 && astring.length <= 8 && "detect".equals(astring[4]) ? a(astring, 5, blockposition) : (astring.length == 9 && "detect".equals(astring[4]) ? a(astring, (Collection) Block.REGISTRY.keySet()) : Collections.emptyList())));
++ return astring.length == 1 ? a(astring, minecraftserver.getPlayers()) : (astring.length > 1 && astring.length <= 4 ? a(astring, 1, blockposition) : (astring.length > 5 && astring.length <= 8 && "detect".equals(astring[4]) ? a(astring, 5, blockposition) : (astring.length == 9 && "detect".equals(astring[4]) ? a(astring, (Collection) Block.REGISTRY.keySet()) : Collections.<String>emptyList()))); // CraftBukkit - decompile error
+ }
+
public boolean isListStart(String[] astring, int i) {
return i == 0;
}