SPIGOT-3373: Fix /execute in gameloop functions

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-06-25 09:46:19 +10:00
parent 622d0477c5
commit 4d6887228e
3 changed files with 23 additions and 5 deletions

View File

@@ -11,7 +11,7 @@
public class CommandExecute extends CommandAbstract {
@@ -59,26 +63,59 @@
@@ -59,26 +63,61 @@
}
String s = a(astring, b0);
@@ -31,6 +31,8 @@
+ sender = minecraftserver.remoteConsole;
+ } else if (listener instanceof CommandBlockListenerAbstract) {
+ sender = ((CommandBlockListenerAbstract) listener).sender;
+ } else if (listener instanceof CustomFunctionData.CustomFunctionListener) {
+ sender = ((CustomFunctionData.CustomFunctionListener) listener).sender;
+ } else if (listener instanceof CommandListenerWrapper) {
+ listener = ((CommandListenerWrapper) listener).base; // Search deeper
+ } else if (VanillaCommandWrapper.lastSender != null) {