Paper/CraftBukkit-Patches/0108-Check-for-manually-prefixed-commands-or-commands-tha.patch
Zach Brown cab333b217 Rebase (Update) from upstream SpigotMC
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e
Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c
Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66
Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b
Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
2014-11-28 14:19:07 -06:00

30 lines
1.3 KiB
Diff

From b6507b27adeaf9bfdd200dcbe04438f90f6d3776 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
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 0cd512d..278832c 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.9.1