From 258575110f7c0abc0e3c8b85254b22b28fca27b1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 25 Jun 2017 09:46:19 +1000 Subject: SPIGOT-3373: Fix /execute in gameloop functions --- nms-patches/CustomFunctionData.patch | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'nms-patches/CustomFunctionData.patch') diff --git a/nms-patches/CustomFunctionData.patch b/nms-patches/CustomFunctionData.patch index f0baac84..821ff006 100644 --- a/nms-patches/CustomFunctionData.patch +++ b/nms-patches/CustomFunctionData.patch @@ -1,6 +1,22 @@ --- a/net/minecraft/server/CustomFunctionData.java +++ b/net/minecraft/server/CustomFunctionData.java -@@ -33,7 +33,7 @@ +@@ -23,7 +23,14 @@ + private CustomFunction f; + private final ArrayDeque g = new ArrayDeque(); + private boolean h = false; +- private final ICommandListener i = new ICommandListener() { ++ // CraftBukkit start ++ private final ICommandListener i = new CustomFunctionListener(); ++ ++ public class CustomFunctionListener implements ICommandListener { ++ ++ protected org.bukkit.command.CommandSender sender = new org.bukkit.craftbukkit.command.CraftFunctionCommandSender(this); ++ // CraftBukkit end ++ + public String getName() { + return CustomFunctionData.this.e; + } +@@ -33,7 +40,7 @@ } public World getWorld() { @@ -9,7 +25,7 @@ } public MinecraftServer C_() { -@@ -57,7 +57,7 @@ +@@ -57,7 +64,7 @@ } public int c() { @@ -18,7 +34,7 @@ } public Map d() { -@@ -65,7 +65,7 @@ +@@ -65,7 +72,7 @@ } public void e() { -- cgit v1.2.3