2017-05-26 08:43:56 +02:00
|
|
|
--- a/net/minecraft/server/CustomFunction.java
|
|
|
|
+++ b/net/minecraft/server/CustomFunction.java
|
2017-06-26 00:27:25 +02:00
|
|
|
@@ -122,7 +122,15 @@
|
2017-05-26 08:43:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void a(CustomFunctionData customfunctiondata, ICommandListener icommandlistener, ArrayDeque<CustomFunctionData.a> arraydeque, int i) {
|
|
|
|
- customfunctiondata.a().a(icommandlistener, this.a);
|
2017-06-26 00:27:25 +02:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ org.bukkit.command.CommandSender sender;
|
|
|
|
+ if (icommandlistener instanceof CustomFunctionData.CustomFunctionListener) {
|
|
|
|
+ sender = ((CustomFunctionData.CustomFunctionListener) icommandlistener).sender;
|
|
|
|
+ } else {
|
|
|
|
+ sender = CommandBlockListenerAbstract.unwrapSender(icommandlistener);
|
|
|
|
+ }
|
|
|
|
+ CommandBlockListenerAbstract.executeSafely(icommandlistener, sender, this.a);
|
|
|
|
+ // CraftBukkit end
|
2017-05-26 08:43:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|