diff --git a/patches/unapplied/server/API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/API-for-creating-command-sender-which-forwards-feedb.patch similarity index 100% rename from patches/unapplied/server/API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/API-for-creating-command-sender-which-forwards-feedb.patch diff --git a/patches/unapplied/server/Add-GameEvent-tags.patch b/patches/server/Add-GameEvent-tags.patch similarity index 100% rename from patches/unapplied/server/Add-GameEvent-tags.patch rename to patches/server/Add-GameEvent-tags.patch diff --git a/patches/unapplied/server/Add-config-option-for-worlds-affected-by-time-cmd.patch b/patches/server/Add-config-option-for-worlds-affected-by-time-cmd.patch similarity index 100% rename from patches/unapplied/server/Add-config-option-for-worlds-affected-by-time-cmd.patch rename to patches/server/Add-config-option-for-worlds-affected-by-time-cmd.patch diff --git a/patches/unapplied/server/Add-configurable-height-for-slime-spawn.patch b/patches/server/Add-configurable-height-for-slime-spawn.patch similarity index 100% rename from patches/unapplied/server/Add-configurable-height-for-slime-spawn.patch rename to patches/server/Add-configurable-height-for-slime-spawn.patch diff --git a/patches/unapplied/server/Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 100% rename from patches/unapplied/server/Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch diff --git a/patches/unapplied/server/Add-missing-block-data-mins-and-maxes.patch b/patches/server/Add-missing-block-data-mins-and-maxes.patch similarity index 100% rename from patches/unapplied/server/Add-missing-block-data-mins-and-maxes.patch rename to patches/server/Add-missing-block-data-mins-and-maxes.patch diff --git a/patches/unapplied/server/Add-missing-structure-set-seed-configs.patch b/patches/server/Add-missing-structure-set-seed-configs.patch similarity index 100% rename from patches/unapplied/server/Add-missing-structure-set-seed-configs.patch rename to patches/server/Add-missing-structure-set-seed-configs.patch diff --git a/patches/unapplied/server/Add-new-overload-to-PersistentDataContainer-has.patch b/patches/server/Add-new-overload-to-PersistentDataContainer-has.patch similarity index 100% rename from patches/unapplied/server/Add-new-overload-to-PersistentDataContainer-has.patch rename to patches/server/Add-new-overload-to-PersistentDataContainer-has.patch diff --git a/patches/unapplied/server/Added-getHostname-to-AsyncPlayerPreLoginEvent.patch b/patches/server/Added-getHostname-to-AsyncPlayerPreLoginEvent.patch similarity index 95% rename from patches/unapplied/server/Added-getHostname-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/Added-getHostname-to-AsyncPlayerPreLoginEvent.patch index a2c6b0afc3..7255630649 100644 --- a/patches/unapplied/server/Added-getHostname-to-AsyncPlayerPreLoginEvent.patch +++ b/patches/server/Added-getHostname-to-AsyncPlayerPreLoginEvent.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // Paper start - com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(ServerLoginPacketListenerImpl.this.gameProfile); + com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile); - AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile); // Paper - add rawAddress + AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile, ServerLoginPacketListenerImpl.this.connection.hostname); // Paper - add rawAddress & hostname server.getPluginManager().callEvent(asyncEvent); diff --git a/patches/unapplied/server/Configurable-sculk-sensor-listener-range.patch b/patches/server/Configurable-sculk-sensor-listener-range.patch similarity index 100% rename from patches/unapplied/server/Configurable-sculk-sensor-listener-range.patch rename to patches/server/Configurable-sculk-sensor-listener-range.patch diff --git a/patches/unapplied/server/Custom-Potion-Mixes.patch b/patches/server/Custom-Potion-Mixes.patch similarity index 99% rename from patches/unapplied/server/Custom-Potion-Mixes.patch rename to patches/server/Custom-Potion-Mixes.patch index 85a4800a5d..9f65367b82 100644 --- a/patches/unapplied/server/Custom-Potion-Mixes.patch +++ b/patches/server/Custom-Potion-Mixes.patch @@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end Potion potion = PotionUtils.getPotion(input); Item item = input.getItem(); - int i = 0; + @@ -0,0 +0,0 @@ public class PotionBrewing { return input; } diff --git a/patches/unapplied/server/Dolphin-API.patch b/patches/server/Dolphin-API.patch similarity index 100% rename from patches/unapplied/server/Dolphin-API.patch rename to patches/server/Dolphin-API.patch diff --git a/patches/unapplied/server/Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 95% rename from patches/unapplied/server/Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index b20a028e48..78175cc00e 100644 --- a/patches/unapplied/server/Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages()); -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } else { Optional optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages()); -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); diff --git a/patches/unapplied/server/Make-water-animal-spawn-height-configurable.patch b/patches/server/Make-water-animal-spawn-height-configurable.patch similarity index 100% rename from patches/unapplied/server/Make-water-animal-spawn-height-configurable.patch rename to patches/server/Make-water-animal-spawn-height-configurable.patch diff --git a/patches/unapplied/server/More-PotionEffectType-API.patch b/patches/server/More-PotionEffectType-API.patch similarity index 96% rename from patches/unapplied/server/More-PotionEffectType-API.patch rename to patches/server/More-PotionEffectType-API.patch index 75623124a8..a36259616c 100644 --- a/patches/unapplied/server/More-PotionEffectType-API.patch +++ b/patches/server/More-PotionEffectType-API.patch @@ -9,9 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java @@ -0,0 +0,0 @@ public class CraftPotionEffectType extends PotionEffectType { - public Color getColor() { - return Color.fromRGB(this.handle.getColor()); + return CraftRegistry.getMinecraftRegistry(Registries.MOB_EFFECT) + .getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow(); } ++ + // Paper start + @Override + public org.bukkit.NamespacedKey getKey() { diff --git a/patches/unapplied/server/Multi-Block-Change-API-Implementation.patch b/patches/server/Multi-Block-Change-API-Implementation.patch similarity index 100% rename from patches/unapplied/server/Multi-Block-Change-API-Implementation.patch rename to patches/server/Multi-Block-Change-API-Implementation.patch diff --git a/patches/unapplied/server/Multiple-Entries-with-Scoreboards.patch b/patches/server/Multiple-Entries-with-Scoreboards.patch similarity index 100% rename from patches/unapplied/server/Multiple-Entries-with-Scoreboards.patch rename to patches/server/Multiple-Entries-with-Scoreboards.patch diff --git a/patches/unapplied/server/Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/Option-to-have-default-CustomSpawners-in-custom-worl.patch similarity index 100% rename from patches/unapplied/server/Option-to-have-default-CustomSpawners-in-custom-worl.patch rename to patches/server/Option-to-have-default-CustomSpawners-in-custom-worl.patch diff --git a/patches/unapplied/server/Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/Put-world-into-worldlist-before-initing-the-world.patch similarity index 93% rename from patches/unapplied/server/Put-world-into-worldlist-before-initing-the-world.patch rename to patches/server/Put-world-into-worldlist-before-initing-the-world.patch index cf12637cc8..bd59668813 100644 --- a/patches/unapplied/server/Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/Put-world-into-worldlist-before-initing-the-world.patch @@ -38,4 +38,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper - move up this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal); - //internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system + internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API diff --git a/patches/unapplied/server/Reset-placed-block-on-exception.patch b/patches/server/Reset-placed-block-on-exception.patch similarity index 100% rename from patches/unapplied/server/Reset-placed-block-on-exception.patch rename to patches/server/Reset-placed-block-on-exception.patch diff --git a/patches/unapplied/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 100% rename from patches/unapplied/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/Use-a-CHM-for-StructureTemplate.Pallete-cache.patch diff --git a/patches/unapplied/server/Validate-usernames.patch b/patches/server/Validate-usernames.patch similarity index 93% rename from patches/unapplied/server/Validate-usernames.patch rename to patches/server/Validate-usernames.patch index 2ff063deb5..371a8dee48 100644 --- a/patches/unapplied/server/Validate-usernames.patch +++ b/patches/server/Validate-usernames.patch @@ -9,15 +9,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + private GameProfile authenticatedProfile; private final String serverId; - @Nullable - private ServerPlayer delayedAcceptPlayer; + private ServerPlayer player; // CraftBukkit + public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { this.state = ServerLoginPacketListenerImpl.State.HELLO; @@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - // Paper end + return this.requestedUsername != null ? this.requestedUsername + " (" + s + ")" : s; } + // Paper start - validate usernames @@ -52,9 +52,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + // Paper end - validate usernames + this.requestedUsername = packet.name(); GameProfile gameprofile = this.server.getSingleplayerProfile(); - if (gameprofile != null && packet.name().equalsIgnoreCase(gameprofile.getName())) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java