mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 03:17:36 +01:00
20 lines
915 B
Diff
20 lines
915 B
Diff
--- a/net/minecraft/server/CustomFunction.java
|
|
+++ b/net/minecraft/server/CustomFunction.java
|
|
@@ -122,7 +122,15 @@
|
|
}
|
|
|
|
public void a(CustomFunctionData customfunctiondata, ICommandListener icommandlistener, ArrayDeque<CustomFunctionData.a> arraydeque, int i) {
|
|
- customfunctiondata.a().a(icommandlistener, this.a);
|
|
+ // 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
|
|
}
|
|
|
|
public String toString() {
|