SPIGOT-3373: Fix /execute in gameloop functions

This commit is contained in:
md_5
2017-06-25 09:46:19 +10:00
parent 753a8e700d
commit 258575110f
3 changed files with 23 additions and 5 deletions

View File

@@ -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<CustomFunctionData.a> 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<MinecraftKey, CustomFunction> d() {
@@ -65,7 +65,7 @@
@@ -65,7 +72,7 @@
}
public void e() {