diff --git a/patches/server/0008-Adventure.patch b/patches/server/0008-Adventure.patch index 4df077cb9d..9547f2c5d5 100644 --- a/patches/server/0008-Adventure.patch +++ b/patches/server/0008-Adventure.patch @@ -1822,7 +1822,7 @@ index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c18 } collection = icons; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index daf5dc59a1883570569798630c4991e676e34c1c..5408ba255ee04b75e2f4977fc7aa73866945037c 100644 +index daf5dc59a1883570569798630c4991e676e34c1c..d3d8935bafb2e0773c96c5807ebd23f20de26592 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -581,8 +581,10 @@ public final class CraftServer implements Server { @@ -1941,7 +1941,7 @@ index daf5dc59a1883570569798630c4991e676e34c1c..5408ba255ee04b75e2f4977fc7aa7386 + // Paper start + @Override + public net.kyori.adventure.text.Component motd() { -+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(new net.minecraft.network.chat.TextComponent(console.getMotd())); ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(net.minecraft.network.chat.Component.literal(console.getMotd())); + } + // Paper end @Override @@ -2472,7 +2472,7 @@ index 446fdca49a5a6999626a7ee3a1d5c168b15a09dd..f9863e138994f6c7a7975a852f106faa public boolean isOp() { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 765659b39d30e2e5c491c0808fe1808776ea767b..fd29be7680b601572c97889dbc780a7f179ab831 100644 +index 765659b39d30e2e5c491c0808fe1808776ea767b..1b881118457da8f51fb579a4298927f41eb0bbe6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -270,14 +270,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2827,9 +2827,9 @@ index 765659b39d30e2e5c491c0808fe1808776ea767b..fd29be7680b601572c97889dbc780a7f + final ResourceLocation name = io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.name()); + final java.util.Optional event = net.minecraft.core.Registry.SOUND_EVENT.getOptional(name); + if (event.isPresent()) { -+ this.getHandle().connection.send(new ClientboundSoundPacket(event.get(), io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), x, y, z, sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); ++ this.getHandle().connection.send(new ClientboundSoundPacket(event.get(), io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), x, y, z, sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); // TODO adventure sound seed + } else { -+ this.getHandle().connection.send(new ClientboundCustomSoundPacket(name, io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), new Vec3(x, y, z), sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); ++ this.getHandle().connection.send(new ClientboundCustomSoundPacket(name, io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), new Vec3(x, y, z), sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); // TODO adventure sound seed + } + } + @@ -2847,9 +2847,9 @@ index 765659b39d30e2e5c491c0808fe1808776ea767b..fd29be7680b601572c97889dbc780a7f + final ResourceLocation name = io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.name()); + final java.util.Optional event = net.minecraft.core.Registry.SOUND_EVENT.getOptional(name); + if (event.isPresent()) { -+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSoundEntityPacket(event.get(), io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), entity, sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); ++ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSoundEntityPacket(event.get(), io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), entity, sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); // TODO adventure sound seed + } else { -+ this.getHandle().connection.send(new ClientboundCustomSoundPacket(name, io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), entity.position(), sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); ++ this.getHandle().connection.send(new ClientboundCustomSoundPacket(name, io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), entity.position(), sound.volume(), sound.pitch(), this.getHandle().getRandom().nextLong())); // TODO adventure sound seed + } + } + diff --git a/patches/server/0147-ProfileWhitelistVerifyEvent.patch b/patches/server/0147-ProfileWhitelistVerifyEvent.patch index 7d078bf146..85f15ac288 100644 --- a/patches/server/0147-ProfileWhitelistVerifyEvent.patch +++ b/patches/server/0147-ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b099e999a 100644 +index 41924db9df7d3d9df0385d3274894ef8058cf2c6..fe1636a73f1af09314a200b99c196984d09a4b4a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -619,9 +619,9 @@ public abstract class PlayerList { @@ -21,16 +21,15 @@ index 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) { IpBanListEntry ipbanentry = this.ipBans.get(socketaddress); -@@ -1002,9 +1002,25 @@ public abstract class PlayerList { - this.server.getCommands().sendCommands(player); +@@ -1003,7 +1003,23 @@ public abstract class PlayerList { } -+ // Paper start public boolean isWhiteListed(GameProfile profile) { - return !this.doWhiteList || this.ops.contains(profile) || this.whitelist.contains(profile); -+ return isWhitelisted(profile, null); ++ // Paper start ++ return isWhiteListed(profile, null); + } -+ public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { ++ public boolean isWhiteListed(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { + boolean isOp = this.ops.contains(gameprofile); + boolean isWhitelisted = !this.doWhiteList || isOp || this.whitelist.contains(gameprofile); + final com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent event; @@ -43,8 +42,7 @@ index 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b + return false; + } + return true; ++ // Paper end } -+ // Paper end public boolean isOp(GameProfile profile) { - return this.ops.contains(profile) || this.server.isSingleplayerOwner(profile) && this.server.getWorldData().getAllowCommands() || this.allowCheatsForAllPlayers; diff --git a/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch index c196a608f5..83f07f24fa 100644 --- a/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch +++ b/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch @@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4 public ClientboundStatusResponsePacket(ServerStatus metadata) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f67392be663dd558ce6458dc210c6ac90538d9e5..661ee126886691cbd6db1a6e08ec6ab402698a76 100644 +index 64a6f488be70dafc09c8d713aa4d9edd4a70177a..b031d4340dbee22108f8cbc15729337c50160a29 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -203,7 +203,7 @@ index f67392be663dd558ce6458dc210c6ac90538d9e5..661ee126886691cbd6db1a6e08ec6ab4 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1312,7 +1315,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop