SPIGOT-3376: Fix nested functions
By: md_5 <git@md-5.net>
This commit is contained in:
parent
4d6887228e
commit
d62c91e3a6
3 changed files with 42 additions and 28 deletions
|
@ -1,11 +1,19 @@
|
|||
--- a/net/minecraft/server/CustomFunction.java
|
||||
+++ b/net/minecraft/server/CustomFunction.java
|
||||
@@ -122,7 +122,7 @@
|
||||
@@ -122,7 +122,15 @@
|
||||
}
|
||||
|
||||
public void a(CustomFunctionData customfunctiondata, ICommandListener icommandlistener, ArrayDeque<CustomFunctionData.a> arraydeque, int i) {
|
||||
- customfunctiondata.a().a(icommandlistener, this.a);
|
||||
+ CommandBlockListenerAbstract.executeSafely(icommandlistener, ((CustomFunctionData.CustomFunctionListener) icommandlistener).sender, this.a); // CraftBukkit
|
||||
+ // 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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue