diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 89ea77ab39..815df465c6 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -1941,7 +1941,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // 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 @@ -2827,9 +2827,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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/Player.setPlayerProfile-API.patch b/patches/server/Player.setPlayerProfile-API.patch index e80ec0a1be..9f40782689 100644 --- a/patches/server/Player.setPlayerProfile-API.patch +++ b/patches/server/Player.setPlayerProfile-API.patch @@ -129,7 +129,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + //Respawn the player then update their position and selected slot + ServerLevel worldserver = handle.getLevel(); -+ connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeRegistration(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), true)); ++ connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), true, this.getHandle().getLastDeathLocation())); + handle.onUpdateAbilities(); + connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet(), 0, false)); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle); diff --git a/patches/server/ProfileWhitelistVerifyEvent.patch b/patches/server/ProfileWhitelistVerifyEvent.patch index c6d1894941..b797a95db9 100644 --- a/patches/server/ProfileWhitelistVerifyEvent.patch +++ b/patches/server/ProfileWhitelistVerifyEvent.patch @@ -22,15 +22,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 IpBanListEntry ipbanentry = this.ipBans.get(socketaddress); @@ -0,0 +0,0 @@ public abstract class PlayerList { - this.server.getCommands().sendCommands(player); } -+ // 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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;