--- a/net/minecraft/server/CustomFunctionData.java +++ b/net/minecraft/server/CustomFunctionData.java @@ -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() { - return CustomFunctionData.this.c.worldServer[0]; + return CustomFunctionData.this.c.worlds.get(0); // CraftBukkit } public MinecraftServer C_() { @@ -57,7 +64,7 @@ } public int c() { - return this.c.worldServer[0].getGameRules().c("maxCommandChainLength"); + return this.c.worlds.get(0).getGameRules().c("maxCommandChainLength"); // CraftBukkit } public Map d() { @@ -65,7 +72,7 @@ } public void e() { - String s = this.c.worldServer[0].getGameRules().get("gameLoopFunction"); + String s = this.c.worlds.get(0).getGameRules().get("gameLoopFunction"); // CraftBukkit if (!s.equals(this.e)) { this.e = s;