From 12aa3ca6eff2d34772b7de1011ecf28b479f1e0b Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sun, 23 Mar 2014 01:29:13 +0000 Subject: [PATCH] Check for manually prefixed commands or commands that don't need a prefix for calling vanilla commands with command blocks --- ...ly-prefixed-commands-or-commands-tha.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CraftBukkit-Patches/0122-Check-for-manually-prefixed-commands-or-commands-tha.patch diff --git a/CraftBukkit-Patches/0122-Check-for-manually-prefixed-commands-or-commands-tha.patch b/CraftBukkit-Patches/0122-Check-for-manually-prefixed-commands-or-commands-tha.patch new file mode 100644 index 0000000000..64da877662 --- /dev/null +++ b/CraftBukkit-Patches/0122-Check-for-manually-prefixed-commands-or-commands-tha.patch @@ -0,0 +1,29 @@ +From 6683ed72e463e91b5e759902cc90dd07075479bf Mon Sep 17 00:00:00 2001 +From: Thinkofdeath +Date: Sun, 23 Mar 2014 01:12:10 +0000 +Subject: [PATCH] Check for manually prefixed commands or commands that don't + need a prefix for calling vanilla commands with command blocks + + +diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +index da235e5..0b04e94 100644 +--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java ++++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +@@ -110,6 +110,14 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { + } + } + ++ // Spigot start - check for manually prefixed command or commands that don't need a prefix ++ org.bukkit.command.Command commandBlockCommand = commandMap.getCommand(args[0]); ++ if (commandBlockCommand instanceof VanillaCommandWrapper) { ++ this.b = ((VanillaCommandWrapper) commandBlockCommand).dispatchVanillaCommandBlock(this, this.e); ++ return; ++ } ++ // Spigot end ++ + // Make sure this is a valid command + if (commandMap.getCommand(args[0]) == null) { + this.b = 0; +-- +1.8.5.2.msysgit.0 +