mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 15:08:27 +02:00
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
--- a/net/minecraft/server/CustomFunctionData.java
|
|
+++ b/net/minecraft/server/CustomFunctionData.java
|
|
@@ -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() {
|
|
- 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<MinecraftKey, CustomFunction> 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;
|