mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
move commands out of configuration
This commit is contained in:
parent
ad51c406d5
commit
3f1c6a45da
@ -836,10 +836,10 @@ index 0000000000000000000000000000000000000000..69add4a7f1147015806bc9b63a8340d1
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..214bc66788d1736d40202b794ab5f820e0ebe611
|
||||
index 0000000000000000000000000000000000000000..be64437ba7630fe069aaea502932b514c85162f8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -0,0 +1,394 @@
|
||||
@@ -0,0 +1,384 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import com.google.common.base.Suppliers;
|
||||
@ -1192,16 +1192,6 @@ index 0000000000000000000000000000000000000000..214bc66788d1736d40202b794ab5f820
|
||||
+ return Files.exists(legacyConfig) && Files.isRegularFile(legacyConfig);
|
||||
+ }
|
||||
+
|
||||
+ private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
+ static {
|
||||
+ }
|
||||
+
|
||||
+ public static void registerCommands(final MinecraftServer server) {
|
||||
+ COMMANDS.forEach((s, command) -> {
|
||||
+ server.server.getCommandMap().register(s, "Paper", command);
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public YamlConfiguration createLegacyObject(final MinecraftServer server) {
|
||||
+ YamlConfiguration global = YamlConfiguration.loadConfiguration(this.globalFolder.resolve(this.globalConfigFileName).toFile());
|
||||
@ -4006,17 +3996,16 @@ index 697ca7457115423a8c4d8a7d1f7a353237b56509..86c218e41fbe2a55b1319b37d26fd5da
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 570db14d930e15a96621d0d24ce11a27dc38494b..297bb691759ed5be375f49441778892e1c816fc1 100644
|
||||
index 570db14d930e15a96621d0d24ce11a27dc38494b..e476f93547f386ded0174693a6218d793ccc450b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -188,6 +188,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -188,6 +188,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
|
||||
org.spigotmc.SpigotConfig.registerCommands();
|
||||
// Spigot end
|
||||
+ // Paper start
|
||||
+ paperConfigurations.initializeGlobalConfiguration();
|
||||
+ paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
+ io.papermc.paper.configuration.PaperConfigurations.registerCommands(this);
|
||||
+ // Paper end
|
||||
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Paper command
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e75134a6aa92c86aa86430c7603e111280077d16
|
||||
index 0000000000000000000000000000000000000000..b506cd11b76901827cbe66f46db8df400f7015de
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -0,0 +1,286 @@
|
||||
@@ -0,0 +1,287 @@
|
||||
+package com.destroystokyo.paper;
|
||||
+
|
||||
+import com.google.common.base.Functions;
|
||||
@ -18,6 +18,7 @@ index 0000000000000000000000000000000000000000..e75134a6aa92c86aa86430c7603e1112
|
||||
+import com.google.common.collect.Iterables;
|
||||
+import com.google.common.collect.Lists;
|
||||
+import com.google.common.collect.Maps;
|
||||
+import net.minecraft.core.Registry;
|
||||
+import net.minecraft.resources.ResourceLocation;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.ServerChunkCache;
|
||||
@ -296,25 +297,49 @@ index 0000000000000000000000000000000000000000..e75134a6aa92c86aa86430c7603e1112
|
||||
+ Command.broadcastCommandMessage(sender, text("Paper config reload complete.", GREEN));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index d25393aa10a02a74f500c520bfb2979428693177..2e8da92c09fca465b754e45e0bf9984b978557e9 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.papermc.paper.configuration;
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/PaperCommands.java b/src/main/java/io/papermc/paper/command/PaperCommands.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..82bce89dc174c8c4a4ab8efeffaaf22ddeb377fb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommands.java
|
||||
@@ -0,0 +1,25 @@
|
||||
+package io.papermc.paper.command;
|
||||
+
|
||||
+import com.destroystokyo.paper.PaperCommand;
|
||||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.Table;
|
||||
import com.mojang.logging.LogUtils;
|
||||
@@ -352,6 +353,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
|
||||
private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
static {
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.command.Command;
|
||||
+
|
||||
+import java.util.HashMap;
|
||||
+import java.util.Map;
|
||||
+
|
||||
+public final class PaperCommands {
|
||||
+
|
||||
+ private PaperCommands() {
|
||||
+ }
|
||||
+
|
||||
+ private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
+ static {
|
||||
+ COMMANDS.put("paper", new PaperCommand("paper"));
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ public static void registerCommands(final MinecraftServer server) {
|
||||
+ COMMANDS.forEach((s, command) -> {
|
||||
+ server.server.getCommandMap().register(s, "Paper", command);
|
||||
+ });
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index e476f93547f386ded0174693a6218d793ccc450b..393e465b0bac55d407f2ec66d7b11ed0537c9641 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -191,6 +191,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper start
|
||||
paperConfigurations.initializeGlobalConfiguration();
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
+ io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||
// Paper end
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f9ddb9835cad1b76eecd639dff8fa29472954421..268715e19a6fa7d26510d9d0a8f19b158835b279 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
|
@ -689,37 +689,18 @@ index 0000000000000000000000000000000000000000..5a19e30a9b7e65a70f68a429b8ca741f
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index 2e8da92c09fca465b754e45e0bf9984b978557e9..b1845b20091b2a28a988f729c18415bb801a2b51 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.papermc.paper.configuration;
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 393e465b0bac55d407f2ec66d7b11ed0537c9641..408eff59b081ace53bf435947df17e2fe75bfd5e 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -192,6 +192,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
paperConfigurations.initializeGlobalConfiguration();
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||
+ com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
// Paper end
|
||||
|
||||
+import com.destroystokyo.paper.Metrics;
|
||||
import com.destroystokyo.paper.PaperCommand;
|
||||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.Table;
|
||||
@@ -352,6 +353,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
}
|
||||
|
||||
private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
+ private static boolean metricsStarted = false;
|
||||
static {
|
||||
COMMANDS.put("paper", new PaperCommand("paper"));
|
||||
}
|
||||
@@ -360,6 +362,11 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
COMMANDS.forEach((s, command) -> {
|
||||
server.server.getCommandMap().register(s, "Paper", command);
|
||||
});
|
||||
+
|
||||
+ if (!metricsStarted) {
|
||||
+ Metrics.PaperMetrics.startMetrics();
|
||||
+ metricsStarted = true;
|
||||
+ }
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index ed8ae212fc0ca781438fa9667f3f5cccc0af4cee..051d7c7fc5796ad056ae1ba5e5e630fde8794108 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
|
@ -916,7 +916,7 @@ index b7a06306614087dfab4d4dcf83797b5a92c376c5..00a50196f6a4768d84acfbbeec79a075
|
||||
i = this.context.runTopCommand(function, source);
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 297bb691759ed5be375f49441778892e1c816fc1..0811659ffcd27c1befe1b5263c5b950bc500bd13 100644
|
||||
index 408eff59b081ace53bf435947df17e2fe75bfd5e..cd0365249dffc1704a349a5e419364bbf9e8543b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -63,8 +63,9 @@ import org.apache.logging.log4j.Level;
|
||||
@ -930,7 +930,7 @@ index 297bb691759ed5be375f49441778892e1c816fc1..0811659ffcd27c1befe1b5263c5b950b
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -409,7 +410,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -410,7 +411,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInputs() {
|
||||
@ -939,7 +939,7 @@ index 297bb691759ed5be375f49441778892e1c816fc1..0811659ffcd27c1befe1b5263c5b950b
|
||||
while (!this.consoleInput.isEmpty()) {
|
||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||
|
||||
@@ -424,7 +425,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -425,7 +426,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@ -948,7 +948,7 @@ index 297bb691759ed5be375f49441778892e1c816fc1..0811659ffcd27c1befe1b5263c5b950b
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -675,6 +676,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -676,6 +677,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public String runCommand(String command) {
|
||||
@ -956,7 +956,7 @@ index 297bb691759ed5be375f49441778892e1c816fc1..0811659ffcd27c1befe1b5263c5b950b
|
||||
this.rconConsoleSource.prepareForCommand();
|
||||
this.executeBlocking(() -> {
|
||||
// CraftBukkit start - fire RemoteServerCommandEvent
|
||||
@@ -683,10 +685,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -684,10 +686,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
@ -1146,7 +1146,7 @@ index 186a8f5895fedbaf27a7949d9bdbb1a9f2e36fbf..86acdd910eebb8beac4536942119c9e9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 006d7ee33542fe6eba955410fc0054786662f82b..379e546faa873d4d13751e54d38942f98c0bdf35 100644
|
||||
index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3db1710d3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -201,13 +201,13 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 0811659ffcd27c1befe1b5263c5b950bc500bd13..f9de28e8d4d6a8b2e59d881c07d8626f427611a3 100644
|
||||
index cd0365249dffc1704a349a5e419364bbf9e8543b..2f2e07094a362ea1f459da85eb9ef84945a6e206 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -193,6 +193,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
paperConfigurations.initializeGlobalConfiguration();
|
||||
@@ -194,6 +194,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
io.papermc.paper.configuration.PaperConfigurations.registerCommands(this);
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
+ com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
// Paper end
|
||||
|
||||
|
@ -18,10 +18,10 @@ index 681121909bdf81d5a05670f0b0150f6276d00281..a4623129ffa537db39ee2f206fa775c9
|
||||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index f9de28e8d4d6a8b2e59d881c07d8626f427611a3..f862438462ed904c894c90ab8ce126fd0df6fea5 100644
|
||||
index 2f2e07094a362ea1f459da85eb9ef84945a6e206..ee509d7b06a9785a39b59329a19531047953831b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -246,7 +246,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -247,7 +247,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.convertOldUsers()) {
|
||||
|
@ -21,7 +21,7 @@ index 94201e91ee67c00fb9d5af0c6db9d96999164c06..d4595c3eadce0b09042043bd9d31aa57
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index d91c69a30e04807420f6b096eb1d348464e55c52..3594241f443f2ebeb21721c3fb6cc10f09e2f5ed 100644
|
||||
index b248c0f481436b1b101dc1f75eaaf8023f4ba0ea..02ea5304a3f99d69005ab1a7ea85e6a13009fa89 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -202,6 +202,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -29,9 +29,9 @@ index d91c69a30e04807420f6b096eb1d348464e55c52..3594241f443f2ebeb21721c3fb6cc10f
|
||||
paperConfigurations.initializeGlobalConfiguration();
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
+ org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
io.papermc.paper.configuration.PaperConfigurations.registerCommands(this);
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8ede5166c3764f75c27e170ef40b89a103389073..ac7a1408efe242d34200d3f27333a1df72b5b7dd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands
|
||||
Lists are bad as Queues mmmkay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 3594241f443f2ebeb21721c3fb6cc10f09e2f5ed..698205c4cd00cc76c3cc83f1dcadd7a4d6734744 100644
|
||||
index 02ea5304a3f99d69005ab1a7ea85e6a13009fa89..0537678f802158ec182d48df94794b59820ffc7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -74,7 +74,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -18,7 +18,7 @@ index 3594241f443f2ebeb21721c3fb6cc10f09e2f5ed..698205c4cd00cc76c3cc83f1dcadd7a4
|
||||
@Nullable
|
||||
private QueryThreadGs4 queryThreadGs4;
|
||||
public final RconConsoleSource rconConsoleSource;
|
||||
@@ -418,13 +418,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -419,13 +419,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make the default permission message configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index e75134a6aa92c86aa86430c7603e111280077d16..c5b005e7a803c848dca31dc76d1ec83ffca42950 100644
|
||||
index b506cd11b76901827cbe66f46db8df400f7015de..bb8f2a0c9fc1fd9bc50dc82934407e12bbd98276 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -56,7 +56,7 @@ public class PaperCommand extends Command {
|
||||
@@ -57,7 +57,7 @@ public class PaperCommand extends Command {
|
||||
|
||||
private static boolean testPermission(CommandSender commandSender, String permission) {
|
||||
if (commandSender.hasPermission(BASE_PERM + permission) || commandSender.hasPermission("bukkit.command.paper")) return true;
|
||||
|
@ -32,14 +32,12 @@ https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528273&page=com.atlass
|
||||
https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528577&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-528577
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7d02996d4 100644
|
||||
index bb8f2a0c9fc1fd9bc50dc82934407e12bbd98276..a110be5e3f3f168a6557cd935de20aeadac5b942 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -6,13 +6,15 @@ import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
-import net.minecraft.resources.ResourceLocation;
|
||||
@@ -9,11 +9,13 @@ import com.google.common.collect.Maps;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.ServerChunkCache;
|
||||
@ -47,12 +45,11 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
+import net.minecraft.resources.ResourceLocation;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -39,13 +41,15 @@ import java.util.Set;
|
||||
@@ -40,13 +42,15 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.kyori.adventure.text.Component.text;
|
||||
@ -69,7 +66,7 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
||||
|
||||
public PaperCommand(String name) {
|
||||
super(name);
|
||||
@@ -73,6 +77,21 @@ public class PaperCommand extends Command {
|
||||
@@ -74,6 +78,21 @@ public class PaperCommand extends Command {
|
||||
if (args.length == 3)
|
||||
return getListMatchingLast(sender, args, Registry.ENTITY_TYPE.keySet().stream().map(ResourceLocation::toString).sorted().toArray(String[]::new));
|
||||
break;
|
||||
@ -91,7 +88,7 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -139,6 +158,12 @@ public class PaperCommand extends Command {
|
||||
@@ -140,6 +159,12 @@ public class PaperCommand extends Command {
|
||||
case "reload":
|
||||
doReload(sender);
|
||||
break;
|
||||
@ -104,7 +101,7 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
||||
case "ver":
|
||||
if (!testPermission(sender, "version")) break; // "ver" needs a special check because it's an alias. All other commands are checked up before the switch statement (because they are present in the SUBCOMMANDS set)
|
||||
case "version":
|
||||
@@ -156,6 +181,122 @@ public class PaperCommand extends Command {
|
||||
@@ -157,6 +182,122 @@ public class PaperCommand extends Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -7,10 +7,10 @@ This lets you run /paper fixlight <chunkRadius> (max 5) to automatically
|
||||
fix all light data in the chunks.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b22214bc53 100644
|
||||
index a110be5e3f3f168a6557cd935de20aeadac5b942..7ed91424ff9185bf8c06a034e880f83681f7d019 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -10,7 +10,8 @@ import net.minecraft.server.MinecraftServer;
|
||||
@@ -12,7 +12,8 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.ServerChunkCache;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@ -19,8 +19,8 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
|
||||
+import net.minecraft.server.level.ThreadedLevelLightEngine;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
@@ -24,15 +25,18 @@ import org.bukkit.command.Command;
|
||||
import net.minecraft.server.MCUtil;
|
||||
@@ -25,15 +26,18 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
@ -39,7 +39,7 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -49,7 +53,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
||||
@@ -50,7 +54,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
||||
|
||||
public class PaperCommand extends Command {
|
||||
private static final String BASE_PERM = "bukkit.command.paper.";
|
||||
@ -48,7 +48,7 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
|
||||
|
||||
public PaperCommand(String name) {
|
||||
super(name);
|
||||
@@ -164,6 +168,9 @@ public class PaperCommand extends Command {
|
||||
@@ -165,6 +169,9 @@ public class PaperCommand extends Command {
|
||||
case "chunkinfo":
|
||||
doChunkInfo(sender, args);
|
||||
break;
|
||||
@ -58,7 +58,7 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
|
||||
case "ver":
|
||||
if (!testPermission(sender, "version")) break; // "ver" needs a special check because it's an alias. All other commands are checked up before the switch statement (because they are present in the SUBCOMMANDS set)
|
||||
case "version":
|
||||
@@ -424,4 +431,74 @@ public class PaperCommand extends Command {
|
||||
@@ -425,4 +432,74 @@ public class PaperCommand extends Command {
|
||||
|
||||
Command.broadcastCommandMessage(sender, text("Paper config reload complete.", GREEN));
|
||||
}
|
||||
|
@ -1017,18 +1017,17 @@ index 0000000000000000000000000000000000000000..80a2dfb266ae1221680a7b24fee2f7e2
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index bc0922d959816c990b16233689192b46371a73e4..5626a772908f7956a30a82ca73929b05c19f7268 100644
|
||||
index be64437ba7630fe069aaea502932b514c85162f8..922ce2f0f4fa10c585939d6682b1a0a8612de0ea 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -2,6 +2,7 @@ package io.papermc.paper.configuration;
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.papermc.paper.configuration;
|
||||
|
||||
import com.destroystokyo.paper.Metrics;
|
||||
import com.destroystokyo.paper.PaperCommand;
|
||||
+import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray;
|
||||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.Table;
|
||||
import com.mojang.logging.LogUtils;
|
||||
@@ -193,6 +194,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -191,6 +192,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
.register(DoubleOrDefault.SERIALIZER)
|
||||
.register(BooleanOrDefault.SERIALIZER)
|
||||
.register(Duration.SERIALIZER)
|
||||
|
@ -13,28 +13,27 @@ chunks, however it must be enabled by setting the startup flag
|
||||
/paper syncloadinfo clear
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index c3ee820fa69a75bee8d2c3a61e1015b22214bc53..d2ecbcf966cb7e0b27e65fa12806d2181ecf2d39 100644
|
||||
index 7ed91424ff9185bf8c06a034e880f83681f7d019..610af917885fa1c86f4258a0cc36a488c0ab4b06 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -1,11 +1,17 @@
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.destroystokyo.paper;
|
||||
|
||||
+import com.destroystokyo.paper.io.SyncLoadFinder;
|
||||
import com.google.common.base.Functions;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -8,6 +9,9 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
+import com.google.gson.JsonObject;
|
||||
+import com.google.gson.internal.Streams;
|
||||
+import com.google.gson.stream.JsonWriter;
|
||||
+import net.minecraft.resources.ResourceLocation;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.ServerChunkCache;
|
||||
@@ -29,6 +35,9 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
@@ -30,6 +34,9 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.File;
|
||||
@ -44,7 +43,7 @@ index c3ee820fa69a75bee8d2c3a61e1015b22214bc53..d2ecbcf966cb7e0b27e65fa12806d218
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayDeque;
|
||||
@@ -47,13 +56,14 @@ import java.util.stream.Collectors;
|
||||
@@ -48,13 +55,14 @@ import java.util.stream.Collectors;
|
||||
import static net.kyori.adventure.text.Component.text;
|
||||
import static net.kyori.adventure.text.format.NamedTextColor.BLUE;
|
||||
import static net.kyori.adventure.text.format.NamedTextColor.DARK_AQUA;
|
||||
@ -60,7 +59,7 @@ index c3ee820fa69a75bee8d2c3a61e1015b22214bc53..d2ecbcf966cb7e0b27e65fa12806d218
|
||||
|
||||
public PaperCommand(String name) {
|
||||
super(name);
|
||||
@@ -96,6 +106,11 @@ public class PaperCommand extends Command {
|
||||
@@ -97,6 +105,11 @@ public class PaperCommand extends Command {
|
||||
return getListMatchingLast(sender, args, worldNames);
|
||||
}
|
||||
break;
|
||||
@ -72,7 +71,7 @@ index c3ee820fa69a75bee8d2c3a61e1015b22214bc53..d2ecbcf966cb7e0b27e65fa12806d218
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -171,6 +186,9 @@ public class PaperCommand extends Command {
|
||||
@@ -172,6 +185,9 @@ public class PaperCommand extends Command {
|
||||
case "fixlight":
|
||||
this.doFixLight(sender, args);
|
||||
break;
|
||||
@ -82,7 +81,7 @@ index c3ee820fa69a75bee8d2c3a61e1015b22214bc53..d2ecbcf966cb7e0b27e65fa12806d218
|
||||
case "ver":
|
||||
if (!testPermission(sender, "version")) break; // "ver" needs a special check because it's an alias. All other commands are checked up before the switch statement (because they are present in the SUBCOMMANDS set)
|
||||
case "version":
|
||||
@@ -188,6 +206,47 @@ public class PaperCommand extends Command {
|
||||
@@ -189,6 +205,47 @@ public class PaperCommand extends Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -324,7 +323,7 @@ index c12c03b9e79f264ee593373f8a72ed37c0ae8514..509b2ee115584ce80717cc12a7ab548d
|
||||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 73c1e9cf05ff72b77887b262b7ac7101bb785405..d4e054a6ed2626845373f4b0fa8463682322cf12 100644
|
||||
index 9e80a76b4d6b6c1b9b0fa99ac8fbacf101e54a79..4ef35afd61f4bcf06807a79a0d1b16f6593ab7d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -388,6 +388,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -109,19 +109,19 @@ index 0000000000000000000000000000000000000000..874f0c2a071994c2145848886caa385e
|
||||
+ return text(DF.format(avg), avg >= 50 ? RED : avg >= 40 ? YELLOW : GREEN);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index 5626a772908f7956a30a82ca73929b05c19f7268..1db8a3e4b547a3c78ae2df2e4dadb871eb80aa5d 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
diff --git a/src/main/java/io/papermc/paper/command/PaperCommands.java b/src/main/java/io/papermc/paper/command/PaperCommands.java
|
||||
index 82bce89dc174c8c4a4ab8efeffaaf22ddeb377fb..37d28625b9528bbe0cd6d9623e702bbbc2b07883 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/PaperCommands.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommands.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.papermc.paper.configuration;
|
||||
package io.papermc.paper.command;
|
||||
|
||||
+import com.destroystokyo.paper.MSPTCommand;
|
||||
import com.destroystokyo.paper.Metrics;
|
||||
import com.destroystokyo.paper.PaperCommand;
|
||||
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray;
|
||||
@@ -358,6 +359,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
private static boolean metricsStarted = false;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -15,6 +16,7 @@ public final class PaperCommands {
|
||||
private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
static {
|
||||
COMMANDS.put("paper", new PaperCommand("paper"));
|
||||
+ COMMANDS.put("mspt", new MSPTCommand("mspt"));
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
|
||||
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 698205c4cd00cc76c3cc83f1dcadd7a4d6734744..0a73727d8fff18c09597fb117463c7cf810470bb 100644
|
||||
index 0537678f802158ec182d48df94794b59820ffc7b..f33f38c3c8c277d208b00b64e1d0fa7bb5eda7ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -396,11 +396,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -397,11 +397,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.rconThread != null) {
|
||||
|
@ -230,10 +230,10 @@ index 7de1368bcde500ba133282537270fbdfd9c9d54b..60648e7c3c86176631d9a3ffdf21f6d2
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 0a73727d8fff18c09597fb117463c7cf810470bb..5b6a51d17575bf8bec664ee0661c57a7975be80d 100644
|
||||
index f33f38c3c8c277d208b00b64e1d0fa7bb5eda7ec..e585cdd8a598df2b04c265d5568f8ba868018178 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -273,7 +273,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -274,7 +274,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
long j = Util.getNanos() - i;
|
||||
String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D);
|
||||
|
||||
@ -242,7 +242,7 @@ index 0a73727d8fff18c09597fb117463c7cf810470bb..5b6a51d17575bf8bec664ee0661c57a7
|
||||
if (dedicatedserverproperties.announcePlayerAchievements != null) {
|
||||
((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
|
||||
}
|
||||
@@ -403,7 +403,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -404,7 +404,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
//this.remoteStatusListener.b(); // Paper - don't wait for remote connections
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ index 0a73727d8fff18c09597fb117463c7cf810470bb..5b6a51d17575bf8bec664ee0661c57a7
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -744,7 +745,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -745,7 +746,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@Override
|
||||
public void stopServer() {
|
||||
super.stopServer();
|
||||
@ -299,7 +299,7 @@ index 6fefa619299d3202158490630d62c16aef71e831..7a4ade1a4190bf4fbb048919ae2be230
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 672e8eff9b9b635106deb32952b6d2dc4323a564..f47812b84b003ac486a2c100d82368e3242014bc 100644
|
||||
index e4dbc1118d6bf3c1958f893de5dbd975af0ce5bc..59f387fd4e7e4e02ce5759829b3121a9a7e3aff0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -794,6 +794,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -323,7 +323,7 @@ index 89f4ea65b20e773bd3782c41db3a2af7b5b405f3..3fe94e580d2aaae9616ba83c0d3a4468
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a67e99a53f35c2d0142193ac75f47ba8bd7d9784..d6b9fb609a3ebd4afb561a829c14e077004e2bc4 100644
|
||||
index f83d09866176f6d8fd9549f82cf743312b3df000..d19729adffd3b077c7fce4c6e53d30b98936368f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2049,7 +2049,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -63,10 +63,10 @@ index 4bb29f86538552bb62125cc61210fd77b1ec671d..817193ca5fc15134d2985187bc2226cc
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5b4e9721841db730f48b5f44b6cefc13e3b81dcc..b9d65e77734129664057c26881204494ccc57de2 100644
|
||||
index a44a9b4b3c78395cdd1d859407a880cb54386d86..ae45abf66d2e7b24d316a5db3d00c0b52f402b7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -331,7 +331,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -332,7 +332,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
||||
@ -102,7 +102,7 @@ index 32786e1c13ffda722aaabf518e2ace7f13e0bf96..08d28184c7e90878b72a606c7800cfff
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index db644358527a42bc1030ab38d29253aab6f553aa..55416f187c9e35c810162c5ead1375421d6b3d4b 100644
|
||||
index 71e9dae49851467de50a5a2f3c202e19ac718099..16976aaa643d2033328703c2f77a8901af9ba806 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -940,8 +940,8 @@ public final class CraftServer implements Server {
|
||||
|
@ -6,18 +6,10 @@ Subject: [PATCH] Paper dumpitem command
|
||||
Let's you quickly view the item in your hands NBT data
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index d2ecbcf966cb7e0b27e65fa12806d2181ecf2d39..f953ea6f63d7aee3564d57eb250b02a28d36a187 100644
|
||||
index 610af917885fa1c86f4258a0cc36a488c0ab4b06..5ab7f0b6db9a25792aa99e90504ae75512bffc63 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -20,6 +20,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.ThreadedLevelLightEngine;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
+import net.minecraft.network.protocol.game.ClientboundLightUpdatePacket;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MCUtil;
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
@@ -32,7 +33,9 @@ import org.bukkit.command.CommandSender;
|
||||
@@ -31,7 +31,9 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
@ -27,7 +19,7 @@ index d2ecbcf966cb7e0b27e65fa12806d2181ecf2d39..f953ea6f63d7aee3564d57eb250b02a2
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -63,7 +66,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
||||
@@ -62,7 +64,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
||||
|
||||
public class PaperCommand extends Command {
|
||||
private static final String BASE_PERM = "bukkit.command.paper.";
|
||||
@ -36,7 +28,7 @@ index d2ecbcf966cb7e0b27e65fa12806d2181ecf2d39..f953ea6f63d7aee3564d57eb250b02a2
|
||||
|
||||
public PaperCommand(String name) {
|
||||
super(name);
|
||||
@@ -177,6 +180,9 @@ public class PaperCommand extends Command {
|
||||
@@ -176,6 +178,9 @@ public class PaperCommand extends Command {
|
||||
case "reload":
|
||||
doReload(sender);
|
||||
break;
|
||||
@ -46,7 +38,7 @@ index d2ecbcf966cb7e0b27e65fa12806d2181ecf2d39..f953ea6f63d7aee3564d57eb250b02a2
|
||||
case "debug":
|
||||
doDebug(sender, args);
|
||||
break;
|
||||
@@ -490,6 +496,23 @@ public class PaperCommand extends Command {
|
||||
@@ -489,6 +494,23 @@ public class PaperCommand extends Command {
|
||||
|
||||
Command.broadcastCommandMessage(sender, text("Paper config reload complete.", GREEN));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ index d83bed436d2ad51cef83ecbf0c7df227a67ff404..dc96b30c70cd79d7b2a0322f32b9399a
|
||||
this.saveUserBanList();
|
||||
this.loadIpBanList();
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b9d65e77734129664057c26881204494ccc57de2..7b78b8edb0c5e544d0cc136fc7b84d1867f20ab6 100644
|
||||
index ae45abf66d2e7b24d316a5db3d00c0b52f402b7f..0414974fc773a30810f88b54867034f5922eaa55 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -199,6 +199,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -37,7 +37,7 @@ index b9d65e77734129664057c26881204494ccc57de2..7b78b8edb0c5e544d0cc136fc7b84d18
|
||||
// Paper start
|
||||
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc.
|
||||
paperConfigurations.initializeGlobalConfiguration();
|
||||
@@ -257,9 +263,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -258,9 +264,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ index 0000000000000000000000000000000000000000..5ab8365b806dd035800ba9b449c9bc92
|
||||
+ public void setErrorIndex(final int errorIndex) {}
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 7b78b8edb0c5e544d0cc136fc7b84d1867f20ab6..b2039aba3bebd5eb7957438a7cfc97d5e1d5bc8c 100644
|
||||
index 0414974fc773a30810f88b54867034f5922eaa55..4391bd846b039339c0ef807870c5fb517a6b1708 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -178,7 +178,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -215,9 +215,9 @@ index 7b78b8edb0c5e544d0cc136fc7b84d1867f20ab6..b2039aba3bebd5eb7957438a7cfc97d5
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
+ thread.start(); // Paper - start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
io.papermc.paper.configuration.PaperConfigurations.registerCommands(this);
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
|
||||
index 14cd8ae69d9b25dc5edad4ff96ff4a9acb1f22cb..b3484487fa8baa4d1dd6c595586fb26a01a2153d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
|
||||
|
@ -42,12 +42,12 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b2039aba3bebd5eb7957438a7cfc97d5e1d5bc8c..c6f70d057b7626b6b5bae0b2760f564f55af17a7 100644
|
||||
index 4391bd846b039339c0ef807870c5fb517a6b1708..33ebc25607277f4ab8d8bbd185c3d78343d93741 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -213,6 +213,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
thread.start(); // Paper - start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
io.papermc.paper.configuration.PaperConfigurations.registerCommands(this);
|
||||
@@ -214,6 +214,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
+ io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
// Paper end
|
||||
|
@ -27,10 +27,10 @@ index 91556b52edaa1d5c4dc73a825c77b9a66b002c61..00abdd5bba02b7cdf8dbdc423594f0fd
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index c6f70d057b7626b6b5bae0b2760f564f55af17a7..3fc342502ca24165ea5dcf0cc6e9867d0378d69f 100644
|
||||
index 33ebc25607277f4ab8d8bbd185c3d78343d93741..0ce34bb9104fb1c29bbcb65cfa5eb9b7a48809b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -223,6 +223,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -224,6 +224,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.setEnforceWhitelist(dedicatedserverproperties.enforceWhitelist);
|
||||
// this.worldData.setGameType(dedicatedserverproperties.gamemode); // CraftBukkit - moved to world loading
|
||||
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
|
||||
@ -51,7 +51,7 @@ index c6f70d057b7626b6b5bae0b2760f564f55af17a7..3fc342502ca24165ea5dcf0cc6e9867d
|
||||
InetAddress inetaddress = null;
|
||||
|
||||
if (!this.getLocalIp().isEmpty()) {
|
||||
@@ -232,12 +246,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -233,12 +247,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (this.getPort() < 0) {
|
||||
this.setPort(dedicatedserverproperties.serverPort);
|
||||
}
|
||||
@ -107,7 +107,7 @@ index 076c1d5fb69a4a30b3e412e85b17db09fd9a1def..9e7154c9df96d5a0577886d43a98a736
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index 142737266a2afcbbd70556615f56730d44e862f9..c7ac8193b7f4b29d0d85891de0eca67912c8811c 100644
|
||||
index 53833fdd748098b662d4420a254401c0d3982e56..b02cbf6bcc57167a1373925f652950e0212dfa4f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -43,6 +43,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||
|
@ -10,7 +10,7 @@ Also has a hover text on each mob category listing what entity types are
|
||||
in said category
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324ae3ed48f 100644
|
||||
index 5ab7f0b6db9a25792aa99e90504ae75512bffc63..268374eccbccfc45257567f89de25ac83a6416fe 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -3,6 +3,7 @@ package com.destroystokyo.paper;
|
||||
@ -21,7 +21,7 @@ index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -10,6 +11,13 @@ import com.google.common.collect.Maps;
|
||||
@@ -12,6 +13,12 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.internal.Streams;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
@ -31,24 +31,21 @@ index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324
|
||||
+import net.kyori.adventure.text.TextComponent;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import net.kyori.adventure.text.format.TextColor;
|
||||
+import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -19,10 +27,12 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.ServerChunkCache;
|
||||
@@ -19,8 +26,10 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.ThreadedLevelLightEngine;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
+import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.network.protocol.game.ClientboundLightUpdatePacket;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MCUtil;
|
||||
+import net.minecraft.world.level.NaturalSpawner;
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -54,6 +64,7 @@ import java.util.List;
|
||||
@@ -52,6 +61,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@ -56,7 +53,7 @@ index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.kyori.adventure.text.Component.text;
|
||||
@@ -66,7 +77,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
||||
@@ -64,7 +74,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
||||
|
||||
public class PaperCommand extends Command {
|
||||
private static final String BASE_PERM = "bukkit.command.paper.";
|
||||
@ -65,7 +62,7 @@ index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324
|
||||
|
||||
public PaperCommand(String name) {
|
||||
super(name);
|
||||
@@ -99,6 +110,10 @@ public class PaperCommand extends Command {
|
||||
@@ -97,6 +107,10 @@ public class PaperCommand extends Command {
|
||||
return getListMatchingLast(sender, args, "help", "chunks");
|
||||
}
|
||||
break;
|
||||
@ -76,7 +73,7 @@ index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324
|
||||
case "chunkinfo":
|
||||
List<String> worldNames = new ArrayList<>();
|
||||
worldNames.add("*");
|
||||
@@ -195,6 +210,12 @@ public class PaperCommand extends Command {
|
||||
@@ -193,6 +207,12 @@ public class PaperCommand extends Command {
|
||||
case "syncloadinfo":
|
||||
this.doSyncLoadInfo(sender, args);
|
||||
break;
|
||||
@ -89,7 +86,7 @@ index f953ea6f63d7aee3564d57eb250b02a28d36a187..3322b811ef7e6018383227de0e605324
|
||||
case "ver":
|
||||
if (!testPermission(sender, "version")) break; // "ver" needs a special check because it's an alias. All other commands are checked up before the switch statement (because they are present in the SUBCOMMANDS set)
|
||||
case "version":
|
||||
@@ -253,6 +274,184 @@ public class PaperCommand extends Command {
|
||||
@@ -251,6 +271,184 @@ public class PaperCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,7 +293,7 @@ index fa23e9c476d4edc6176d8b8a6cb13c52d2f66a87..4150e8cd7197eac53042d56f0a53a495
|
||||
// Paper start - add parameters and int ret type
|
||||
spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index df86cdc08d036c43000ce999647136270f97bc1b..efaaa74878ad18082a0b95ce2697b3638bc1284b 100644
|
||||
index 78759009e78804efa6fcaf3804633698f3090990..64cd0cee5c9d68994fe45246cc46bd91c83c9599 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2130,6 +2130,11 @@ public final class CraftServer implements Server {
|
||||
|
@ -9,10 +9,10 @@ the function. I saw approximately 1/3rd of the function
|
||||
on the copy.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index 3322b811ef7e6018383227de0e605324ae3ed48f..d0ef7380d5a325cf8950422b8ee5167da7ac6e0a 100644
|
||||
index 268374eccbccfc45257567f89de25ac83a6416fe..6417aaec8cf219bdfd1f6b2714c7bbadb3d21b36 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -483,7 +483,7 @@ public class PaperCommand extends Command {
|
||||
@@ -480,7 +480,7 @@ public class PaperCommand extends Command {
|
||||
int ticking = 0;
|
||||
int entityTicking = 0;
|
||||
|
||||
|
@ -4353,10 +4353,10 @@ index 0000000000000000000000000000000000000000..dd995e25ae620ae36cd5eecb2fe10ad0
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index d0ef7380d5a325cf8950422b8ee5167da7ac6e0a..f7e223ddf21a90407f61351b89a98ac823932af7 100644
|
||||
index 6417aaec8cf219bdfd1f6b2714c7bbadb3d21b36..e3aa9ca50e743590c1c0c994588597d47052b7c0 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -712,6 +712,46 @@ public class PaperCommand extends Command {
|
||||
@@ -709,6 +709,46 @@ public class PaperCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
@ -4403,7 +4403,7 @@ index d0ef7380d5a325cf8950422b8ee5167da7ac6e0a..f7e223ddf21a90407f61351b89a98ac8
|
||||
private void doFixLight(CommandSender sender, String[] args) {
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("Only players can use this command");
|
||||
@@ -720,7 +760,7 @@ public class PaperCommand extends Command {
|
||||
@@ -717,7 +757,7 @@ public class PaperCommand extends Command {
|
||||
int radius = 2;
|
||||
if (args.length > 1) {
|
||||
try {
|
||||
@ -4412,7 +4412,7 @@ index d0ef7380d5a325cf8950422b8ee5167da7ac6e0a..f7e223ddf21a90407f61351b89a98ac8
|
||||
} catch (Exception e) {
|
||||
sender.sendMessage("Not a number");
|
||||
return;
|
||||
@@ -733,6 +773,13 @@ public class PaperCommand extends Command {
|
||||
@@ -730,6 +770,13 @@ public class PaperCommand extends Command {
|
||||
ServerLevel world = (ServerLevel) handle.level;
|
||||
ThreadedLevelLightEngine lightengine = world.getChunkSource().getLightEngine();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Pass ServerLevel for gamerule callbacks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index c96bc85b8de905c1f8112a26dca644775c619a64..afc16bd5a2056d1ee8ce290ec1a6f67c0ac9aedb 100644
|
||||
index 83cc8db3ca76898f88a56c27c2b6fde6006723ba..aea18838a17fc52e1bf8cd84cd185565e6e2246d 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -308,7 +308,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -309,7 +309,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
//DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); // Paper moved to after init
|
||||
if (dedicatedserverproperties.announcePlayerAchievements != null) {
|
||||
|
@ -9,10 +9,10 @@ list is only used in the tick and tickPassenger methods, so we can safely not ad
|
||||
markers to it.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index f7e223ddf21a90407f61351b89a98ac823932af7..3a8432f21e4520282f052d6d801a35b92bc82de0 100644
|
||||
index e3aa9ca50e743590c1c0c994588597d47052b7c0..b1592bd75bb273622680a1d5c5fef7a7adf049f8 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -629,7 +629,7 @@ public class PaperCommand extends Command {
|
||||
@@ -626,7 +626,7 @@ public class PaperCommand extends Command {
|
||||
ChunkPos chunk = e.chunkPosition();
|
||||
info.left++;
|
||||
info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1);
|
||||
@ -22,7 +22,7 @@ index f7e223ddf21a90407f61351b89a98ac823932af7..3a8432f21e4520282f052d6d801a35b9
|
||||
}
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c4fb20953a6b21759c50bf8fdbc24dc71bc42e54..c8294d999cdce92b4747f1e6fbbed7fcb90ce8df 100644
|
||||
index f1f95c857691c5ef37347d46a8eb5fde965402fc..f1e7ab0de35135b69b5f93836c1da33f286f401e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2492,6 +2492,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
Loading…
Reference in New Issue
Block a user