Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Fix calling UnknownCommandEvent (#8232)
Dieser Commit ist enthalten in:
Ursprung
8fced9d5ab
Commit
f9dc371fd8
@ -6,10 +6,10 @@ Subject: [PATCH] Add UnknownCommandEvent
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..57128c780bc73e39d2733cceeb21dc06c2422c3c
|
||||
index 0000000000000000000000000000000000000000..e4f8a0d14ae66468bbb0a5d6bf9c1ee417dc866c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
|
||||
@@ -0,0 +1,113 @@
|
||||
@@ -0,0 +1,110 @@
|
||||
+package org.bukkit.event.command;
|
||||
+
|
||||
+import net.kyori.adventure.text.Component;
|
||||
@ -17,6 +17,7 @@ index 0000000000000000000000000000000000000000..57128c780bc73e39d2733cceeb21dc06
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.Contract;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@ -29,11 +30,6 @@ index 0000000000000000000000000000000000000000..57128c780bc73e39d2733cceeb21dc06
|
||||
+ @NotNull private String commandLine;
|
||||
+ @Nullable private Component message;
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) {
|
||||
+ this(sender, commandLine, message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message));
|
||||
+ }
|
||||
+
|
||||
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final Component message) {
|
||||
+ super(false);
|
||||
+ this.sender = sender;
|
||||
@ -96,6 +92,7 @@ index 0000000000000000000000000000000000000000..57128c780bc73e39d2733cceeb21dc06
|
||||
+ * @return Unknown command message
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @Contract(pure = true)
|
||||
+ public Component message() {
|
||||
+ return this.message;
|
||||
+ }
|
||||
|
@ -3,18 +3,104 @@ From: Sweepyoface <github@sweepy.pw>
|
||||
Date: Sat, 17 Jun 2017 18:48:21 -0400
|
||||
Subject: [PATCH] Add UnknownCommandEvent
|
||||
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 36bbe7d0b2089361beda89097c15eca9ab48a57d..65d8c7d5aab8c6afe3c5671a90ad0fbc03bedfdd 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -328,8 +328,13 @@ public class CommandSourceStack implements SharedSuggestionProvider {
|
||||
}
|
||||
|
||||
public void sendFailure(Component message) {
|
||||
+ // Paper start
|
||||
+ this.sendFailure(message, true);
|
||||
+ }
|
||||
+ public void sendFailure(Component message, boolean withStyle) {
|
||||
+ // Paper end
|
||||
if (this.source.acceptsFailure() && !this.silent) {
|
||||
- this.source.sendSystemMessage(Component.empty().append(message).withStyle(ChatFormatting.RED));
|
||||
+ this.source.sendSystemMessage(withStyle ? Component.empty().append(message).withStyle(ChatFormatting.RED) : message); // Paper
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..4cf76403098cc8565199b29757a29c80150bbaae 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -133,6 +133,7 @@ public class Commands {
|
||||
public static final int LEVEL_ADMINS = 3;
|
||||
public static final int LEVEL_OWNERS = 4;
|
||||
private final com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher = new com.mojang.brigadier.CommandDispatcher();
|
||||
+ public final java.util.List<CommandNode<CommandSourceStack>> vanillaCommandNodes = new java.util.ArrayList<>(); // Paper
|
||||
|
||||
public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
|
||||
this(); // CraftBukkit
|
||||
@@ -220,6 +221,7 @@ public class Commands {
|
||||
if (environment.includeIntegrated) {
|
||||
PublishCommand.register(this.dispatcher);
|
||||
}
|
||||
+ this.vanillaCommandNodes.addAll(this.dispatcher.getRoot().getChildren()); // Paper
|
||||
|
||||
// CraftBukkit start
|
||||
}
|
||||
@@ -311,7 +313,16 @@ public class Commands {
|
||||
b1 = 0;
|
||||
return b1;
|
||||
} catch (CommandSyntaxException commandsyntaxexception) {
|
||||
- commandlistenerwrapper.sendFailure(ComponentUtils.fromMessage(commandsyntaxexception.getRawMessage()));
|
||||
+ // Paper start
|
||||
+ final net.kyori.adventure.text.TextComponent.Builder builder = net.kyori.adventure.text.Component.text();
|
||||
+ if ((parseresults.getContext().getNodes().isEmpty() || !this.vanillaCommandNodes.contains(parseresults.getContext().getNodes().get(0).getNode()))) {
|
||||
+ if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
||||
+ builder.append(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.unknownCommandMessage));
|
||||
+ }
|
||||
+ } else {
|
||||
+ // commandlistenerwrapper.sendFailure(ComponentUtils.fromMessage(commandsyntaxexception.getRawMessage()));
|
||||
+ builder.color(net.kyori.adventure.text.format.NamedTextColor.RED).append(io.papermc.paper.brigadier.PaperBrigadier.componentFromMessage(commandsyntaxexception.getRawMessage()));
|
||||
+ // Paper end
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
||||
@@ -330,7 +341,18 @@ public class Commands {
|
||||
}
|
||||
|
||||
ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
|
||||
- commandlistenerwrapper.sendFailure(ichatmutablecomponent);
|
||||
+ // Paper start
|
||||
+ // commandlistenerwrapper.sendFailure(ichatmutablecomponent);
|
||||
+ builder
|
||||
+ .append(net.kyori.adventure.text.Component.newline())
|
||||
+ .append(io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent));
|
||||
+ }
|
||||
+ }
|
||||
+ org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(commandlistenerwrapper.getBukkitSender(), s, org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty() ? null : builder.build());
|
||||
+ org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
+ if (event.message() != null) {
|
||||
+ commandlistenerwrapper.sendFailure(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false);
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
b1 = 0;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bc2bbddde33738db0e46f0dbe39fe62c6d34126b..d53d3a29ab58966dafae76c69d9a68dccbae4de6 100644
|
||||
index bc2bbddde33738db0e46f0dbe39fe62c6d34126b..d2f40cafd9a0a7a4c8e00647defa98d1ae678284 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -905,7 +905,13 @@ public final class CraftServer implements Server {
|
||||
@@ -533,6 +533,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
if (command instanceof VanillaCommandWrapper) {
|
||||
LiteralCommandNode<CommandSourceStack> node = (LiteralCommandNode<CommandSourceStack>) ((VanillaCommandWrapper) command).vanillaCommand;
|
||||
+ dispatcher.vanillaCommandNodes.add(node); // Paper
|
||||
if (!node.getLiteral().equals(label)) {
|
||||
LiteralCommandNode<CommandSourceStack> clone = new LiteralCommandNode(label, node.getCommand(), node.getRequirement(), node.getRedirect(), node.getRedirectModifier(), node.isFork());
|
||||
|
||||
@@ -905,7 +906,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Spigot start
|
||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
||||
- sender.sendMessage(org.spigotmc.SpigotConfig.unknownCommandMessage);
|
||||
+ // Paper start
|
||||
+ org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(sender, commandLine, org.spigotmc.SpigotConfig.unknownCommandMessage);
|
||||
+ org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(sender, commandLine, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.unknownCommandMessage));
|
||||
+ Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
+ if (event.message() != null) {
|
||||
+ sender.sendMessage(event.message());
|
||||
|
@ -631,7 +631,7 @@ index 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a
|
||||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d53d3a29ab58966dafae76c69d9a68dccbae4de6..bc8a2d9a4388887c8e49dd9e5ceebd0ca3b0e893 100644
|
||||
index d2f40cafd9a0a7a4c8e00647defa98d1ae678284..a8f760ac25e42de33523727a56c7a2045cd284a6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -257,6 +257,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@ -652,7 +652,7 @@ index d53d3a29ab58966dafae76c69d9a68dccbae4de6..bc8a2d9a4388887c8e49dd9e5ceebd0c
|
||||
CraftItemFactory.instance();
|
||||
}
|
||||
|
||||
@@ -2623,5 +2627,37 @@ public final class CraftServer implements Server {
|
||||
@@ -2624,5 +2628,37 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -91,10 +91,10 @@ index 66436cd5b6b14914919a1eb612ca133ee4ffef05..43748cb2ee5840ee82d5ab6337a72c86
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bc8a2d9a4388887c8e49dd9e5ceebd0ca3b0e893..06a962ac9644df033b95f3bed3ee96a8fc00edb0 100644
|
||||
index a8f760ac25e42de33523727a56c7a2045cd284a6..25343a382c7ef8e79f74e276b28fd2fc73c66e27 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2113,7 +2113,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2114,7 +2114,7 @@ public final class CraftServer implements Server {
|
||||
offers = this.tabCompleteChat(player, message);
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 06a962ac9644df033b95f3bed3ee96a8fc00edb0..02b2452fa5bdcd667f8c0be97f425310975c9312 100644
|
||||
index 25343a382c7ef8e79f74e276b28fd2fc73c66e27..6bb4f1e6fa16c3972781b04218b0d579d2ceee3d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1735,6 +1735,25 @@ public final class CraftServer implements Server {
|
||||
@@ -1736,6 +1736,25 @@ public final class CraftServer implements Server {
|
||||
return recipients.size();
|
||||
}
|
||||
|
||||
|
@ -33,10 +33,10 @@ index e6826cd0a596f063e8737dcde3c8c6c5b3f71970..1a2607d1b257cea65c82c661a6b3d46c
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 02b2452fa5bdcd667f8c0be97f425310975c9312..3fc2354df83cf4a9d3f18decc996beef90c5d9a1 100644
|
||||
index 6bb4f1e6fa16c3972781b04218b0d579d2ceee3d..f53304465bf5ead9de2e769b7b783f853103980d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -924,6 +924,7 @@ public final class CraftServer implements Server {
|
||||
@@ -925,6 +925,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
@ -44,7 +44,7 @@ index 02b2452fa5bdcd667f8c0be97f425310975c9312..3fc2354df83cf4a9d3f18decc996beef
|
||||
this.reloadCount++;
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
@@ -1012,6 +1013,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1013,6 +1014,7 @@ public final class CraftServer implements Server {
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
||||
|
@ -18,10 +18,10 @@ index 1e9105cf5ab2ff0ee847fafd00b41e1bd47f1d9e..65ee888280f917ccd11146505b738951
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3fc2354df83cf4a9d3f18decc996beef90c5d9a1..56783cacf0b2e3042ce8cdb1fd3745b6b19d3226 100644
|
||||
index f53304465bf5ead9de2e769b7b783f853103980d..074098d147d6b1a678233a097d17ade524d938cd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2649,6 +2649,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2650,6 +2650,16 @@ public final class CraftServer implements Server {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,10 @@ commands if the server is restarting. Using the default async pool caused issues
|
||||
due to the shutdown logic generally being much later.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..6e931aa7220180336b64fbb3b4090df278fca0fa 100644
|
||||
index 4cf76403098cc8565199b29757a29c80150bbaae..b21bcb046ec801a4cb5395034be60d0eb19888eb 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -368,6 +368,24 @@ public class Commands {
|
||||
@@ -390,6 +390,24 @@ public class Commands {
|
||||
if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
|
||||
// CraftBukkit start
|
||||
// Register Vanilla commands into builtRoot as before
|
||||
@ -37,7 +37,7 @@ index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..6e931aa7220180336b64fbb3b4090df2
|
||||
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
||||
RootCommandNode vanillaRoot = new RootCommandNode();
|
||||
|
||||
@@ -385,7 +403,14 @@ public class Commands {
|
||||
@@ -407,7 +425,14 @@ public class Commands {
|
||||
for (CommandNode node : rootcommandnode.getChildren()) {
|
||||
bukkit.add(node.getName());
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ index da6250df1c5f3385b683cffde47754bca4606f5e..3384501f83d445f45aa8233e98c7597d
|
||||
public void removeCommand(String name) {
|
||||
this.children.remove(name);
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 36bbe7d0b2089361beda89097c15eca9ab48a57d..b8f5b5895bf75aa8e08b2b0431ef6fdacd235430 100644
|
||||
index 65d8c7d5aab8c6afe3c5671a90ad0fbc03bedfdd..efad6dc30ff2731fdaed9c7f8d974aba8d8a4bcf 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -41,7 +41,7 @@ import net.minecraft.world.phys.Vec2;
|
||||
@ -99,10 +99,10 @@ index 36bbe7d0b2089361beda89097c15eca9ab48a57d..b8f5b5895bf75aa8e08b2b0431ef6fda
|
||||
public boolean hasPermission(int level) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 6e931aa7220180336b64fbb3b4090df278fca0fa..feb9e827357b3ffb76dfff90350e513592441d8e 100644
|
||||
index b21bcb046ec801a4cb5395034be60d0eb19888eb..2f256d0452617c8f2630f0dd8f16025c9b2e0cae 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -404,6 +404,7 @@ public class Commands {
|
||||
@@ -426,6 +426,7 @@ public class Commands {
|
||||
bukkit.add(node.getName());
|
||||
}
|
||||
// Paper start - Async command map building
|
||||
@ -110,7 +110,7 @@ index 6e931aa7220180336b64fbb3b4090df278fca0fa..feb9e827357b3ffb76dfff90350e5135
|
||||
net.minecraft.server.MinecraftServer.getServer().execute(() -> {
|
||||
runSync(player, bukkit, rootcommandnode);
|
||||
});
|
||||
@@ -411,6 +412,7 @@ public class Commands {
|
||||
@@ -433,6 +434,7 @@ public class Commands {
|
||||
|
||||
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
||||
// Paper end - Async command map building
|
||||
@ -118,7 +118,7 @@ index 6e931aa7220180336b64fbb3b4090df278fca0fa..feb9e827357b3ffb76dfff90350e5135
|
||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -429,6 +431,11 @@ public class Commands {
|
||||
@@ -451,6 +453,11 @@ public class Commands {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
CommandNode<CommandSourceStack> commandnode2 = (CommandNode) iterator.next();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 56783cacf0b2e3042ce8cdb1fd3745b6b19d3226..7bc16e221b37629708299773519da60a1d9930ac 100644
|
||||
index 074098d147d6b1a678233a097d17ade524d938cd..edc810d092d069cdfb8a36566c0eab8577a96859 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2690,5 +2690,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2691,5 +2691,10 @@ public final class CraftServer implements Server {
|
||||
profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties());
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
|
||||
}
|
||||
|
@ -1571,10 +1571,10 @@ index 832c6d92daaa96210a9c7edbd357ca824a60a4a5..0fadc763fb482cf9f3b51ed44427029b
|
||||
|
||||
public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7bc16e221b37629708299773519da60a1d9930ac..3106711ef8034077cd54e40dc2e8fa003101db26 100644
|
||||
index edc810d092d069cdfb8a36566c0eab8577a96859..78ab2ea2cf1d4676d16986572a40ebb2c6ca7950 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2262,7 +2262,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2263,7 +2263,7 @@ public final class CraftServer implements Server {
|
||||
public ChunkGenerator.ChunkData createChunkData(World world) {
|
||||
Validate.notNull(world, "World cannot be null");
|
||||
ServerLevel handle = ((CraftWorld) world).getHandle();
|
||||
|
@ -185,10 +185,10 @@ index 023119624c0534bedb248099d0e12c76622a363a..8dcbeeae50afe23aa7e2a083239f0a31
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3106711ef8034077cd54e40dc2e8fa003101db26..fd327209b29d812195a454aca2c71fd8ba197ebc 100644
|
||||
index 78ab2ea2cf1d4676d16986572a40ebb2c6ca7950..5d638a1876bf79c46052f2572aa4182dca556457 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2512,6 +2512,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2513,6 +2513,16 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
};
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd327209b29d812195a454aca2c71fd8ba197ebc..3ba07a7ba5300ac2b087c563355b4795ae33e27e 100644
|
||||
index 5d638a1876bf79c46052f2572aa4182dca556457..047c1c20624926a7a9be7204bd2e3f144a52afa9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2705,5 +2705,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2706,5 +2706,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3ba07a7ba5300ac2b087c563355b4795ae33e27e..760f42c620033aef43e4a7765dd7ba0b743a6ad4 100644
|
||||
index 047c1c20624926a7a9be7204bd2e3f144a52afa9..84de99c3872f1e99301824764c047f214ee24a5e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -592,6 +592,13 @@ public final class CraftServer implements Server {
|
||||
@@ -593,6 +593,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
||||
|
@ -74,10 +74,10 @@ index 9d3ea20adba300a38a544c3454eff2edd9b4bbb9..3e6ec2cef2b5b058f240dd471d5c7a22
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
||||
this.connection.disconnect(ichatmutablecomponent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 760f42c620033aef43e4a7765dd7ba0b743a6ad4..ae5d775c00b377aa5be383874b4af61a5951186b 100644
|
||||
index 84de99c3872f1e99301824764c047f214ee24a5e..d5ec8667f87936480ecf8d5820e02b07aea1f5fd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1015,6 +1015,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1016,6 +1016,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getFullName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
|
@ -791,10 +791,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ae5d775c00b377aa5be383874b4af61a5951186b..73bcba84979ba2d8f3ab2f2aa1d4294fe792f53a 100644
|
||||
index d5ec8667f87936480ecf8d5820e02b07aea1f5fd..d4820b97bbfdb6f8f810dda66e6671b318bde8e1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2718,5 +2718,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2719,5 +2719,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
||||
|
@ -22,10 +22,10 @@ index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac833
|
||||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 73bcba84979ba2d8f3ab2f2aa1d4294fe792f53a..f6bc55e326f9076ac5df9decd7e501bee9346f67 100644
|
||||
index d4820b97bbfdb6f8f810dda66e6671b318bde8e1..ae1a78fcc61d5fe6bfdc41cca508d269ee9d1e39 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1024,6 +1024,35 @@ public final class CraftServer implements Server {
|
||||
@@ -1025,6 +1025,35 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
||||
|
@ -102,10 +102,10 @@ index fa06f9be742103e65aa90dfb9d21a93c119bf0c0..d5f879303080dadf0fbd5d15840c2536
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f6bc55e326f9076ac5df9decd7e501bee9346f67..a67e158bad42086aec237a822ec252fd26f80e3c 100644
|
||||
index ae1a78fcc61d5fe6bfdc41cca508d269ee9d1e39..82c61d3e06f98e828393aba16d40ebc4fe0fd30e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -964,8 +964,8 @@ public final class CraftServer implements Server {
|
||||
@@ -965,8 +965,8 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
|
@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a67e158bad42086aec237a822ec252fd26f80e3c..829105771a06deca2a85e2f27b68d96c28c1218b 100644
|
||||
index 82c61d3e06f98e828393aba16d40ebc4fe0fd30e..4c4a19a359ff6325906f0a47852dcef6ae6acf3e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -373,7 +373,7 @@ public final class CraftServer implements Server {
|
||||
@ -34,7 +34,7 @@ index a67e158bad42086aec237a822ec252fd26f80e3c..829105771a06deca2a85e2f27b68d96c
|
||||
this.minimumAPI = this.configuration.getString("settings.minimum-api");
|
||||
this.loadIcon();
|
||||
|
||||
@@ -944,7 +944,7 @@ public final class CraftServer implements Server {
|
||||
@@ -945,7 +945,7 @@ public final class CraftServer implements Server {
|
||||
this.console.setMotd(config.motd);
|
||||
this.overrideSpawnLimits();
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
|
@ -18,10 +18,10 @@ index 5d6128932e1af0445cf928fac6d6b91226a18de6..fdd7f80fe912d4f75e7c42a2dd971600
|
||||
private int simulationDistance;
|
||||
private boolean allowCheatsForAllPlayers;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 829105771a06deca2a85e2f27b68d96c28c1218b..3eac1b8e1fa4ce5fb30321498a0fa9c10d62c579 100644
|
||||
index 4c4a19a359ff6325906f0a47852dcef6ae6acf3e..8dbfae0732675759ff2d08f8be3740edbff92bbf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -687,6 +687,13 @@ public final class CraftServer implements Server {
|
||||
@@ -688,6 +688,13 @@ public final class CraftServer implements Server {
|
||||
return this.playerList.getMaxPlayers();
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3eac1b8e1fa4ce5fb30321498a0fa9c10d62c579..6c2ea3e0cf385d6893faf5430b29dbe2589786b0 100644
|
||||
index 8dbfae0732675759ff2d08f8be3740edbff92bbf..50e9e9f3cc807972b0d2f612dc93d674fd4ae0ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1830,6 +1830,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1831,6 +1831,28 @@ public final class CraftServer implements Server {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Empty commands shall not be dispatched
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index feb9e827357b3ffb76dfff90350e513592441d8e..03a926990ecfa97d8fbc20a15ffb7fcb48fed06a 100644
|
||||
index b9614977b902edc59b4f319f5c1051bcb20dc9fc..80ab8903b340881ca45b46caa7f03e605796080d 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -253,6 +253,7 @@ public class Commands {
|
||||
@@ -255,6 +255,7 @@ public class Commands {
|
||||
command = event.getCommand();
|
||||
|
||||
String[] args = command.split(" ");
|
||||
|
@ -20,10 +20,10 @@ index 3e4ac4020c9f51e634eadd43243d34267bea4b22..ce52ae980309ecddf597e14b759b77ea
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c05dab188b35a138ce230b92d366083e1ffca604..0e1967a8842924ab0b683e482ccd9b0e4825936a 100644
|
||||
index 3baf5c5af9a784a0a5b0d67313d4d88aaadc6cfb..b53c2a7f3413c572c4a6d16bd4da225e75ee06ca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1157,9 +1157,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1158,9 +1158,15 @@ public final class CraftServer implements Server {
|
||||
File folder = new File(this.getWorldContainer(), name);
|
||||
World world = this.getWorld(name);
|
||||
|
||||
@ -41,7 +41,7 @@ index c05dab188b35a138ce230b92d366083e1ffca604..0e1967a8842924ab0b683e482ccd9b0e
|
||||
|
||||
if ((folder.exists()) && (!folder.isDirectory())) {
|
||||
throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder");
|
||||
@@ -1248,7 +1254,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1249,7 +1255,7 @@ public final class CraftServer implements Server {
|
||||
} else if (name.equals(levelName + "_the_end")) {
|
||||
worldKey = net.minecraft.world.level.Level.END;
|
||||
} else {
|
||||
@ -50,7 +50,7 @@ index c05dab188b35a138ce230b92d366083e1ffca604..0e1967a8842924ab0b683e482ccd9b0e
|
||||
}
|
||||
|
||||
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
|
||||
@@ -1340,6 +1346,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1341,6 +1347,15 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Send empty commands if tab completion is disabled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 03a926990ecfa97d8fbc20a15ffb7fcb48fed06a..7e61f0cb96c7697fc3487fd941cacc15d78a14dc 100644
|
||||
index da7503dca8ab4f7234bf296dfacf39e466de700a..7ebe1c200c26c66b293b245d7f470bf4f81f3eea 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -366,7 +366,12 @@ public class Commands {
|
||||
@@ -388,7 +388,12 @@ public class Commands {
|
||||
}
|
||||
|
||||
public void sendCommands(ServerPlayer player) {
|
||||
|
@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0e1967a8842924ab0b683e482ccd9b0e4825936a..0cd970a62a9dd98031805bd73af22b6ff0de4aed 100644
|
||||
index b53c2a7f3413c572c4a6d16bd4da225e75ee06ca..c2128d14a49a698100a64ab72be5e566669a1d8d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -295,6 +295,7 @@ public final class CraftServer implements Server {
|
||||
@ -111,7 +111,7 @@ index 0e1967a8842924ab0b683e482ccd9b0e4825936a..0cd970a62a9dd98031805bd73af22b6f
|
||||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -2798,5 +2800,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2799,5 +2801,11 @@ public final class CraftServer implements Server {
|
||||
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return mobGoals;
|
||||
}
|
||||
|
@ -359,10 +359,10 @@ index b294ef87fb93e7f4651dc04128124f297575860d..65fd57609e45ccd49ebfc1ba80d25243
|
||||
return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0cd970a62a9dd98031805bd73af22b6ff0de4aed..ad2ce80a64e7e975b029a5bf897661f499538ebb 100644
|
||||
index c2128d14a49a698100a64ab72be5e566669a1d8d..ad48a589c1e71eed171f9b71fda11f7512f08e3f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1233,12 +1233,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1234,12 +1234,7 @@ public final class CraftServer implements Server {
|
||||
worlddata.customDimensions = iregistry;
|
||||
worlddata.checkName(name);
|
||||
worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified());
|
||||
@ -376,7 +376,7 @@ index 0cd970a62a9dd98031805bd73af22b6ff0de4aed..ad2ce80a64e7e975b029a5bf897661f4
|
||||
|
||||
long j = BiomeManager.obfuscateSeed(creator.seed());
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
|
||||
@@ -1249,6 +1244,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1250,6 +1245,13 @@ public final class CraftServer implements Server {
|
||||
biomeProvider = generator.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
|
||||
|
@ -33,14 +33,13 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b
|
||||
private RedirectModifier<S> modifier = null;
|
||||
private boolean forks;
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 7e61f0cb96c7697fc3487fd941cacc15d78a14dc..9cf69ef59ef4330a69753cab7aa8ec7716587d32 100644
|
||||
index 4cf954f54c55bb4d7063b8fcdf147c19ff4634d8..e365cc65383d7a9d7abd5a90144a18dca8a00300 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -220,7 +220,13 @@ public class Commands {
|
||||
if (environment.includeIntegrated) {
|
||||
PublishCommand.register(this.dispatcher);
|
||||
@@ -223,6 +223,13 @@ public class Commands {
|
||||
}
|
||||
-
|
||||
this.vanillaCommandNodes.addAll(this.dispatcher.getRoot().getChildren()); // Paper
|
||||
|
||||
+ // Paper start
|
||||
+ for (final CommandNode<CommandSourceStack> node : this.dispatcher.getRoot().getChildren()) {
|
||||
+ if (node.getRequirement() == com.mojang.brigadier.builder.ArgumentBuilder.<CommandSourceStack>defaultRequirement()) {
|
||||
|
@ -286,10 +286,10 @@ index bf3fb416d36a19958033cdbf5cc313556fa0201b..0a49769bfa83d0b9c435e3ab4bba8597
|
||||
// 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 2ef6971bae1a25b7da7e0c45404aaf576fe9de1f..498f75af09272855c6d648c4bbbd0d6736e71643 100644
|
||||
index e2ce58158a31d5c61961d9c78d3709377e29b42c..1f1178410dba7846a16e9948c184dde10a93a4d7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2184,6 +2184,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2185,6 +2185,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public int getSpawnLimit(SpawnCategory spawnCategory) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 498f75af09272855c6d648c4bbbd0d6736e71643..4de2392f51b30c3778011e3fcb4f21dbf723e731 100644
|
||||
index 1f1178410dba7846a16e9948c184dde10a93a4d7..8c980c12a4f132a712a0f22fc3585c83182363dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2357,6 +2357,90 @@ public final class CraftServer implements Server {
|
||||
@@ -2358,6 +2358,90 @@ public final class CraftServer implements Server {
|
||||
return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,10 @@ when if this was fixed on the client, that wouldn't be needed.
|
||||
Mojira Issue: https://bugs.mojang.com/browse/MC-235045
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index c2af60bdb755034e46b85143826a29c4482d58f5..ae5dd08de75a7ed231295f306fd0974da3988249 100644
|
||||
index 24172c3b7b1d2faa13b18bedf89ad051267feb6c..7b6b51392b123d34382233adcf4c3d4867bdaa32 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -416,4 +416,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@@ -421,4 +421,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
return this.source.getBukkitSender(this);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -35,10 +35,10 @@ index c2af60bdb755034e46b85143826a29c4482d58f5..ae5dd08de75a7ed231295f306fd0974d
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 9cf69ef59ef4330a69753cab7aa8ec7716587d32..6a82d83bca27b3b023d9d6771d194b4db9c97dc2 100644
|
||||
index f2b312367895f121bcf4135c12dfdb354f32dddb..401a87de8fc48b9e69423d547f79e9e356cc20f1 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -441,6 +441,7 @@ public class Commands {
|
||||
@@ -464,6 +464,7 @@ public class Commands {
|
||||
private void fillUsableCommands(CommandNode<CommandSourceStack> tree, CommandNode<SharedSuggestionProvider> result, CommandSourceStack source, Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> resultNodes) {
|
||||
Iterator iterator = tree.getChildren().iterator();
|
||||
|
||||
@ -46,7 +46,7 @@ index 9cf69ef59ef4330a69753cab7aa8ec7716587d32..6a82d83bca27b3b023d9d6771d194b4d
|
||||
while (iterator.hasNext()) {
|
||||
CommandNode<CommandSourceStack> commandnode2 = (CommandNode) iterator.next();
|
||||
// Paper start
|
||||
@@ -467,6 +468,12 @@ public class Commands {
|
||||
@@ -490,6 +491,12 @@ public class Commands {
|
||||
|
||||
if (requiredargumentbuilder.getSuggestionsProvider() != null) {
|
||||
requiredargumentbuilder.suggests(SuggestionProviders.safelySwap(requiredargumentbuilder.getSuggestionsProvider()));
|
||||
|
@ -18,10 +18,10 @@ index 0868805c78d991c602d8f1d1b5aeb5c790c13384..6986d5475b090bca60b5ae892512fd5e
|
||||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4de2392f51b30c3778011e3fcb4f21dbf723e731..cc23a36accc9b05a0c37b241acb98cf596cffbe4 100644
|
||||
index 8c980c12a4f132a712a0f22fc3585c83182363dc..ef4cc3e55061d71f64ad16b62efcf7b2af99006a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1240,7 +1240,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1241,7 +1241,7 @@ public final class CraftServer implements Server {
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
|
||||
LevelStem worlddimension = iregistry.get(actualDimension);
|
||||
|
||||
|
@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cc23a36accc9b05a0c37b241acb98cf596cffbe4..25922e6adb9c1482ec2e7a90c3c3ab55bbb0f455 100644
|
||||
index ef4cc3e55061d71f64ad16b62efcf7b2af99006a..87d7ea9b248253f7c9071857578bf4576760a472 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2018,6 +2018,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2019,6 +2019,13 @@ public final class CraftServer implements Server {
|
||||
return console.console;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit
|
||||
Copies appropriate checks from CraftWorld#getSpawnLimit
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 25922e6adb9c1482ec2e7a90c3c3ab55bbb0f455..351b69772cf6acbb72a6766737519d14637d3c58 100644
|
||||
index 87d7ea9b248253f7c9071857578bf4576760a472..1dc72eac8a6f2f22e497117fff91e585e93b73ea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2192,6 +2192,8 @@ public final class CraftServer implements Server {
|
||||
@@ -2193,6 +2193,8 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public int getSpawnLimit(SpawnCategory spawnCategory) {
|
||||
// Paper start
|
||||
|
@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 351b69772cf6acbb72a6766737519d14637d3c58..3c0ec36f569de79f909db40f3c2262afe6102e2c 100644
|
||||
index 1dc72eac8a6f2f22e497117fff91e585e93b73ea..54cc314a328568fd4fcf007e0476d0fd12f2eb6a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2603,6 +2603,15 @@ public final class CraftServer implements Server {
|
||||
@@ -2604,6 +2604,15 @@ public final class CraftServer implements Server {
|
||||
return (org.bukkit.Tag<T>) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ index 351b69772cf6acbb72a6766737519d14637d3c58..3c0ec36f569de79f909db40f3c2262af
|
||||
default -> throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@@ -2635,6 +2644,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2636,6 +2645,13 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.core.Registry<EntityType<?>> entityTags = BuiltInRegistries.ENTITY_TYPE;
|
||||
return entityTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList());
|
||||
}
|
||||
|
@ -23,10 +23,10 @@ index d2409599c9d9765a2e1dc7418339923049abc416..f42d7d9e11542370489fcc8dc42ea6ec
|
||||
|
||||
if (worlddata.getCustomBossEvents() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3c0ec36f569de79f909db40f3c2262afe6102e2c..d64d81dd51d6cfd21f01d8811d7d18205f7cd233 100644
|
||||
index 54cc314a328568fd4fcf007e0476d0fd12f2eb6a..f13a5f6d3a5a72d089545df4f52b2302adcd601f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1269,10 +1269,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1270,10 +1270,11 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ index cf2b6487a640a7a613f3b3604ca7b1063b3ff102..0bab2693b91d5bab222c7db8bc6965cc
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d64d81dd51d6cfd21f01d8811d7d18205f7cd233..ed68a09222d32c35f81d9d22337db0935ee166f9 100644
|
||||
index f13a5f6d3a5a72d089545df4f52b2302adcd601f..6974554791c01df7af2b5cda5c18bb6d66da629b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -298,6 +298,7 @@ public final class CraftServer implements Server {
|
||||
@ -184,7 +184,7 @@ index d64d81dd51d6cfd21f01d8811d7d18205f7cd233..ed68a09222d32c35f81d9d22337db093
|
||||
MobEffects.BLINDNESS.getClass();
|
||||
PotionEffectType.stopAcceptingRegistrations();
|
||||
// Ugly hack :(
|
||||
@@ -2924,5 +2925,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2925,5 +2926,10 @@ public final class CraftServer implements Server {
|
||||
return datapackManager;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld
|
||||
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ed68a09222d32c35f81d9d22337db0935ee166f9..6688f8b92a5da150066adff3a4ff5719899ee8c1 100644
|
||||
index 6974554791c01df7af2b5cda5c18bb6d66da629b..bbf2a8a15acc6b8ca7e0fb83246af83e3b2ae934 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1317,7 +1317,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1318,7 +1318,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
try {
|
||||
if (save) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6688f8b92a5da150066adff3a4ff5719899ee8c1..492e7d420a73b02bbff52705d432eab998527c86 100644
|
||||
index bbf2a8a15acc6b8ca7e0fb83246af83e3b2ae934..1198b15878550fbb616093e2fd77bd27398e7dcb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1276,6 +1276,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1277,6 +1277,7 @@ public final class CraftServer implements Server {
|
||||
internal.setSpawnSettings(true, true);
|
||||
// Paper - move up
|
||||
|
||||
|
@ -45,10 +45,10 @@ index a8b3f0e8be414c4ea92cc85c9811ecd42e5ce9c1..0e04083ff0598451c66731b1518b2eb6
|
||||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 492e7d420a73b02bbff52705d432eab998527c86..5e8b7d4edce921053f33eafdcf9786d0601c4d0d 100644
|
||||
index 1198b15878550fbb616093e2fd77bd27398e7dcb..55cfe795d84f8be32966cad41f8dd46064b2a52c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -869,6 +869,11 @@ public final class CraftServer implements Server {
|
||||
@@ -870,6 +870,11 @@ public final class CraftServer implements Server {
|
||||
return new ArrayList<World>(this.worlds.values());
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ index 492e7d420a73b02bbff52705d432eab998527c86..5e8b7d4edce921053f33eafdcf9786d0
|
||||
public DedicatedPlayerList getHandle() {
|
||||
return this.playerList;
|
||||
}
|
||||
@@ -1153,6 +1158,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1154,6 +1159,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public World createWorld(WorldCreator creator) {
|
||||
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
||||
@ -68,7 +68,7 @@ index 492e7d420a73b02bbff52705d432eab998527c86..5e8b7d4edce921053f33eafdcf9786d0
|
||||
Validate.notNull(creator, "Creator may not be null");
|
||||
|
||||
String name = creator.name();
|
||||
@@ -1291,6 +1297,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1292,6 +1298,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean unloadWorld(World world, boolean save) {
|
||||
|
@ -20,10 +20,10 @@ index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4
|
||||
Date date = new Date();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5e8b7d4edce921053f33eafdcf9786d0601c4d0d..c604e8269080ead3d5b3d9a4136b78e1222da600 100644
|
||||
index 55cfe795d84f8be32966cad41f8dd46064b2a52c..c34343705ea409a0a0614845b7cf3bdda3dcb4ca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1791,7 +1791,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1792,7 +1792,7 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions
|
||||
This is a bug accidentally introduced in upstream CB
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 6a82d83bca27b3b023d9d6771d194b4db9c97dc2..330f6c79417378da855326b4da665f9d240e748d 100644
|
||||
index 401a87de8fc48b9e69423d547f79e9e356cc20f1..e92864ecf32dd984f6f87f7b05341e43af3a2977 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -322,7 +322,7 @@ public class Commands {
|
||||
@@ -334,7 +334,7 @@ public class Commands {
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
||||
|
@ -213,10 +213,10 @@ index 0bedd9eadbfe1ce290f22d6c648571e25e3ae0e9..093822a5256e8e919350a000239a3e92
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c604e8269080ead3d5b3d9a4136b78e1222da600..f938095d999412d88fa3fcf76b87253034124cb9 100644
|
||||
index c34343705ea409a0a0614845b7cf3bdda3dcb4ca..f1a3d8dae2a61b875e423aebfdfcad2f77d498ff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -798,7 +798,7 @@ public final class CraftServer implements Server {
|
||||
@@ -799,7 +799,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public long getConnectionThrottle() {
|
||||
// Spigot Start - Automatically set connection throttle for bungee configurations
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren