Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
13eb4146 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent

CraftBukkit Changes:
5ee3419b7 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent

Spigot Changes:
514cf03a Rebuild patches and add RespawnReason.PLUGIN to Player#respawn
This commit is contained in:
Nassim Jahnke 2023-04-10 10:03:36 +02:00
parent b626528da0
commit 058d7c1aa3
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
131 changed files with 487 additions and 485 deletions

View File

@ -5,32 +5,34 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent
diff --git a/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java b/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java
index f5bdb5244c8d993c624f938c8fb7ccff74655d75..3715584a8289200ffb968e384e359ab574aaec5c 100644
index 03225d2b4c91caa58c2995d9cf0e7fb4663749ab..b45f265ec7819b06a9a8361e8c1e43fd88b3138b 100644
--- a/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java
@@ -17,17 +17,30 @@ public class PlayerRespawnEvent extends PlayerEvent {
private Location respawnLocation;
@@ -18,6 +18,7 @@ public class PlayerRespawnEvent extends PlayerEvent {
private final boolean isBedSpawn;
private final boolean isAnchorSpawn;
private final RespawnReason respawnReason;
+ private final java.util.Set<RespawnFlag> respawnFlags; // Paper
@Deprecated
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn) {
this(respawnPlayer, respawnLocation, isBedSpawn, false);
@@ -29,12 +30,24 @@ public class PlayerRespawnEvent extends PlayerEvent {
this(respawnPlayer, respawnLocation, isBedSpawn, false, RespawnReason.PLUGIN);
}
+ @Deprecated // Paper
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn) {
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn, @NotNull final RespawnReason respawnReason) {
+ // Paper start
+ this(respawnPlayer, respawnLocation, isBedSpawn, isAnchorSpawn, com.google.common.collect.ImmutableSet.builder());
+ this(respawnPlayer, respawnLocation, isBedSpawn, isAnchorSpawn, respawnReason, com.google.common.collect.ImmutableSet.builder());
+ }
+
+ public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn, @NotNull final com.google.common.collect.ImmutableSet.Builder<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag> respawnFlags) {
+ public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn, @NotNull final RespawnReason respawnReason, @NotNull final com.google.common.collect.ImmutableSet.Builder<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag> respawnFlags) {
+ // Paper end
super(respawnPlayer);
this.respawnLocation = respawnLocation;
this.isBedSpawn = isBedSpawn;
this.isAnchorSpawn = isAnchorSpawn;
this.respawnReason = respawnReason;
+ // Paper start
+ if (this.isBedSpawn) { respawnFlags.add(RespawnFlag.BED_SPAWN); }
+ if (this.isAnchorSpawn) { respawnFlags.add(RespawnFlag.ANCHOR_SPAWN); }
@ -39,9 +41,9 @@ index f5bdb5244c8d993c624f938c8fb7ccff74655d75..3715584a8289200ffb968e384e359ab5
}
/**
@@ -80,4 +93,31 @@ public class PlayerRespawnEvent extends PlayerEvent {
public static HandlerList getHandlerList() {
return handlers;
@@ -116,4 +129,31 @@ public class PlayerRespawnEvent extends PlayerEvent {
*/
PLUGIN;
}
+
+ // Paper start

View File

@ -6593,10 +6593,10 @@ index a63d5ba706a5b8e430aedc045bdeb3a410bd0eef..e96a0ca47e4701ba187555bd92c96834
public BlockState getBlockState(BlockPos pos) {
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b001044f221b04d185522932b8e3b7591afac3db..6529064505dc3de875be1764f88897736b85975d 100644
index 3ab9d73dd1f2d2ade24b3e04616a5312debd948f..7a8b26068a244be553d55f0018a9edebe00b6dff 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -182,6 +182,7 @@ public abstract class PlayerList {
@@ -183,6 +183,7 @@ public abstract class PlayerList {
}
public void placeNewPlayer(Connection connection, ServerPlayer player) {

View File

@ -2319,7 +2319,7 @@ index 3243cfd90e11176efc2059d864fb962497d70942..7e4c10bfdaf1e7f2dfc03d220e5c7319
// CraftBukkit end
this.chatVisibility = packet.chatVisibility();
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0975e4fbf 100644
index 29cbad55217400f5ba830b876422dc1823c33a71..9116de00912e07dc049735a183719f6f8c2660b4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -187,6 +187,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
@ -2331,7 +2331,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
import com.mojang.datafixers.util.Pair;
import java.util.Arrays;
import java.util.concurrent.ExecutionException;
@@ -250,7 +252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -251,7 +253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private static final int NO_BLOCK_UPDATES_TO_ACK = -1;
private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096;
private static final Component CHAT_VALIDATION_FAILED = Component.translatable("multiplayer.disconnect.chat_validation_failed");
@ -2340,7 +2340,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
private final MinecraftServer server;
public ServerPlayer player;
private int tickCount;
@@ -438,14 +440,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -439,14 +441,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return this.server.isSingleplayerOwner(this.player.getGameProfile());
}
@ -2364,7 +2364,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
// CraftBukkit start - fire PlayerKickEvent
if (this.processedDisconnect) {
return;
@@ -454,7 +459,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -455,7 +460,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Waitable waitable = new Waitable() {
@Override
protected Object evaluate() {
@ -2373,7 +2373,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
return null;
}
};
@@ -471,9 +476,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -472,9 +477,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}
@ -2385,7 +2385,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
@@ -485,7 +490,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -486,7 +491,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
// Send the possibly modified leave message
@ -2394,7 +2394,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
// CraftBukkit end
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
@@ -1782,9 +1787,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1783,9 +1788,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
*/
this.player.disconnect();
@ -2409,7 +2409,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
}
// CraftBukkit end
this.player.getTextFilter().leave();
@@ -1881,11 +1888,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1882,11 +1889,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent());
@ -2423,7 +2423,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
this.broadcastChatMessage(playerchatmessage1);
}, this.server.chatExecutor); // CraftBukkit - async chat
@@ -1985,7 +1992,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1986,7 +1993,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);
if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
@ -2432,7 +2432,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
return Optional.empty();
} else {
this.player.resetLastActionTime();
@@ -2043,7 +2050,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2044,7 +2051,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@ -2446,7 +2446,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
Player player = this.getCraftPlayer();
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
@@ -2173,7 +2185,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2174,7 +2186,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
});
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check
@ -2455,7 +2455,7 @@ index 000fd11480d783eab80a93fedde48f66e6b1298b..b3b6121dcfb6451d177431d51fa8a3e0
} else {
this.chat(s, message, true);
}
@@ -2995,30 +3007,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2996,30 +3008,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}
@ -2535,7 +2535,7 @@ index 1cb95db25a20d38faacd99a5805630c1598e9db3..d99b2235038eb1aba8cda474c4aa51e2
@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0e3e1729f 100644
index 7a8b26068a244be553d55f0018a9edebe00b6dff..d00a2da03f8911f0e07ca22c8c569be7fc189842 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -8,6 +8,7 @@ import com.mojang.logging.LogUtils;
@ -2546,7 +2546,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
import java.io.File;
import java.net.SocketAddress;
import java.nio.file.Path;
@@ -273,7 +274,7 @@ public abstract class PlayerList {
@@ -274,7 +275,7 @@ public abstract class PlayerList {
}
// CraftBukkit start
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
@ -2555,7 +2555,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
ServerStatus serverping = this.server.getStatus();
@@ -294,19 +295,18 @@ public abstract class PlayerList {
@@ -295,19 +296,18 @@ public abstract class PlayerList {
// Ensure that player inventory is populated with its viewer
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
@ -2580,7 +2580,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
}
// CraftBukkit end
@@ -503,7 +503,7 @@ public abstract class PlayerList {
@@ -504,7 +504,7 @@ public abstract class PlayerList {
}
@ -2589,7 +2589,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
ServerLevel worldserver = entityplayer.getLevel();
entityplayer.awardStat(Stats.LEAVE_GAME);
@@ -514,7 +514,7 @@ public abstract class PlayerList {
@@ -515,7 +515,7 @@ public abstract class PlayerList {
entityplayer.closeContainer();
}
@ -2598,7 +2598,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
@@ -567,7 +567,7 @@ public abstract class PlayerList {
@@ -568,7 +568,7 @@ public abstract class PlayerList {
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end
@ -2607,7 +2607,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
}
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
@@ -613,10 +613,10 @@ public abstract class PlayerList {
@@ -614,10 +614,10 @@ public abstract class PlayerList {
}
// return chatmessage;
@ -2620,7 +2620,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -626,17 +626,17 @@ public abstract class PlayerList {
@@ -627,17 +627,17 @@ public abstract class PlayerList {
}
// return chatmessage;
@ -2641,7 +2641,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
return null;
}
return entity;
@@ -1147,7 +1147,7 @@ public abstract class PlayerList {
@@ -1148,7 +1148,7 @@ public abstract class PlayerList {
public void removeAll() {
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
@ -2650,7 +2650,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
}
// CraftBukkit end
@@ -1188,24 +1188,43 @@ public abstract class PlayerList {
@@ -1189,24 +1189,43 @@ public abstract class PlayerList {
}
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
@ -2697,7 +2697,7 @@ index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0
}
if (flag1 && sender != null) {
@@ -1214,7 +1233,7 @@ public abstract class PlayerList {
@@ -1215,7 +1234,7 @@ public abstract class PlayerList {
}
@ -3471,10 +3471,10 @@ 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 f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf206a4d55 100644
index e108a2b346c5f8b87165a5d1b259784f23fef2b7..9ee53533095259c9af9ce31840c9039dc456dafa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -279,14 +279,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -280,14 +280,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getDisplayName() {
@ -3514,7 +3514,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
@Override
public String getPlayerListName() {
return this.getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
@@ -305,42 +330,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -306,42 +331,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -3566,7 +3566,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
this.getHandle().connection.send(packet);
}
@@ -372,6 +397,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -373,6 +398,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.disconnect(message == null ? "" : message);
}
@ -3590,7 +3590,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
@Override
public void setCompassTarget(Location loc) {
if (this.getHandle().connection == null) return;
@@ -700,6 +742,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -701,6 +743,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}
@ -3626,7 +3626,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
@Override
public void sendSignChange(Location loc, String[] lines) {
this.sendSignChange(loc, lines, DyeColor.BLACK);
@@ -727,14 +798,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -728,14 +799,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
Component[] components = CraftSign.sanitizeLines(lines);
@ -3644,7 +3644,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
}
@Override
@@ -1616,7 +1688,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1618,7 +1690,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setResourcePack(String url) {
@ -3653,7 +3653,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
}
@Override
@@ -1631,7 +1703,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1633,7 +1705,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setResourcePack(String url, byte[] hash, boolean force) {
@ -3662,7 +3662,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
}
@Override
@@ -1647,6 +1719,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1649,6 +1721,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -3684,7 +3684,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
public void addChannel(String channel) {
Preconditions.checkState(this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
channel = StandardMessenger.validateAndCorrectChannel(channel);
@@ -2051,6 +2138,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2053,6 +2140,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (this.getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : this.getHandle().clientViewDistance;
}
@ -3697,7 +3697,7 @@ index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf
@Override
public int getPing() {
return this.getHandle().latency;
@@ -2096,6 +2189,254 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2098,6 +2191,254 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().allowsListing();
}

View File

@ -1270,10 +1270,10 @@ index aa164a81d072d9390fa1400120e801979e5d74d0..f2798373e7d07cc0e46c39297c29e7be
this.entityManager.saveAll();
} else {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b3b6121dcfb6451d177431d51fa8a3e0975e4fbf..f4db9e1f22e8954665d8a971b5f044e113fa173b 100644
index 9116de00912e07dc049735a183719f6f8c2660b4..e9c8c008ce37ceec3be993e672786eaeb8d01a7e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -337,7 +337,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -338,7 +338,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void tick() {
@ -1281,7 +1281,7 @@ index b3b6121dcfb6451d177431d51fa8a3e0975e4fbf..f4db9e1f22e8954665d8a971b5f044e1
if (this.ackBlockChangesUpTo > -1) {
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
this.ackBlockChangesUpTo = -1;
@@ -418,7 +417,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -419,7 +418,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
}
@ -1289,7 +1289,7 @@ index b3b6121dcfb6451d177431d51fa8a3e0975e4fbf..f4db9e1f22e8954665d8a971b5f044e1
}
@@ -2137,7 +2135,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2138,7 +2136,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
private void handleCommand(String s) {
@ -1298,7 +1298,7 @@ index b3b6121dcfb6451d177431d51fa8a3e0975e4fbf..f4db9e1f22e8954665d8a971b5f044e1
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
@@ -2147,7 +2145,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2148,7 +2146,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -1307,7 +1307,7 @@ index b3b6121dcfb6451d177431d51fa8a3e0975e4fbf..f4db9e1f22e8954665d8a971b5f044e1
return;
}
@@ -2160,7 +2158,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2161,7 +2159,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@ -1317,7 +1317,7 @@ index b3b6121dcfb6451d177431d51fa8a3e0975e4fbf..f4db9e1f22e8954665d8a971b5f044e1
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index d19d1f1595a226ce0472be5e2efafbc0e3e1729f..470e752234813d1031721be95d0bf1178e423a59 100644
index d00a2da03f8911f0e07ca22c8c569be7fc189842..53e85923c417cf4d853c27e6fedbe7ff525a897c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1,5 +1,6 @@
@ -1327,7 +1327,7 @@ index d19d1f1595a226ce0472be5e2efafbc0e3e1729f..470e752234813d1031721be95d0bf117
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1036,10 +1037,11 @@ public abstract class PlayerList {
@@ -1037,10 +1038,11 @@ public abstract class PlayerList {
}
public void saveAll() {
@ -1846,10 +1846,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ba2853ae514e31bf46a72e2f845c8edf206a4d55..67cfa69c73c04931a190918c17a1cd5f9cb006c6 100644
index 9ee53533095259c9af9ce31840c9039dc456dafa..97a8c43ff3f32d929de117ff608a69221b1ab571 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2522,6 +2522,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2524,6 +2524,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
}

View File

@ -15915,10 +15915,10 @@ index e96a0ca47e4701ba187555bd92c968345bc85677..73b96f804079288e9c5fcc11da54e61e
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f4db9e1f22e8954665d8a971b5f044e113fa173b..c1db84d0ed569dd44d1f54cca227f77890e0f66a 100644
index e9c8c008ce37ceec3be993e672786eaeb8d01a7e..542c6ebbf01b91709b73052eca3889347a5aa90a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -778,6 +778,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -779,6 +779,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.disconnect(Component.translatable("disconnect.spam"));
return;
}
@ -15933,10 +15933,10 @@ index f4db9e1f22e8954665d8a971b5f044e113fa173b..c1db84d0ed569dd44d1f54cca227f778
StringReader stringreader = new StringReader(packet.getCommand());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 470e752234813d1031721be95d0bf1178e423a59..23edaa206ef8f9ca9ecea0fdd7f0b58ed9fa3a12 100644
index 53e85923c417cf4d853c27e6fedbe7ff525a897c..cb365522a2b462e8c3e44eac68c64ad99c8738ff 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -252,7 +252,7 @@ public abstract class PlayerList {
@@ -253,7 +253,7 @@ public abstract class PlayerList {
boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
// Spigot - view distance
@ -15945,7 +15945,7 @@ index 470e752234813d1031721be95d0bf1178e423a59..23edaa206ef8f9ca9ecea0fdd7f0b58e
player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
playerconnection.send(new ClientboundUpdateEnabledFeaturesPacket(FeatureFlags.REGISTRY.toNames(worldserver1.enabledFeatures())));
playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName())));
@@ -790,8 +790,8 @@ public abstract class PlayerList {
@@ -791,8 +791,8 @@ public abstract class PlayerList {
// CraftBukkit start
LevelData worlddata = worldserver1.getLevelData();
entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation()));
@ -15956,7 +15956,7 @@ index 470e752234813d1031721be95d0bf1178e423a59..23edaa206ef8f9ca9ecea0fdd7f0b58e
entityplayer1.spawnIn(worldserver1);
entityplayer1.unsetRemoved();
entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot()));
@@ -1287,7 +1287,7 @@ public abstract class PlayerList {
@@ -1288,7 +1288,7 @@ public abstract class PlayerList {
public void setViewDistance(int viewDistance) {
this.viewDistance = viewDistance;
@ -15965,7 +15965,7 @@ index 470e752234813d1031721be95d0bf1178e423a59..23edaa206ef8f9ca9ecea0fdd7f0b58e
Iterator iterator = this.server.getAllLevels().iterator();
while (iterator.hasNext()) {
@@ -1302,7 +1302,7 @@ public abstract class PlayerList {
@@ -1303,7 +1303,7 @@ public abstract class PlayerList {
public void setSimulationDistance(int simulationDistance) {
this.simulationDistance = simulationDistance;
@ -17997,10 +17997,10 @@ index 4186943ba9e94758d579477e8fadaf8e05ef93f3..1684b3ee1b51597e799486bbe129b344
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 67cfa69c73c04931a190918c17a1cd5f9cb006c6..83471457a723a41141d06f0fd11a042d6e5d7918 100644
index 97a8c43ff3f32d929de117ff608a69221b1ab571..6d14414d7ee86dcb176ad46c564d6823b0bd16a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -178,6 +178,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -179,6 +179,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = System.currentTimeMillis();
}

View File

@ -137,10 +137,10 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75
for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 83471457a723a41141d06f0fd11a042d6e5d7918..de288116429c7ee87ba2e180e3e39855feee27f5 100644
index 6d14414d7ee86dcb176ad46c564d6823b0bd16a3..889ef0d01fd8d6c77e5721beceb9b911a793ab3e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2227,8 +2227,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2229,8 +2229,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
return this.getHandle().locale;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index de288116429c7ee87ba2e180e3e39855feee27f5..1e710c73c45fc34d2809e75b5e43c32e1cd7c7f1 100644
index 889ef0d01fd8d6c77e5721beceb9b911a793ab3e..d5f8446aeb34cc3e6102907ce3f7fff3eef4a6ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1896,12 +1896,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1898,12 +1898,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {

View File

@ -30,10 +30,10 @@ index edb8537e4fdd82991eda914a7d5c3ff6ef773fe0..e1b545cda20f5f165497b751044ff323
this.locale = packet.language;
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1e710c73c45fc34d2809e75b5e43c32e1cd7c7f1..7a2db8458cffd98e8324da101a27b3aee20bbeed 100644
index d5f8446aeb34cc3e6102907ce3f7fff3eef4a6ff..af749f1cc8555140c248f5539ae3db03db3be1fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2227,8 +2227,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2229,8 +2229,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {

View File

@ -12,10 +12,10 @@ improve setPosition to use raw
public net.minecraft.world.entity.Entity setRot(FF)V
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 23edaa206ef8f9ca9ecea0fdd7f0b58ed9fa3a12..434a980904d278148d53a7bf31575c2f3c9392a7 100644
index cb365522a2b462e8c3e44eac68c64ad99c8738ff..c416b0c670d5c1f43d5b2a097e068bc51a6c660d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -230,7 +230,7 @@ public abstract class PlayerList {
@@ -231,7 +231,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player spawnPlayer = player.getBukkitEntity();
@ -24,7 +24,7 @@ index 23edaa206ef8f9ca9ecea0fdd7f0b58ed9fa3a12..434a980904d278148d53a7bf31575c2f
this.cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
@@ -238,7 +238,10 @@ public abstract class PlayerList {
@@ -239,7 +239,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level);

View File

@ -21,10 +21,10 @@ character.
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c1db84d0ed569dd44d1f54cca227f77890e0f66a..026b43e74d99d7b5a971e4de996a30f02d0f8d24 100644
index 542c6ebbf01b91709b73052eca3889347a5aa90a..0da739370a9cbbde1f2bec8d04a6ab6f6971017d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2035,7 +2035,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return true;
}
@ -33,7 +33,7 @@ index c1db84d0ed569dd44d1f54cca227f77890e0f66a..026b43e74d99d7b5a971e4de996a30f0
for (int i = 0; i < message.length(); ++i) {
if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) {
return true;
@@ -2051,7 +2051,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2052,7 +2052,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
@ -42,7 +42,7 @@ index c1db84d0ed569dd44d1f54cca227f77890e0f66a..026b43e74d99d7b5a971e4de996a30f0
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@@ -2141,7 +2141,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2142,7 +2142,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}
@ -107,10 +107,10 @@ index 77b8b4d56883dcf672af82189da75ddef7c935a2..af2d401c3faa14664732c001a1ea59f6
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 7a2db8458cffd98e8324da101a27b3aee20bbeed..34aca43bf55be421755dd5aff7abc5a833e08ce7 100644
index af749f1cc8555140c248f5539ae3db03db3be1fb..5db676928fc9a13e58cfd5d633ec5c9a69cb986e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -506,7 +506,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -507,7 +507,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void chat(String msg) {
if (this.getHandle().connection == null) return;

View File

@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 34aca43bf55be421755dd5aff7abc5a833e08ce7..3429595e2a28bda3430ac198e60798374a7fc051 100644
index 5db676928fc9a13e58cfd5d633ec5c9a69cb986e..e7f31e33efe2ae33beca4f46f34d77fbcf2bb0b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@ -73,7 +73,7 @@ index 34aca43bf55be421755dd5aff7abc5a833e08ce7..3429595e2a28bda3430ac198e6079837
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
@@ -352,6 +353,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -353,6 +354,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

View File

@ -16,15 +16,15 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3429595e2a28bda3430ac198e60798374a7fc051..41753aff6c12c9ceb142b886c35a62bd86e430e7 100644
index e7f31e33efe2ae33beca4f46f34d77fbcf2bb0b4..51c953432e4055962afda5c5cdb24f33ac0502a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1208,7 +1208,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
@@ -1210,7 +1210,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entity.connection.teleport(to);
} else {
- server.getHandle().respawn(entity, toWorld, true, to, true);
+ server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck); // Paper
// The respawn reason should never be used if the passed location is non null.
- server.getHandle().respawn(entity, toWorld, true, to, true, null);
+ server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck, null); // Paper
}
return true;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 026b43e74d99d7b5a971e4de996a30f02d0f8d24..cf905220ac5bbce62e5e061f0dfc96906fc29328 100644
index 0da739370a9cbbde1f2bec8d04a6ab6f6971017d..19733418e80d49f65290ba898caf71aa3b0e5334 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1754,8 +1754,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1755,8 +1755,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
}
@ -23,10 +23,10 @@ index 026b43e74d99d7b5a971e4de996a30f02d0f8d24..cf905220ac5bbce62e5e061f0dfc9690
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 41753aff6c12c9ceb142b886c35a62bd86e430e7..be1f40a40d805f2e7cde39d5636a9fc793718b93 100644
index 51c953432e4055962afda5c5cdb24f33ac0502a1..618e0f885089223596c290c9a42f67d24f43e3be 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -154,6 +154,7 @@ import org.bukkit.plugin.Plugin;
@@ -155,6 +155,7 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.messaging.StandardMessenger;
import org.bukkit.profile.PlayerProfile;
import org.bukkit.scoreboard.Scoreboard;
@ -34,7 +34,7 @@ index 41753aff6c12c9ceb142b886c35a62bd86e430e7..be1f40a40d805f2e7cde39d5636a9fc7
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@@ -172,6 +173,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -173,6 +174,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double healthScale = 20;
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
@ -45,7 +45,7 @@ index 41753aff6c12c9ceb142b886c35a62bd86e430e7..be1f40a40d805f2e7cde39d5636a9fc7
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -2350,6 +2355,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2352,6 +2357,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning;
}

View File

@ -44,10 +44,10 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index be1f40a40d805f2e7cde39d5636a9fc793718b93..2e1d8d53f91bccf3cd565b94b8ab5949f470cbd5 100644
index 618e0f885089223596c290c9a42f67d24f43e3be..532b62d9cbfd9e7586b4df84fb0f1598a5e19e02 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2155,6 +2155,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2157,6 +2157,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

View File

@ -22,10 +22,10 @@ index a5d57cc862036012d83b090bb1b3ccf4115a88b3..21068f766b75c414d5818073b7dca083
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cf905220ac5bbce62e5e061f0dfc96906fc29328..dfff872200195b90c51b05188b4a3c53e799249d 100644
index 19733418e80d49f65290ba898caf71aa3b0e5334..e4becdbb95f0309b9173722762836037dc38b33d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2534,8 +2534,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2535,8 +2535,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
});
}
}

View File

@ -43,7 +43,7 @@ index f48d3bbbfd5b4ebb9c22c6dc2a17a9030af2edf5..2ea0cb1f9bfc5ef7bd8c78cf259da13b
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
this.connection.acceptConnections();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 434a980904d278148d53a7bf31575c2f3c9392a7..75385e9b0886978b4c435ecce354498a26f9ec4c 100644
index c416b0c670d5c1f43d5b2a097e068bc51a6c660d..97b258adb325a6620ddb26f267c04d533e6e1100 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -99,6 +99,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
@ -54,7 +54,7 @@ index 434a980904d278148d53a7bf31575c2f3c9392a7..75385e9b0886978b4c435ecce354498a
import net.minecraft.world.scores.Team;
import org.slf4j.Logger;
@@ -161,6 +162,7 @@ public abstract class PlayerList {
@@ -162,6 +163,7 @@ public abstract class PlayerList {
// CraftBukkit start
private CraftServer cserver;
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
@ -62,7 +62,7 @@ index 434a980904d278148d53a7bf31575c2f3c9392a7..75385e9b0886978b4c435ecce354498a
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
@@ -406,6 +408,13 @@ public abstract class PlayerList {
@@ -407,6 +409,13 @@ public abstract class PlayerList {
player.initInventoryMenu();
// CraftBukkit - Moved from above, added world
@ -76,7 +76,7 @@ index 434a980904d278148d53a7bf31575c2f3c9392a7..75385e9b0886978b4c435ecce354498a
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
}
@@ -525,6 +534,16 @@ public abstract class PlayerList {
@@ -526,6 +535,16 @@ public abstract class PlayerList {
entityplayer.doTick(); // SPIGOT-924
// CraftBukkit end
@ -93,7 +93,7 @@ index 434a980904d278148d53a7bf31575c2f3c9392a7..75385e9b0886978b4c435ecce354498a
this.save(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
@@ -1156,6 +1175,13 @@ public abstract class PlayerList {
@@ -1157,6 +1176,13 @@ public abstract class PlayerList {
}
// CraftBukkit end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 76f7ddbbba4be5c31d70ce9af9e041e69ee31662..dc723382685e9b50ffe0fea3118a1121db1da9fb 100644
index e4becdbb95f0309b9173722762836037dc38b33d..a2dc13c9440876953f703eedc69ec29db73f6e67 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1594,13 +1594,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1595,13 +1595,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dc723382685e9b50ffe0fea3118a1121db1da9fb..4ccb315828005258f5bd4c4a651d572e439c4909 100644
index a2dc13c9440876953f703eedc69ec29db73f6e67..f06fde519bc69102dcb69f7f62f250f66d02edf6 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -353,7 +353,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -354,7 +354,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
if (++this.aboveGroundTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
@ -17,7 +17,7 @@ index dc723382685e9b50ffe0fea3118a1121db1da9fb..4ccb315828005258f5bd4c4a651d572e
return;
}
} else {
@@ -372,7 +372,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -373,7 +373,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
if (++this.aboveGroundVehicleTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());

View File

@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2e1d8d53f91bccf3cd565b94b8ab5949f470cbd5..2a77e7ffb748c5b7f89aa232b51e7d62732850d9 100644
index 532b62d9cbfd9e7586b4df84fb0f1598a5e19e02..9fab9903b8902aa5bfa6d5224de7f36750ee40b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -359,6 +359,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -360,6 +360,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

View File

@ -19,10 +19,10 @@ index fc364823f20f458af936c7209bd7174e05cb0fc0..9d04d3d1e24222bf255a1fc967619095
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e3f3ddbf6d5c20489f3cfda9126ef64954b7418d..1c31e887a23398c2717426209a8625bdd0e1a807 100644
index f06fde519bc69102dcb69f7f62f250f66d02edf6..55622bca79e52418a81eb713d59c04899e49c1fa 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3178,7 +3178,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3179,7 +3179,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
public final boolean isDisconnected() {

View File

@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 75385e9b0886978b4c435ecce354498a26f9ec4c..175041e2560203712e1a826abcf732efcdec97cc 100644
index 97b258adb325a6620ddb26f267c04d533e6e1100..1179c809674082b6d238c9b32cb2c9ff038dbcf0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1059,11 +1059,13 @@ public abstract class PlayerList {
@@ -1060,11 +1060,13 @@ public abstract class PlayerList {
}
public void saveAll() {

View File

@ -64,10 +64,10 @@ index e845baf287da216bc5c1d2588b8e720212318266..d9ceef3d9694ab85f807a732789b2871
if (waitForShutdown) {
try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 175041e2560203712e1a826abcf732efcdec97cc..ad7047445408cbe6de63de30d98ec61dd87f4f61 100644
index 1179c809674082b6d238c9b32cb2c9ff038dbcf0..c0f765362d89b73917bb61274afc83812e066227 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1171,8 +1171,15 @@ public abstract class PlayerList {
@@ -1172,8 +1172,15 @@ public abstract class PlayerList {
}
public void removeAll() {

View File

@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1c31e887a23398c2717426209a8625bdd0e1a807..2e1f0ac59da4ce1f66a4e720c275744a28191478 100644
index 55622bca79e52418a81eb713d59c04899e49c1fa..f42cf92eeb2c491a9bf75e67047c11edfc1185ab 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2322,6 +2322,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2323,6 +2323,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);

View File

@ -222,10 +222,10 @@ index 35904c69e14c4c0addda204d5e3788518c2e16c4..e6826cd0a596f063e8737dcde3c8c6c5
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ad7047445408cbe6de63de30d98ec61dd87f4f61..dcb14a1be689fe228f740abc1a2b3c2c57b35f40 100644
index c0f765362d89b73917bb61274afc83812e066227..d5d9579b3313299543f45d6ebf79bca6fddf09ff 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -166,8 +166,7 @@ public abstract class PlayerList {
@@ -167,8 +167,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
@ -236,7 +236,7 @@ index ad7047445408cbe6de63de30d98ec61dd87f4f61..dcb14a1be689fe228f740abc1a2b3c2c
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3aabd7aaad60c157740d12932d0cb071ae259c21..8aaba38c7f4dc17c8536a0049be8bdea204f6481 100644
index b43dd6151647b370f3a8138a62ebd9482e095374..729696d7177851d31795c600a33d1abd9a9041c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -41,7 +41,6 @@ import java.util.logging.Level;
@ -262,7 +262,7 @@ index 3aabd7aaad60c157740d12932d0cb071ae259c21..8aaba38c7f4dc17c8536a0049be8bdea
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 288b3afe6c7e0c93234f43f864e37d167500dd0e..ebf561bce1b442f2b3a138d4ba0ed252e4ba3207 100644
index a13079a212bc0e4506ebc476ac058f1f8ca3d1de..beec3ebe4abc977885f93ef28aac3e834142d373 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,6 @@ import java.util.logging.Logger;

View File

@ -5,10 +5,10 @@ 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 dcb14a1be689fe228f740abc1a2b3c2c57b35f40..2cde0807c224f008bd2e652ff8a46244ebc53059 100644
index d5d9579b3313299543f45d6ebf79bca6fddf09ff..41aef5f7b9ab7c97edd79e415264975fc01241b9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -636,9 +636,9 @@ public abstract class PlayerList {
@@ -637,9 +637,9 @@ public abstract class PlayerList {
// return chatmessage;
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
@ -21,7 +21,7 @@ index dcb14a1be689fe228f740abc1a2b3c2c57b35f40..2cde0807c224f008bd2e652ff8a46244
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -1022,7 +1022,23 @@ public abstract class PlayerList {
@@ -1023,7 +1023,23 @@ public abstract class PlayerList {
}
public boolean isWhiteListed(GameProfile profile) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2e1f0ac59da4ce1f66a4e720c275744a28191478..ed9653e713893c273ca54f20febc4541e8d7e471 100644
index f42cf92eeb2c491a9bf75e67047c11edfc1185ab..b1b61ad583405459aff46a7b9964e927974f8a18 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1287,7 +1287,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1288,7 +1288,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag = d8 > 0.0D;
if (this.player.isOnGround() && !packet.isOnGround() && flag) {

View File

@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5c60baafd997aed3168d60284dcbb2a3e002029c..f52ed21255e2ae5efed2a095a220d132b3ef91f6 100644
index b1b61ad583405459aff46a7b9964e927974f8a18..65e6e0bdcb31e0f5a2d5bbd3aa2dc5666f96f441 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3137,14 +3137,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3138,14 +3138,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {

View File

@ -90,10 +90,10 @@ index 2be1bd39ee1341128f02e38afe5698b837735827..cca08b8c6e1e15f13326a2a7e33e7f32
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2a77e7ffb748c5b7f89aa232b51e7d62732850d9..1a4778052126cde62126e04b7bbf285be07b69b6 100644
index 9fab9903b8902aa5bfa6d5224de7f36750ee40b7..509376cd1d9b11e85395ee1da20dae3a1c4b9aee 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -303,6 +303,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -304,6 +304,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

View File

@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f52ed21255e2ae5efed2a095a220d132b3ef91f6..e2e640149913db7951d5c90c084bdb24f9257e8b 100644
index 65e6e0bdcb31e0f5a2d5bbd3aa2dc5666f96f441..d39eb377a2fb12308eda12435e8bc5cbea13cac1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -257,7 +257,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -258,7 +258,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public ServerPlayer player;
private int tickCount;
private int ackBlockChangesUpTo = -1;
@ -29,7 +29,7 @@ index f52ed21255e2ae5efed2a095a220d132b3ef91f6..e2e640149913db7951d5c90c084bdb24
private boolean keepAlivePending;
private long keepAliveChallenge;
// CraftBukkit start - multithreaded fields
@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private final LastSeenMessagesValidator lastSeenMessages;
private final MessageSignatureCache messageSignatureCache;
private final FutureChain chatMessageChain;
@ -37,7 +37,7 @@ index f52ed21255e2ae5efed2a095a220d132b3ef91f6..e2e640149913db7951d5c90c084bdb24
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
@@ -386,18 +387,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -387,18 +388,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
this.server.getProfiler().push("keepAlive");

View File

@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
Co-authored-by: Aikar <aikar@aikar.co>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index bc72f5380c49c0d389e53d270165d4108a3bb901..ec1aa8d5fbfdafc35948a04f4d8d65e879853ff0 100644
index d39eb377a2fb12308eda12435e8bc5cbea13cac1..215f2f196179304bc48633fcb6a8d93bf10c9f19 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -778,12 +778,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -779,12 +779,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
@ -38,7 +38,7 @@ index bc72f5380c49c0d389e53d270165d4108a3bb901..ec1aa8d5fbfdafc35948a04f4d8d65e8
return;
}
// Paper start
@@ -794,18 +798,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -795,18 +799,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Paper end
// CraftBukkit end
@ -91,7 +91,7 @@ index bc72f5380c49c0d389e53d270165d4108a3bb901..ec1aa8d5fbfdafc35948a04f4d8d65e8
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 21ca43d22bd9d09bdb03107eec568eb9208ea948..f3d3d5c4a3668000be67128a5b7bd953e5bc2c48 100644
index a5b16370b59556f74d4c4275f8c19395c1ede60b..690cae728e1f3ef2670d1e7f3dec444833cc5716 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2095,7 +2095,7 @@ public final class CraftServer implements Server {

View File

@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1a4778052126cde62126e04b7bbf285be07b69b6..26de9507f46a2f811cd8b0ccaf2233f12b250ae1 100644
index 509376cd1d9b11e85395ee1da20dae3a1c4b9aee..ffe926d4347832f28335f723f9f5a253d1a4c15a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1526,7 +1526,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1528,7 +1528,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

View File

@ -9,10 +9,10 @@ This can be useful for changing name or skins after a player has logged in.
public-f net.minecraft.world.entity.player.Player gameProfile
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ec1aa8d5fbfdafc35948a04f4d8d65e879853ff0..ef9fc39e70516772cc91b9ada493bfa051b41784 100644
index 215f2f196179304bc48633fcb6a8d93bf10c9f19..f2c9270044c0bfdfa0bbbd64ff6436e7ace7fcf0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1534,7 +1534,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1535,7 +1535,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
}
@ -55,7 +55,7 @@ index e7442952ef1f03969949014492a7ddc6d0796ba5..69a1852905dd4724c30ac8ab88c14251
public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d857ef22c38 100644
index ffe926d4347832f28335f723f9f5a253d1a4c15a..8199b3a2f457b3212078bf610899a6e0ca33f292 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -83,6 +83,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
@ -66,7 +66,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.border.BorderChangeListener;
import net.minecraft.world.level.saveddata.maps.MapDecoration;
@@ -286,11 +287,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -287,11 +288,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null;
}
@ -78,7 +78,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85
@Override
public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null;
@@ -1676,8 +1672,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1678,8 +1674,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
// Remove this entity from the hidden player's EntityTrackerEntry
@ -95,7 +95,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) {
entry.removePlayer(this.getHandle());
@@ -1690,8 +1693,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1692,8 +1695,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
}
}
@ -104,7 +104,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85
}
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
@@ -1768,8 +1769,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1770,8 +1771,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
entry.updatePlayer(this.getHandle());
}
@ -144,7 +144,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85
}
void resetAndShowEntity(org.bukkit.entity.Entity entity) {
@@ -1782,6 +1813,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1784,6 +1815,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.trackAndShowEntity(entity);
}
}

View File

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9f2cf313791b146a6e183c805653e445e498c44e..65471cac37cd7b9cf52ef8405434ae8ecb0775d0 100644
index 8199b3a2f457b3212078bf610899a6e0ca33f292..5ac7d5a83e154f405b77f99d3534844b25dcbc4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -177,6 +177,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -178,6 +178,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
@ -20,7 +20,7 @@ index 9f2cf313791b146a6e183c805653e445e498c44e..65471cac37cd7b9cf52ef8405434ae8e
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -2051,7 +2052,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2053,7 +2054,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
public void addChannel(String channel) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5a8703799204c28d885edfe1f366d222270d6558..ed910ec48845cbf7fad163771b409ea7485e9bf4 100644
index f2c9270044c0bfdfa0bbbd64ff6436e7ace7fcf0..94e79e72886b97b70fe4dbc2abf6830efd19f37b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3151,9 +3151,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3152,9 +3152,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
FilteredText filteredtext = (FilteredText) signText.get(i);
if (this.player.isTextFilteringEnabled()) {

View File

@ -75,7 +75,7 @@ index 67b0a9f8e8f122c406057c5db225fa6a03dd624c..9e4c827bba4c87595db8cb8896b77558
this.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5e710c7efef73c1caec0a16ff2e5f128ec4beb54..2bfcd1fbd18656f80ca0356d4f4c45e2bcfb3a55 100644
index 94e79e72886b97b70fe4dbc2abf6830efd19f37b..473b00fcc73097eab908b1dce198a96de38b5530 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
@ -86,7 +86,7 @@ index 5e710c7efef73c1caec0a16ff2e5f128ec4beb54..2bfcd1fbd18656f80ca0356d4f4c45e2
import org.bukkit.event.inventory.InventoryCreativeEvent;
import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.event.inventory.SmithItemEvent;
@@ -2672,10 +2673,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2673,10 +2674,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleContainerClose(ServerboundContainerClosePacket packet) {
@ -104,10 +104,10 @@ index 5e710c7efef73c1caec0a16ff2e5f128ec4beb54..2bfcd1fbd18656f80ca0356d4f4c45e2
this.player.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 2cde0807c224f008bd2e652ff8a46244ebc53059..2f18121596b957202dfd8227b995ea0615ecf773 100644
index 41aef5f7b9ab7c97edd79e415264975fc01241b9..c3c2d7a035e35135a422cfec3513b6a7a268e1e1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -523,7 +523,7 @@ public abstract class PlayerList {
@@ -524,7 +524,7 @@ public abstract class PlayerList {
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
// See SPIGOT-5799, SPIGOT-6145
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
@ -173,10 +173,10 @@ index 787ccb37a39bb506cf9fd8d54cf772b346981f85..f5b3190ffb9e9f92977afc9e40ddfa15
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b1b4513d9b86195b8c96c49990cb2bf6d3951506..9592da53e4b2ec28c71887ef68a0327c0e3ec119 100644
index 5ac7d5a83e154f405b77f99d3534844b25dcbc4f..bd2f49c8c6271497f5e54da5a3975ef632701e74 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1240,7 +1240,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1241,7 +1241,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

View File

@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ce1dcfa2f76245c6b243b030754c8b59cd5227e1..e37a4e8654f20eb9600d675eec7a2fbbb338cdc2 100644
index 473b00fcc73097eab908b1dce198a96de38b5530..3ba4ff3712716daa584265b1132901fb30d39eaf 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2554,6 +2554,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2555,6 +2555,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
if (event.isCancelled()) {

View File

@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e37a4e8654f20eb9600d675eec7a2fbbb338cdc2..974b74757551bc9ad94c7198783473bb72520712 100644
index 3ba4ff3712716daa584265b1132901fb30d39eaf..39144beeb90554ccf39049f9bc334783ea28f825 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -263,6 +263,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -264,6 +264,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private long keepAliveChallenge;
// CraftBukkit start - multithreaded fields
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
@ -33,7 +33,7 @@ index e37a4e8654f20eb9600d675eec7a2fbbb338cdc2..974b74757551bc9ad94c7198783473bb
// CraftBukkit end
private int dropSpamTickCount;
private double firstGoodX;
@@ -411,6 +412,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -412,6 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.server.getProfiler().pop();
// CraftBukkit start
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
@ -41,7 +41,7 @@ index e37a4e8654f20eb9600d675eec7a2fbbb338cdc2..974b74757551bc9ad94c7198783473bb
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -787,7 +789,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -788,7 +790,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
// CraftBukkit start

View File

@ -23,10 +23,10 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
The point of this is readability, but does have a side-benefit of a small microptimization
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 2f18121596b957202dfd8227b995ea0615ecf773..ab83fc7c8903ed4a71824c5dcc85b9764c6c5690 100644
index c3c2d7a035e35135a422cfec3513b6a7a268e1e1..93ca3559c92e46352f7f2dcff3afbc08a476f372 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -639,7 +639,7 @@ public abstract class PlayerList {
@@ -640,7 +640,7 @@ public abstract class PlayerList {
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cd1a2796f8a16775f6fc5fd43d46a398711601ee..b133bb407b88d7bc3ab8cb2011e8ad9e65df4bcd 100644
index bd2f49c8c6271497f5e54da5a3975ef632701e74..cb9352ac83107e61fe5cd3882f3e5ca558b87eaa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2808,6 +2808,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2810,6 +2810,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

View File

@ -352,10 +352,10 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b133bb407b88d7bc3ab8cb2011e8ad9e65df4bcd..8fdc2b677ef881b28e49f9bf2b39db065ea3d014 100644
index cb9352ac83107e61fe5cd3882f3e5ca558b87eaa..d8ca06e72a5534dcc7315f9e90d0806f05c14f7e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2311,7 +2311,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2313,7 +2313,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendHealthUpdate() {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ea9831f6915301a2c68b46fe0e8c981399fb01ae..e5c17c81b0265a9854a59779983f8af0e749dd99 100644
index 39144beeb90554ccf39049f9bc334783ea28f825..a7465f6eaa8269d715be935b0de95d7dadd80fdd 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -565,9 +565,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -566,9 +566,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
double d0 = entity.getX();
double d1 = entity.getY();
double d2 = entity.getZ();
@ -22,7 +22,7 @@ index ea9831f6915301a2c68b46fe0e8c981399fb01ae..e5c17c81b0265a9854a59779983f8af0
float f = Mth.wrapDegrees(packet.getYRot());
float f1 = Mth.wrapDegrees(packet.getXRot());
double d6 = d3 - this.vehicleFirstGoodX;
@@ -602,6 +602,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -603,6 +603,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
@ -39,7 +39,7 @@ index ea9831f6915301a2c68b46fe0e8c981399fb01ae..e5c17c81b0265a9854a59779983f8af0
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end
ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
@@ -1251,9 +1261,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1252,9 +1262,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.allowedPlayerTicks = 20; // CraftBukkit
} else {
this.awaitingTeleportTime = this.tickCount;
@ -52,7 +52,7 @@ index ea9831f6915301a2c68b46fe0e8c981399fb01ae..e5c17c81b0265a9854a59779983f8af0
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
@@ -1309,6 +1319,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1310,6 +1320,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} else {
speed = this.player.getAbilities().walkingSpeed * 10f;
}

View File

@ -59,10 +59,10 @@ index 21401c872035d4dc46a05c066b321d99e0d94b72..618888eac8381b174850e351577601f1
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e5c17c81b0265a9854a59779983f8af0e749dd99..43304fd4aba9c5d3d31499b813c9c39934918cea 100644
index a7465f6eaa8269d715be935b0de95d7dadd80fdd..ed7680eb0c50eabd5366e8d5b27d02223e6e8041 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1658,6 +1658,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1659,6 +1659,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
case START_DESTROY_BLOCK:
case ABORT_DESTROY_BLOCK:
case STOP_DESTROY_BLOCK:

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 43304fd4aba9c5d3d31499b813c9c39934918cea..fc36fb064dc09ea97062fcb782422821ff24940b 100644
index ed7680eb0c50eabd5366e8d5b27d02223e6e8041..8d26c0e0e5df49898e1ba4396d5b27eda6b5ce71 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1118,6 +1118,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1119,6 +1119,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleEditBook(ServerboundEditBookPacket packet) {

View File

@ -28,10 +28,10 @@ index dd729d17eadd8e8860bf2344a534534bf21c2619..35db7ee2aace8d7375a1474a849b78a1
public boolean queueHealthUpdatePacket = false;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ab83fc7c8903ed4a71824c5dcc85b9764c6c5690..c291339e448cb87c42b7daf5a3c67869c7412d0b 100644
index 93ca3559c92e46352f7f2dcff3afbc08a476f372..c1c7dca57cc7a4db3061186fc502d9e36a6ea0a5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -186,6 +186,7 @@ public abstract class PlayerList {
@@ -187,6 +187,7 @@ public abstract class PlayerList {
public void placeNewPlayer(Connection connection, ServerPlayer player) {
player.isRealPlayer = true; // Paper
@ -106,10 +106,10 @@ index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 73e8083b3ab009904ff7bc2003dfb506ee481d4e..5d5823871ea23eae07facb5eecf1708430089b84 100644
index d8ca06e72a5534dcc7315f9e90d0806f05c14f7e..9d9f889ef1f35122066bdf68631eabf6e5757435 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -178,6 +178,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -179,6 +179,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
@ -117,7 +117,7 @@ index 73e8083b3ab009904ff7bc2003dfb506ee481d4e..5d5823871ea23eae07facb5eecf17084
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1923,6 +1924,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1925,6 +1926,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@ -136,7 +136,7 @@ index 73e8083b3ab009904ff7bc2003dfb506ee481d4e..5d5823871ea23eae07facb5eecf17084
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
@@ -1945,6 +1958,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1947,6 +1960,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 73e8083b3ab009904ff7bc2003dfb506ee481d4e..5d5823871ea23eae07facb5eecf17084
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
@@ -1959,6 +1974,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1961,6 +1976,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

View File

@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5d5823871ea23eae07facb5eecf1708430089b84..da70f20983d3d000fa7731a1388c86a2fd087c4c 100644
index 9d9f889ef1f35122066bdf68631eabf6e5757435..c5ee8eadf9966a7077c7790673a1a0582cf355f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2855,6 +2855,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2857,6 +2857,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}

View File

@ -131,10 +131,10 @@ index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29
if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fc36fb064dc09ea97062fcb782422821ff24940b..773170c5443dce6e64762e4504d222a5b5bb8ae3 100644
index 8d26c0e0e5df49898e1ba4396d5b27eda6b5ce71..cafc68064ee88a741d7ae4962046717e8c92f81d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -830,8 +830,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -831,8 +831,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
@ -149,7 +149,7 @@ index fc36fb064dc09ea97062fcb782422821ff24940b..773170c5443dce6e64762e4504d222a5
});
});
}
@@ -846,7 +850,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -847,7 +851,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
}
});

View File

@ -22,10 +22,10 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 773170c5443dce6e64762e4504d222a5b5bb8ae3..d754c32b1c1c0cf56a690f3b699eb24a795765e4 100644
index cafc68064ee88a741d7ae4962046717e8c92f81d..741d28d56a59776df5134a1b769aaa41fa76ec55 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -298,6 +298,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private final MessageSignatureCache messageSignatureCache;
private final FutureChain chatMessageChain;
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
@ -33,7 +33,7 @@ index 773170c5443dce6e64762e4504d222a5b5bb8ae3..d754c32b1c1c0cf56a690f3b699eb24a
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
@@ -3191,7 +3192,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3192,7 +3193,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index c291339e448cb87c42b7daf5a3c67869c7412d0b..9905d2174582b38913752c2e86e4d610baff181d 100644
index c1c7dca57cc7a4db3061186fc502d9e36a6ea0a5..65b8adf4a905606ce44a4966ad817ba05156a533 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1147,6 +1147,7 @@ public abstract class PlayerList {
@@ -1148,6 +1148,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {

View File

@ -22,10 +22,10 @@ index e46f18e342f2e682c4d5bbac22187a171df8eb33..58c1769ea15249df950a40e2f164e2ff
// Paper start
if (DEBUG_ENTITIES) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9905d2174582b38913752c2e86e4d610baff181d..84d2fb06513784e58a917d74c904433b381d2dbf 100644
index 65b8adf4a905606ce44a4966ad817ba05156a533..7df1bd503f4aad4c8a4f6d2642139e1460a8df8a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -223,6 +223,11 @@ public abstract class PlayerList {
@@ -224,6 +224,11 @@ public abstract class PlayerList {
worldserver1 = worldserver;
}
@ -37,7 +37,7 @@ index 9905d2174582b38913752c2e86e4d610baff181d..84d2fb06513784e58a917d74c904433b
player.setLevel(worldserver1);
String s1 = "local";
@@ -363,7 +368,7 @@ public abstract class PlayerList {
@@ -364,7 +369,7 @@ public abstract class PlayerList {
// CraftBukkit start
ServerLevel finalWorldServer = worldserver1;
Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ef97fd5cb80626df1c2a3837641c9a06d6ad0390..fcac88d07fc4c74c8aca949954a08ae6580ad268 100644
index 7df1bd503f4aad4c8a4f6d2642139e1460a8df8a..1bb2ea3dab8d978db4b90b9e719a7dfa27cc646f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -748,9 +748,14 @@ public abstract class PlayerList {
@@ -749,9 +749,14 @@ public abstract class PlayerList {
boolean flag2 = false;
@ -24,7 +24,7 @@ index ef97fd5cb80626df1c2a3837641c9a06d6ad0390..fcac88d07fc4c74c8aca949954a08ae6
ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension());
if (worldserver1 != null) {
Optional optional;
@@ -802,6 +807,7 @@ public abstract class PlayerList {
@@ -803,6 +808,7 @@ public abstract class PlayerList {
location = respawnEvent.getRespawnLocation();
if (!flag) entityplayer.reset(); // SPIGOT-4785
@ -32,7 +32,7 @@ index ef97fd5cb80626df1c2a3837641c9a06d6ad0390..fcac88d07fc4c74c8aca949954a08ae6
} else {
location.setWorld(worldserver.getWorld());
}
@@ -861,6 +867,13 @@ public abstract class PlayerList {
@@ -862,6 +868,13 @@ public abstract class PlayerList {
if (entityplayer.connection.isDisconnected()) {
this.save(entityplayer);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d754c32b1c1c0cf56a690f3b699eb24a795765e4..cb776250920c68d8b8cc0baac804b83b1ec9376a 100644
index 741d28d56a59776df5134a1b769aaa41fa76ec55..7ea67e64d7ec63c80bc8996983dccd513a425036 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -513,7 +513,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -514,7 +514,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Objects.requireNonNull(this.connection);
// CraftBukkit - Don't wait

View File

@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it
was expired at that point, then it would be null.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fcac88d07fc4c74c8aca949954a08ae6580ad268..edbdd78ea15bac49d37e171b3ebc7f89ec54cbe6 100644
index 1bb2ea3dab8d978db4b90b9e719a7dfa27cc646f..c334d750a1eac24474061de8e764d7366ada0578 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -632,8 +632,10 @@ public abstract class PlayerList {
@@ -633,8 +633,10 @@ public abstract class PlayerList {
Player player = entity.getBukkitEntity();
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cb776250920c68d8b8cc0baac804b83b1ec9376a..34a969d8902f23d5ec3f8cc481b60c0fd74f8245 100644
index 7ea67e64d7ec63c80bc8996983dccd513a425036..e4d65aff300c276d0968b9786ddc20ba63caca41 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3229,6 +3229,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3230,6 +3230,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) {
ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString());

View File

@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading
massive amounts of surrounding chunks due to large AABB lookups.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index edbdd78ea15bac49d37e171b3ebc7f89ec54cbe6..56a8c90d3bf0e860acbabcd45957f51f8431317f 100644
index c334d750a1eac24474061de8e764d7366ada0578..54028d2702e2f168717f5492e7e1f4d4ef2bc778 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -817,6 +817,7 @@ public abstract class PlayerList {
@@ -818,6 +818,7 @@ public abstract class PlayerList {
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
// CraftBukkit end

View File

@ -35,10 +35,10 @@ index 52ee3440b09b227bf1f488f374a0e282690f6ba4..007513080938a8d0cf43c050ef4e1132
this.gameMode.setLevel((ServerLevel) world);
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index c3f46b59839c68f03a0468ce7a471cfa2504b23d..cb5921dac91cb52dbd0687c6783595b054c13bdb 100644
index 54028d2702e2f168717f5492e7e1f4d4ef2bc778..90631dcce9e102d9aa1b3f92078b762633b5cf40 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -226,6 +226,7 @@ public abstract class PlayerList {
@@ -227,6 +227,7 @@ public abstract class PlayerList {
// Paper start
if (nbttagcompound == null) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login

View File

@ -269,10 +269,10 @@ index f22c50f0a2ef05e9f52550db7c40b5b99632650c..549ea8e0fe702615eefcbfd1cd6a30e0
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ac8882d0d2939bd6e59dc4e08bc1efc88a580360..a58731d04581409eb322a327008a20ea64a03d89 100644
index 90631dcce9e102d9aa1b3f92078b762633b5cf40..5c2105528b8e1820b3cc6379b27d363e267b6a7b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -537,7 +537,7 @@ public abstract class PlayerList {
@@ -538,7 +538,7 @@ public abstract class PlayerList {
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
@ -318,7 +318,7 @@ index 703830416a0483e960643bee269fe01e170112bd..ee1c9f2c8dd30b3f32a6d49aa1c43148
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/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 7a0adf528be779241759d1efd818b0e57454a258..d7a98afeadc090281fdb24b27619536f318c2383 100644
index 8a7261bcda3fd436b12eae2877abb5ee1c45dbde..3522b9556fea11395b9951ef7265912ccaa70a55 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -178,6 +178,36 @@ public class Main {

View File

@ -116,10 +116,10 @@ index 71fac1a579b375759462b843d9ef7c8a2a463db5..2d54f2abae82521fbd34aa046f26ec8e
if (getMainArm() != packet.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a6ac9a628cbfeb021934221105a6a193bef61f56..69d4554bb79da980acc4d5de8c00d331f3bd4fea 100644
index c5ee8eadf9966a7077c7790673a1a0582cf355f6..23c489dc297073acb4e119c97c0eb5e0871a1359 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -622,6 +622,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -623,6 +623,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}

View File

@ -55,10 +55,10 @@ index 2d54f2abae82521fbd34aa046f26ec8e72df8362..e465e3e45eeeecc31dafc1f04505c04e
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index a58731d04581409eb322a327008a20ea64a03d89..b3ef5b9cb279cf44178536564e431ea29ba9433f 100644
index 5c2105528b8e1820b3cc6379b27d363e267b6a7b..a0832d8e8b9e91073c15e5a87953d6ccee544ae0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -301,6 +301,12 @@ public abstract class PlayerList {
@@ -302,6 +302,12 @@ public abstract class PlayerList {
this.playersByUUID.put(player.getUUID(), player);
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
@ -71,7 +71,7 @@ index a58731d04581409eb322a327008a20ea64a03d89..b3ef5b9cb279cf44178536564e431ea2
// CraftBukkit start
CraftPlayer bukkitPlayer = player.getBukkitEntity();
@@ -339,6 +345,8 @@ public abstract class PlayerList {
@@ -340,6 +346,8 @@ public abstract class PlayerList {
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
}
player.sentListPacket = true;
@ -80,7 +80,7 @@ index a58731d04581409eb322a327008a20ea64a03d89..b3ef5b9cb279cf44178536564e431ea2
// CraftBukkit end
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
@@ -364,6 +372,11 @@ public abstract class PlayerList {
@@ -365,6 +373,11 @@ public abstract class PlayerList {
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
}
@ -92,7 +92,7 @@ index a58731d04581409eb322a327008a20ea64a03d89..b3ef5b9cb279cf44178536564e431ea2
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
// CraftBukkit start
@@ -412,6 +425,10 @@ public abstract class PlayerList {
@@ -413,6 +426,10 @@ public abstract class PlayerList {
}
}
@ -103,7 +103,7 @@ index a58731d04581409eb322a327008a20ea64a03d89..b3ef5b9cb279cf44178536564e431ea2
player.initInventoryMenu();
// CraftBukkit - Moved from above, added world
// Paper start - Add to collideRule team if needed
@@ -421,6 +438,7 @@ public abstract class PlayerList {
@@ -422,6 +439,7 @@ public abstract class PlayerList {
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
}
// Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 34a969d8902f23d5ec3f8cc481b60c0fd74f8245..8d45c4fb59b7c570418506955b4f00876921b7c2 100644
index e4d65aff300c276d0968b9786ddc20ba63caca41..2a35bedae3682126b365c6fd56b0db5febd7fccb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -957,7 +957,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -958,7 +958,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handlePickItem(ServerboundPickItemPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8d45c4fb59b7c570418506955b4f00876921b7c2..526e06bf895eb1b57e30df8c4c46aba885fad5d2 100644
index 2a35bedae3682126b365c6fd56b0db5febd7fccb..fb292133ca77305d91acdded78d11f5118b5f282 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1611,6 +1611,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1612,6 +1612,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper

View File

@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 526e06bf895eb1b57e30df8c4c46aba885fad5d2..ce04df03f0cb2578e78cdb5bb72794815661c337 100644
index fb292133ca77305d91acdded78d11f5118b5f282..8fbb4a73968e2a6694294997f99dfe40fd7a09b2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1436,6 +1436,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1437,6 +1437,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ce04df03f0cb2578e78cdb5bb72794815661c337..ad584ebfb69a76eb84a56baefa5fb8ee884b743d 100644
index 8fbb4a73968e2a6694294997f99dfe40fd7a09b2..29254fe0d4a4fef5062a21773afea707d48a5538 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3107,9 +3107,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3108,9 +3108,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (!this.player.containerMenu.stillValid(this.player)) {
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
} else {

View File

@ -18,10 +18,10 @@ index 051cbce8394c7a629a7ea8ac422308d96bbad6a6..52d71b08c8338254a0e50780363155da
return false;
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ad584ebfb69a76eb84a56baefa5fb8ee884b743d..77f502c279ec471d65f6cc007d2bc08e3b34d79a 100644
index 29254fe0d4a4fef5062a21773afea707d48a5538..bd021ff4a5e3bd5dde2829718c0f57d9fc9aa93d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -868,7 +868,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -869,7 +869,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (!this.server.isCommandBlockEnabled()) {
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
@ -30,7 +30,7 @@ index ad584ebfb69a76eb84a56baefa5fb8ee884b743d..77f502c279ec471d65f6cc007d2bc08e
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
} else {
BaseCommandBlock commandblocklistenerabstract = null;
@@ -935,7 +935,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -936,7 +936,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (!this.server.isCommandBlockEnabled()) {
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));

View File

@ -89,10 +89,10 @@ index 5be828ad63184ee01519ef937e98f621a4e83dee..d560e5dee586bb3b501e9a78083b9aa9
playerlist.sendPlayerPermissionLevel(this);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 77f502c279ec471d65f6cc007d2bc08e3b34d79a..1517c09ccd95448cb0fce0f9ffbb7bd2e704113b 100644
index bd021ff4a5e3bd5dde2829718c0f57d9fc9aa93d..807cbeb8cc6700e5f740b554c7f1893ec9110714 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3382,7 +3382,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3383,7 +3383,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
@ -102,7 +102,7 @@ index 77f502c279ec471d65f6cc007d2bc08e3b34d79a..1517c09ccd95448cb0fce0f9ffbb7bd2
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fcf43140189efb93e77807a2a6bb982132fef787..777f114e9cb0cfa3633b9a89116be1c73d552065 100644
index e2b5eb02f9d91128c702eb85ad85e47bd6080e02..a461cc5c20287d9dfd2b32323f41cff97b205d1d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -941,8 +941,8 @@ public final class CraftServer implements Server {

View File

@ -127,10 +127,10 @@ index d560e5dee586bb3b501e9a78083b9aa961c48fc5..ce6ae0ec4d104929f2c3fe03b0f44eaf
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
public ServerGamePacketListenerImpl connection;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b3ef5b9cb279cf44178536564e431ea29ba9433f..b553d739d025e2017532f1cab9e21a24a1fa898a 100644
index a0832d8e8b9e91073c15e5a87953d6ccee544ae0..6837054dc812b249db0dc975dc8f5506437260f4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -525,6 +525,7 @@ public abstract class PlayerList {
@@ -526,6 +526,7 @@ public abstract class PlayerList {
protected void save(ServerPlayer player) {
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
@ -138,7 +138,7 @@ index b3ef5b9cb279cf44178536564e431ea29ba9433f..b553d739d025e2017532f1cab9e21a24
this.playerIo.save(player);
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
@@ -1115,10 +1116,22 @@ public abstract class PlayerList {
@@ -1116,10 +1117,22 @@ public abstract class PlayerList {
}
public void saveAll() {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Spawn player in correct world on login
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 68701c1de6d7060f65648b1404209e8c9891fccc..75ff056a8e68a1286ef6bd7fec841721951e1344 100644
index 6837054dc812b249db0dc975dc8f5506437260f4..00551e6718d4e672f3d6758d1d7aabacc5b6239c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -202,7 +202,18 @@ public abstract class PlayerList {
@@ -203,7 +203,18 @@ public abstract class PlayerList {
}
// CraftBukkit end

View File

@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
still at a respawn anchor.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index eb2f861d107a81a6c8e4de2668a886a29eff141e..4c4e7c7f2dba3a8f219a5d41ca727e0a3251f341 100644
index 00551e6718d4e672f3d6758d1d7aabacc5b6239c..19f525543e95a1b8de2ad3da45724969705e9c15 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -784,6 +784,7 @@ public abstract class PlayerList {
@@ -785,6 +785,7 @@ public abstract class PlayerList {
// Paper start
boolean isBedSpawn = false;
boolean isRespawn = false;
@ -21,7 +21,7 @@ index eb2f861d107a81a6c8e4de2668a886a29eff141e..4c4e7c7f2dba3a8f219a5d41ca727e0a
// Paper end
// CraftBukkit start - fire PlayerRespawnEvent
@@ -794,7 +795,7 @@ public abstract class PlayerList {
@@ -795,7 +796,7 @@ public abstract class PlayerList {
Optional optional;
if (blockposition != null) {
@ -30,7 +30,7 @@ index eb2f861d107a81a6c8e4de2668a886a29eff141e..4c4e7c7f2dba3a8f219a5d41ca727e0a
} else {
optional = Optional.empty();
}
@@ -838,7 +839,12 @@ public abstract class PlayerList {
@@ -839,7 +840,12 @@ public abstract class PlayerList {
}
// Spigot End
@ -44,7 +44,7 @@ index eb2f861d107a81a6c8e4de2668a886a29eff141e..4c4e7c7f2dba3a8f219a5d41ca727e0a
if (!flag) entityplayer.reset(); // SPIGOT-4785
isRespawn = true; // Paper
} else {
@@ -878,8 +884,14 @@ public abstract class PlayerList {
@@ -879,8 +885,14 @@ public abstract class PlayerList {
}
// entityplayer1.initInventoryMenu();
entityplayer1.setHealth(entityplayer1.getHealth());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1517c09ccd95448cb0fce0f9ffbb7bd2e704113b..221a695acf3cbeaeaf9eda818b6cf80987d7a994 100644
index 807cbeb8cc6700e5f740b554c7f1893ec9110714..f6733db4d81c8dda5650f067b56354ae4ed32626 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -300,6 +300,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -301,6 +301,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
@ -17,7 +17,7 @@ index 1517c09ccd95448cb0fce0f9ffbb7bd2e704113b..221a695acf3cbeaeaf9eda818b6cf809
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
this.lastSeenMessages = new LastSeenMessagesValidator(20);
@@ -3337,6 +3339,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3338,6 +3340,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
@ -26,7 +26,7 @@ index 1517c09ccd95448cb0fce0f9ffbb7bd2e704113b..221a695acf3cbeaeaf9eda818b6cf809
@Override
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
@@ -3364,6 +3368,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3365,6 +3369,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
try {
byte[] data = new byte[packet.data.readableBytes()];
packet.data.readBytes(data);
@ -42,7 +42,7 @@ index 1517c09ccd95448cb0fce0f9ffbb7bd2e704113b..221a695acf3cbeaeaf9eda818b6cf809
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
@@ -3373,6 +3386,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3374,6 +3387,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
@ -56,10 +56,10 @@ index 1517c09ccd95448cb0fce0f9ffbb7bd2e704113b..221a695acf3cbeaeaf9eda818b6cf809
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 99ebc5c686b295c0c66f0073e2ede10a79b80f5c..cefac7bf8a7a73f3d195d9ed66d82f0e94462c5c 100644
index 23c489dc297073acb4e119c97c0eb5e0871a1359..7e367fe3b5fd6bf91906eb32a162fbf44c1db43f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2982,6 +2982,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2984,6 +2984,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add #setMaxPlayers API
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 391375642822d95f6d874a26d41b27ec4f4b8c08..b6cfea5de71d85c76a9ed6d10b9dd16d3d66f4d8 100644
index 19f525543e95a1b8de2ad3da45724969705e9c15..162b09cda517afe3b87321a4fe871c183db37621 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -152,7 +152,7 @@ public abstract class PlayerList {
@@ -153,7 +153,7 @@ public abstract class PlayerList {
private boolean doWhiteList;
private final LayeredRegistryAccess<RegistryLayer> registries;
private final RegistryAccess.Frozen synchronizedRegistries;
@ -18,7 +18,7 @@ index 391375642822d95f6d874a26d41b27ec4f4b8c08..b6cfea5de71d85c76a9ed6d10b9dd16d
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 2f978b0c5721b0cf145d324e6c7551d8f0c1eccf..7971be6c5e9daa6d7f206aafac7479bd5cc0aad5 100644
index cc728b3ec69dcd92d5c4ed97805bcbd5bcd2d3e3..af0e06a47173688b950ed4d376b23dc71854fd7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -664,6 +664,13 @@ public final class CraftServer implements Server {

View File

@ -9,10 +9,10 @@ as this is how Vanilla teleports entities.
Cancel any pending motion when teleported.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 221a695acf3cbeaeaf9eda818b6cf80987d7a994..ed16292b121aeaee5ad439176af57841281e293d 100644
index f6733db4d81c8dda5650f067b56354ae4ed32626..791446f9b22d60bd7dbb632ca92442848d1c28e9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -750,7 +750,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -751,7 +751,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}
@ -21,7 +21,7 @@ index 221a695acf3cbeaeaf9eda818b6cf80987d7a994..ed16292b121aeaee5ad439176af57841
this.lastGoodX = this.awaitingPositionFromClient.x;
this.lastGoodY = this.awaitingPositionFromClient.y;
this.lastGoodZ = this.awaitingPositionFromClient.z;
@@ -1655,7 +1655,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1656,7 +1656,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// CraftBukkit end
this.awaitingTeleportTime = this.tickCount;
@ -31,7 +31,7 @@ index 221a695acf3cbeaeaf9eda818b6cf80987d7a994..ed16292b121aeaee5ad439176af57841
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4d62f7f88dfaedfbde598515a1e77716d0ee4a1b..6db716a0b510e88551d532b382c8adb896edeae6 100644
index b69615eafcee963862cb3671888dcf8ec5114fe5..a3d547d9fed7e2c9f344aa467f287ba46c4cb338 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -158,6 +158,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server
Check movement distance also based on current position.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ed16292b121aeaee5ad439176af57841281e293d..459403f9c8a784c3911d5ba163a2c90efef00e9f 100644
index 791446f9b22d60bd7dbb632ca92442848d1c28e9..0a06cdcccbdf503814386c27a8fb614da671c441 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -565,9 +565,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -566,9 +566,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
ServerLevel worldserver = this.player.getLevel();
@ -22,7 +22,7 @@ index ed16292b121aeaee5ad439176af57841281e293d..459403f9c8a784c3911d5ba163a2c90e
double d3 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX()); final double toX = d3; // Paper - OBFHELPER
double d4 = ServerGamePacketListenerImpl.clampVertical(packet.getY()); final double toY = d4; // Paper - OBFHELPER
double d5 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ()); final double toZ = d5; // Paper - OBFHELPER
@@ -577,8 +577,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -578,8 +578,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
double d7 = d4 - this.vehicleFirstGoodY;
double d8 = d5 - this.vehicleFirstGoodZ;
double d9 = entity.getDeltaMovement().lengthSqr();
@ -44,7 +44,7 @@ index ed16292b121aeaee5ad439176af57841281e293d..459403f9c8a784c3911d5ba163a2c90e
// CraftBukkit start - handle custom speeds and skipped ticks
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
@@ -624,9 +635,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -625,9 +636,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
@ -57,7 +57,7 @@ index ed16292b121aeaee5ad439176af57841281e293d..459403f9c8a784c3911d5ba163a2c90e
boolean flag1 = entity.verticalCollisionBelow;
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
@@ -1346,7 +1357,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1347,7 +1358,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
double d8 = d1 - this.firstGoodY;
double d9 = d2 - this.firstGoodZ;
double d10 = this.player.getDeltaMovement().lengthSqr();
@ -77,7 +77,7 @@ index ed16292b121aeaee5ad439176af57841281e293d..459403f9c8a784c3911d5ba163a2c90e
if (this.player.isSleeping()) {
if (d11 > 1.0D) {
@@ -1398,9 +1420,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1399,9 +1421,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
AABB axisalignedbb = this.player.getBoundingBox();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9402f57ae6cf4316b55af93d879e770bff1cfc3d..bea687c7a4f48078e0cf3c7a2e8b1cc7371ad4ae 100644
index 7e367fe3b5fd6bf91906eb32a162fbf44c1db43f..18a68cff843175f6ab1db3028ec80ef64c9128aa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -644,6 +644,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -645,6 +645,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
throw new RuntimeException("Unknown settings type");
}

View File

@ -37,10 +37,10 @@ index ce6ae0ec4d104929f2c3fe03b0f44eafbfec1d9a..e746d6f303c5df3ec367963c4335304f
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 459403f9c8a784c3911d5ba163a2c90efef00e9f..7ffe3a9978d58831fe2f01c3b19dfd8bef29f556 100644
index 0a06cdcccbdf503814386c27a8fb614da671c441..d68db0fc61be13b5970a3c3c8e4b870cd3b2a316 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -505,6 +505,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -506,6 +506,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
// CraftBukkit end
@ -49,10 +49,10 @@ index 459403f9c8a784c3911d5ba163a2c90efef00e9f..7ffe3a9978d58831fe2f01c3b19dfd8b
this.connection.disconnect(ichatbasecomponent);
}));
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index e9650927ad7b74d796efd928d396e9923699f703..7e40da6f44b9e1ce4a4d860ba6349675ce69f6c4 100644
index 162b09cda517afe3b87321a4fe871c183db37621..0df62830f211f96e9341f618282c6cb5834d76aa 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -563,7 +563,7 @@ public abstract class PlayerList {
@@ -564,7 +564,7 @@ public abstract class PlayerList {
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 7e40da6f44b9e1ce4a4d860ba6349675ce69f6c4..1d458a6d5c3b93d8823fd37ed23027f1e4dc4769 100644
index 0df62830f211f96e9341f618282c6cb5834d76aa..bdd87da66db5febfb4e1f69d8c5f75fd28c23ea1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -827,7 +827,7 @@ public abstract class PlayerList {
@@ -828,7 +828,7 @@ public abstract class PlayerList {
if (location == null) {
worldserver1 = this.server.getLevel(Level.OVERWORLD);
blockposition = entityplayer1.getSpawnPoint(worldserver1);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f84962620f6800977dcb105eeb13b86bd8f14480..a82e1f7230e8d39f264e6a84336d88747e40b23b 100644
index 18a68cff843175f6ab1db3028ec80ef64c9128aa..82214da046992ce5aafb3e005068952fe57664f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2504,7 +2504,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2506,7 +2506,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null && !particle.getDataType().isInstance(data)) {
throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass());
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 7ffe3a9978d58831fe2f01c3b19dfd8bef29f556..94e03cdbe9e5aa10c1a302bd23fefd6d2b844f35 100644
index d68db0fc61be13b5970a3c3c8e4b870cd3b2a316..1a7e3049bf7fa16e31748d5acbb14cdcee65379c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -264,6 +264,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -265,6 +265,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// CraftBukkit start - multithreaded fields
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits
@ -16,7 +16,7 @@ index 7ffe3a9978d58831fe2f01c3b19dfd8bef29f556..94e03cdbe9e5aa10c1a302bd23fefd6d
// CraftBukkit end
private int dropSpamTickCount;
private double firstGoodX;
@@ -416,6 +417,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -417,6 +418,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// CraftBukkit start
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable
@ -24,7 +24,7 @@ index 7ffe3a9978d58831fe2f01c3b19dfd8bef29f556..94e03cdbe9e5aa10c1a302bd23fefd6d
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -3126,6 +3128,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3127,6 +3129,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix interact event not being called in adventure
Call PlayerInteractEvent when left-clicking on a block in adventure mode
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 94e03cdbe9e5aa10c1a302bd23fefd6d2b844f35..3fe0dd121d4eb2072bc996a65ea4ea44fa4bf646 100644
index 1a7e3049bf7fa16e31748d5acbb14cdcee65379c..690b84fc73a6de4aa4d420c6790a5ee5864042cb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1833,7 +1833,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1834,7 +1834,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED);
this.player.sendSystemMessage(ichatmutablecomponent, true);
@ -18,7 +18,7 @@ index 94e03cdbe9e5aa10c1a302bd23fefd6d2b844f35..3fe0dd121d4eb2072bc996a65ea4ea44
this.player.swing(enumhand, true);
}
}
@@ -2463,7 +2463,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2464,7 +2464,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
org.bukkit.util.RayTraceResult result = this.player.level.getWorld().rayTrace(origin, origin.getDirection(), d3, org.bukkit.FluidCollisionMode.NEVER, false, 0.1, entity -> entity != this.player.getBukkitEntity() && this.player.getBukkitEntity().canSee(entity));

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 1d458a6d5c3b93d8823fd37ed23027f1e4dc4769..22f362143f7c01742dd07220dac5ea3dc691d43c 100644
index bdd87da66db5febfb4e1f69d8c5f75fd28c23ea1..8184c987ecb91a11b260d89a4807ddfcb1f9aaf8 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -588,6 +588,14 @@ public abstract class PlayerList {
@@ -589,6 +589,14 @@ public abstract class PlayerList {
PlayerList.LOGGER.debug("Removing player mount");
entityplayer.stopRiding();
entity.getPassengersAndSelf().forEach((entity1) -> {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 22f362143f7c01742dd07220dac5ea3dc691d43c..e3631616f04c3051b306fbdf49138b50a00abae2 100644
index 8184c987ecb91a11b260d89a4807ddfcb1f9aaf8..a6a58b9f9c3ae4acac374e4a29b41178aa0dec00 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1076,6 +1076,11 @@ public abstract class PlayerList {
@@ -1077,6 +1077,11 @@ public abstract class PlayerList {
}
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
@ -20,7 +20,7 @@ index 22f362143f7c01742dd07220dac5ea3dc691d43c..e3631616f04c3051b306fbdf49138b50
if (player.connection != null) {
byte b0;
@@ -1090,8 +1095,10 @@ public abstract class PlayerList {
@@ -1091,8 +1096,10 @@ public abstract class PlayerList {
player.connection.send(new ClientboundEntityEventPacket(player, b0));
}
@ -32,10 +32,10 @@ index 22f362143f7c01742dd07220dac5ea3dc691d43c..e3631616f04c3051b306fbdf49138b50
public boolean isWhiteListed(GameProfile profile) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 69f1c668cb303d30bb228e7f79f5df462b791b2c..43d204c7013150b8525b7d0106edac6d0611d723 100644
index 82214da046992ce5aafb3e005068952fe57664f7..0ec560d6b9d96055591019397a45c2885d6ca2ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -658,6 +658,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -659,6 +659,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
? (org.bukkit.entity.Firework) entity.getBukkitEntity()
: null;
}

View File

@ -48,10 +48,10 @@ index 520cd1a6b347687b2ec6d13f034be391d1a1af85..cc885fd0eb19516d3864a43c2e4ae785
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index a697583cbfb50230771a58feed7d1e9d13320961..88deb7961f64976e16d1b42c6a798665a4fa59e6 100644
index a6a58b9f9c3ae4acac374e4a29b41178aa0dec00..b88f0c64d3509550c699f21505118312f88ff71d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -183,6 +183,7 @@ public abstract class PlayerList {
@@ -184,6 +184,7 @@ public abstract class PlayerList {
this.maxPlayers = maxPlayers;
this.playerIo = saveHandler;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow using signs inside spawn protection
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3fe0dd121d4eb2072bc996a65ea4ea44fa4bf646..b4acf8f26b7ac24ec6f7917af1d9e4dd6079310f 100644
index 690b84fc73a6de4aa4d420c6790a5ee5864042cb..1a256066b7836f6ad3fa33e5bb51222f3a69e50f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1825,7 +1825,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1826,7 +1826,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
int i = this.player.level.getMaxBuildHeight();
if (blockposition.getY() < i) {

View File

@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
Closes #5036
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 3eb3dbe7557fb5e048be6fe2fee92e4d7653a05f..b0fabcf2435a8b89d52fbea29a20bd64e91c046c 100644
index b88f0c64d3509550c699f21505118312f88ff71d..fa195977aa53fcaea0e9873a484148efad51aefc 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -581,6 +581,14 @@ public abstract class PlayerList {
@@ -582,6 +582,14 @@ public abstract class PlayerList {
}
// Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b4acf8f26b7ac24ec6f7917af1d9e4dd6079310f..dff78eb3337b2dbf08eaf52f2a90dffd73663d2a 100644
index 1a256066b7836f6ad3fa33e5bb51222f3a69e50f..9b25fe41cf4734ec677a69d1f41bcb2dad6f1fde 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1284,7 +1284,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1285,7 +1285,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
itemstack.addTagElement("pages", nbttaglist);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dff78eb3337b2dbf08eaf52f2a90dffd73663d2a..f81fb4c4e5d2681b16e6b6c2fb32363a312d3bff 100644
index 9b25fe41cf4734ec677a69d1f41bcb2dad6f1fde..2ac2390b572c223e8c35a24e8f0978d39da148cc 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2039,6 +2039,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2040,6 +2040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (this.player.isImmobile()) return; // CraftBukkit
if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b0fabcf2435a8b89d52fbea29a20bd64e91c046c..4fd660d95a525c1ede5151adc3556e55470cc7f1 100644
index fa195977aa53fcaea0e9873a484148efad51aefc..116a52b29beefce65e875a35ddae6caf255b7b54 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -800,6 +800,7 @@ public abstract class PlayerList {
@@ -801,6 +801,7 @@ public abstract class PlayerList {
// Paper start
boolean isBedSpawn = false;
@ -17,7 +17,7 @@ index b0fabcf2435a8b89d52fbea29a20bd64e91c046c..4fd660d95a525c1ede5151adc3556e55
boolean isRespawn = false;
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
// Paper end
@@ -820,6 +821,7 @@ public abstract class PlayerList {
@@ -821,6 +822,7 @@ public abstract class PlayerList {
if (optional.isPresent()) {
BlockState iblockdata = worldserver1.getBlockState(blockposition);
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
@ -25,12 +25,12 @@ index b0fabcf2435a8b89d52fbea29a20bd64e91c046c..4fd660d95a525c1ede5151adc3556e55
Vec3 vec3d = (Vec3) optional.get();
float f1;
@@ -848,7 +850,7 @@ public abstract class PlayerList {
@@ -849,7 +851,7 @@ public abstract class PlayerList {
}
Player respawnPlayer = entityplayer1.getBukkitEntity();
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !flag2, flag2);
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !flag2, flag2, reason);
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
this.cserver.getPluginManager().callEvent(respawnEvent);
// Spigot Start
if (entityplayer.connection.isDisconnected()) {

View File

@ -5,41 +5,41 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f81fb4c4e5d2681b16e6b6c2fb32363a312d3bff..dffb219c0abdac46320aaec168e232df322a4bca 100644
index 2ac2390b572c223e8c35a24e8f0978d39da148cc..4df88bd988c2e4d0b6d4d09e6c897b1d1f4e6682 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2773,7 +2773,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2774,7 +2774,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
case PERFORM_RESPAWN:
if (this.player.wonGame) {
this.player.wonGame = false;
- this.player = this.server.getPlayerList().respawn(this.player, true);
+ this.player = this.server.getPlayerList().respawn(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - add isEndCreditsRespawn argument
- this.player = this.server.getPlayerList().respawn(this.player, true, RespawnReason.END_PORTAL);
+ this.player = this.server.getPlayerList().respawn(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, RespawnReason.END_PORTAL, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - add isEndCreditsRespawn argument
CriteriaTriggers.CHANGED_DIMENSION.trigger(this.player, Level.END, Level.OVERWORLD);
} else {
if (this.player.getHealth() > 0.0F) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 4fd660d95a525c1ede5151adc3556e55470cc7f1..8d9d730b4fe3be9cc5965331614c3969ec4ad3f9 100644
index 116a52b29beefce65e875a35ddae6caf255b7b54..54ccfd45a4a8373a40e7153c569b654fe2110506 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -759,6 +759,12 @@ public abstract class PlayerList {
@@ -760,6 +760,12 @@ public abstract class PlayerList {
}
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) {
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason) {
+ // Paper start
+ return respawn(entityplayer, worldserver, flag, location, avoidSuffocation, new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]);
+ return respawn(entityplayer, worldserver, flag, location, avoidSuffocation, reason, new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]);
+ }
+
+ public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
+ public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
+ // Paper end
entityplayer.stopRiding(); // CraftBukkit
this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
@@ -850,7 +856,7 @@ public abstract class PlayerList {
@@ -851,7 +857,7 @@ public abstract class PlayerList {
}
Player respawnPlayer = entityplayer1.getBukkitEntity();
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, com.google.common.collect.ImmutableSet.<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag>builder().add(respawnFlags)); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason, com.google.common.collect.ImmutableSet.<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag>builder().add(respawnFlags)); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
this.cserver.getPluginManager().callEvent(respawnEvent);
// Spigot Start
if (entityplayer.connection.isDisconnected()) {

View File

@ -129,12 +129,12 @@ index e6154cf74df39d0c87fc820027adc9641156f888..5461e6ff769be93054b3d8369a7aa286
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dffb219c0abdac46320aaec168e232df322a4bca..8987bbb4feed89c44e3615a58dac321a947c8af9 100644
index 4df88bd988c2e4d0b6d4d09e6c897b1d1f4e6682..454fb5def57fa2fbc62f530020d579d4ef0efc15 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2782,7 +2782,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2783,7 +2783,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player = this.server.getPlayerList().respawn(this.player, false);
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
if (this.server.isHardcore()) {
- this.player.setGameMode(GameType.SPECTATOR);
+ this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper
@ -142,10 +142,10 @@ index dffb219c0abdac46320aaec168e232df322a4bca..8987bbb4feed89c44e3615a58dac321a
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 43d204c7013150b8525b7d0106edac6d0611d723..0f73f0e377c84ed3e1064b9ce6d9254a938c1ae0 100644
index 0ec560d6b9d96055591019397a45c2885d6ca2ec..acc02c75819eabc73be1afef7cb86ebfdbf2f6e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1551,7 +1551,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1553,7 +1553,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new IllegalArgumentException("Mode cannot be null");
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8987bbb4feed89c44e3615a58dac321a947c8af9..a073244fa9b25015e1343f1599f8b86127c77788 100644
index 454fb5def57fa2fbc62f530020d579d4ef0efc15..6289d1f681366ddbe2c83b08b76a76dbafcc29ea 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1811,6 +1811,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1812,6 +1812,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (itemstack.isItemEnabled(worldserver.enabledFeatures())) {
BlockHitResult movingobjectpositionblock = packet.getHitResult();
Vec3 vec3d = movingobjectpositionblock.getLocation();

View File

@ -91,10 +91,10 @@ index 29a0a720f22f56ca3d844efef1ecde3980fb1c12..838244e3680ea6020701e10bafbde7f5
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a073244fa9b25015e1343f1599f8b86127c77788..c5788a4f0acdd44d55446fd729311db7e72c0d86 100644
index 6289d1f681366ddbe2c83b08b76a76dbafcc29ea..ef670cf38d3ddbeff0f2b87a41cbed695116f270 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2617,6 +2617,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2618,6 +2618,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Spigot Start
public SocketAddress getRawAddress()
{

View File

@ -88,10 +88,10 @@ index 65637a33ba171a4b598f70cd943d24b0ee44a69f..57a9146bf2dee7a60aab16716e25348f
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c375f07141 100644
index ef670cf38d3ddbeff0f2b87a41cbed695116f270..82ddc28c97bf8ecf2ca703b612d752c0319a6b0f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -360,7 +360,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -361,7 +361,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
if (++this.aboveGroundTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
@ -100,7 +100,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
} else {
@@ -379,7 +379,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -380,7 +380,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
if (++this.aboveGroundVehicleTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
@ -109,7 +109,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
} else {
@@ -401,7 +401,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -402,7 +402,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.keepAlivePending) {
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
@ -118,7 +118,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
} else {
if (elapsedTime >= 15000L) { // 15 seconds
@@ -431,7 +431,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -432,7 +432,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) (this.server.getPlayerIdleTimeout() * 1000 * 60)) {
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
@ -127,7 +127,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
}
@@ -454,16 +454,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -455,16 +455,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return this.server.isSingleplayerOwner(this.player.getGameProfile());
}
@ -157,7 +157,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
// Paper end
// CraftBukkit start - fire PlayerKickEvent
if (this.processedDisconnect) {
@@ -473,7 +483,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -474,7 +484,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Waitable waitable = new Waitable() {
@Override
protected Object evaluate() {
@ -166,7 +166,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return null;
}
};
@@ -492,7 +502,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -493,7 +503,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure
@ -175,7 +175,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
@@ -562,7 +572,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -563,7 +573,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleMoveVehicle(ServerboundMoveVehiclePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(), packet.getY(), packet.getZ(), packet.getYRot(), packet.getXRot())) {
@ -184,7 +184,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
} else {
Entity entity = this.player.getRootVehicle();
@@ -760,7 +770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -761,7 +771,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (packet.getId() == this.awaitingTeleport) {
if (this.awaitingPositionFromClient == null) {
@ -193,7 +193,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
@@ -817,13 +827,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -818,13 +828,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
// CraftBukkit start
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
@ -209,7 +209,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
// Paper end
@@ -976,7 +986,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -977,7 +987,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Paper start - validate pick item position
if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) {
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
@ -218,7 +218,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed
@@ -1163,7 +1173,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1164,7 +1174,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
if (byteLength > 256 * 4) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!");
@ -227,7 +227,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
byteTotal += byteLength;
@@ -1186,14 +1196,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1187,14 +1197,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (byteTotal > byteAllowed) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
@ -244,7 +244,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
this.lastBookTick = MinecraftServer.currentTick;
@@ -1317,7 +1327,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1318,7 +1328,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleMovePlayer(ServerboundMovePlayerPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) {
@ -253,7 +253,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
} else {
ServerLevel worldserver = this.player.getLevel();
@@ -1733,7 +1743,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1734,7 +1744,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.dropCount++;
if (this.dropCount >= 20) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
@ -262,7 +262,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
}
@@ -1945,7 +1955,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1946,7 +1956,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
@ -271,7 +271,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
// Paper start
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()];
@@ -2061,7 +2071,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2062,7 +2072,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player.resetLastActionTime();
} else {
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
@ -280,7 +280,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
}
@@ -2074,7 +2084,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2075,7 +2085,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// CraftBukkit end
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
@ -289,7 +289,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
} else {
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages());
@@ -2108,7 +2118,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2109,7 +2119,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleChatCommand(ServerboundChatCommandPacket packet) {
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
@ -298,7 +298,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
} else {
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages());
@@ -2157,7 +2167,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2158,7 +2168,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private void handleMessageDecodeFailure(SignedMessageChain.DecodeException exception) {
if (exception.shouldDisconnect()) {
@ -307,7 +307,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
} else {
this.player.sendSystemMessage(exception.getComponent().copy().withStyle(ChatFormatting.RED));
}
@@ -2188,7 +2198,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2189,7 +2199,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private Optional<LastSeenMessages> 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);
@ -316,7 +316,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return Optional.empty();
} else {
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);
@@ -2211,7 +2221,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2212,7 +2222,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (optional.isEmpty()) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
@ -325,7 +325,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
return optional;
@@ -2434,7 +2444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2435,7 +2445,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// this.chatSpamTickCount += 20;
if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) {
// CraftBukkit end
@ -334,7 +334,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
}
@@ -2446,7 +2456,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2447,7 +2457,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
synchronized (this.lastSeenMessages) {
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
@ -343,7 +343,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
}
@@ -2589,7 +2599,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2590,7 +2600,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
if (i > 4096) {
@ -352,7 +352,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
}
@@ -2635,7 +2645,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2636,7 +2646,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Spigot Start
if ( entity == this.player && !this.player.isSpectator() )
{
@ -361,7 +361,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
// Spigot End
@@ -2734,7 +2744,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2735,7 +2745,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// CraftBukkit end
}
} else {
@ -370,7 +370,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
}
}
@@ -3142,7 +3152,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3143,7 +3153,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Paper start
if (!org.bukkit.Bukkit.isPrimaryThread()) {
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
@ -379,7 +379,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
return;
}
}
@@ -3350,7 +3360,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3351,7 +3361,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} else if (!this.isSingleplayerOwner()) {
// Paper start - This needs to be handled on the main thread for plugins
server.submit(() -> {
@ -388,7 +388,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
});
// Paper end
}
@@ -3396,7 +3406,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3397,7 +3407,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
@ -397,7 +397,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
} else if (packet.identifier.equals(CUSTOM_UNREGISTER)) {
try {
@@ -3406,7 +3416,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3407,7 +3417,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
@ -406,7 +406,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
} else {
try {
@@ -3424,7 +3434,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3425,7 +3435,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
@ -415,7 +415,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
}
@@ -3466,7 +3476,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3467,7 +3477,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) {
if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) {
@ -424,7 +424,7 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
} else {
try {
SignatureValidator signaturevalidator = this.server.getServiceSignatureValidator();
@@ -3474,7 +3484,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3475,7 +3485,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
@ -434,10 +434,10 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 8d9d730b4fe3be9cc5965331614c3969ec4ad3f9..27c0e71fefb87b4bd987e371c33ef31c8706feaf 100644
index 54ccfd45a4a8373a40e7153c569b654fe2110506..dae66865e84352527f5115e37586f729d32c55cd 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -668,7 +668,7 @@ public abstract class PlayerList {
@@ -669,7 +669,7 @@ public abstract class PlayerList {
while (iterator.hasNext()) {
entityplayer = (ServerPlayer) iterator.next();
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
@ -446,7 +446,7 @@ index 8d9d730b4fe3be9cc5965331614c3969ec4ad3f9..27c0e71fefb87b4bd987e371c33ef31c
}
// Instead of kicking then returning, we need to store the kick reason
@@ -1304,8 +1304,8 @@ public abstract class PlayerList {
@@ -1305,8 +1305,8 @@ public abstract class PlayerList {
// Paper end
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
@ -491,10 +491,10 @@ index a24e7a66d52eddbdad8db71cf5e45f1a458c389f..e1c13ac7b11fb0080435fc34502208c8
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0f73f0e377c84ed3e1064b9ce6d9254a938c1ae0..24f77ef4a948bf5cf0346a8d8e1907f27a41cd2b 100644
index acc02c75819eabc73be1afef7cb86ebfdbf2f6e5..05f128ebc156729cacd8321e2140c15971e5977a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -604,7 +604,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -605,7 +605,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return;
@ -503,7 +503,7 @@ index 0f73f0e377c84ed3e1064b9ce6d9254a938c1ae0..24f77ef4a948bf5cf0346a8d8e1907f2
}
// Paper start
@@ -616,10 +616,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -617,10 +617,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void kick(final net.kyori.adventure.text.Component message) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index db44aa972afa0e6d65c54c35382235c375f07141..5fc1ef0bbc98b5fe3d2c696aa0ae19b6d865f0df 100644
index 82ddc28c97bf8ecf2ca703b612d752c0319a6b0f..d96f2cdc93ffcdb39b78d179423d85d7761cedf9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1203,7 +1203,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1204,7 +1204,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Paper end
// CraftBukkit start
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5fc1ef0bbc98b5fe3d2c696aa0ae19b6d865f0df..44b284bd3f7964685ec43c4f01d38f151a2abbd0 100644
index d96f2cdc93ffcdb39b78d179423d85d7761cedf9..d11d2dc10a8add75812f24234b8bf9c97fcb635c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2484,7 +2484,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2485,7 +2485,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Arm swing animation

View File

@ -17,10 +17,10 @@ index d9cacc372e1d40e6b2b5d83c88a01121b7f3f101..72f9f443fb69603d986d41f0776e6b9b
public boolean isRealPlayer; // Paper
public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 44b284bd3f7964685ec43c4f01d38f151a2abbd0..81a9a624e949ad4ac70e554a625837d0256d1557 100644
index d11d2dc10a8add75812f24234b8bf9c97fcb635c..7d257a0461739f0a4a59f9c17b237c44fde7c44d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -512,7 +512,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -513,7 +513,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Do not kick the player
return;
}
@ -28,7 +28,7 @@ index 44b284bd3f7964685ec43c4f01d38f151a2abbd0..81a9a624e949ad4ac70e554a625837d0
// Send the possibly modified leave message
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
// CraftBukkit end
@@ -521,7 +520,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -522,7 +521,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
this.connection.disconnect(ichatbasecomponent);
}));
@ -37,7 +37,7 @@ index 44b284bd3f7964685ec43c4f01d38f151a2abbd0..81a9a624e949ad4ac70e554a625837d0
this.connection.setReadOnly();
MinecraftServer minecraftserver = this.server;
Connection networkmanager = this.connection;
@@ -1982,6 +1981,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1983,6 +1982,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void onDisconnect(Component reason) {
@ -49,7 +49,7 @@ index 44b284bd3f7964685ec43c4f01d38f151a2abbd0..81a9a624e949ad4ac70e554a625837d0
// CraftBukkit start - Rarely it would send a disconnect line twice
if (this.processedDisconnect) {
return;
@@ -1999,7 +2003,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2000,7 +2004,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player.disconnect();
// Paper start - Adventure
@ -59,10 +59,10 @@ index 44b284bd3f7964685ec43c4f01d38f151a2abbd0..81a9a624e949ad4ac70e554a625837d0
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
// Paper end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 27c0e71fefb87b4bd987e371c33ef31c8706feaf..5f05e832a74a80f7a79b67ec18e269e4241089b9 100644
index dae66865e84352527f5115e37586f729d32c55cd..5db5e6b59ff996012f5b2d546f54d1f3b7442ce0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -554,6 +554,11 @@ public abstract class PlayerList {
@@ -555,6 +555,11 @@ public abstract class PlayerList {
}
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component
@ -74,7 +74,7 @@ index 27c0e71fefb87b4bd987e371c33ef31c8706feaf..5f05e832a74a80f7a79b67ec18e269e4
ServerLevel worldserver = entityplayer.getLevel();
entityplayer.awardStat(Stats.LEAVE_GAME);
@@ -564,7 +569,7 @@ public abstract class PlayerList {
@@ -565,7 +570,7 @@ public abstract class PlayerList {
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent AFK kick while watching end credits.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 81a9a624e949ad4ac70e554a625837d0256d1557..96897ccce68ecbff808077a07f213daccc57fa54 100644
index 7d257a0461739f0a4a59f9c17b237c44fde7c44d..f0688aba315ddea393fea88fc82752d9b46fec6a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -429,7 +429,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -430,7 +430,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
--this.dropSpamTickCount;
}

View File

@ -89,10 +89,10 @@ index af8af6bb44b84c74553068b6cd64f4e3941d4ae1..bc6ddf50bcd2f38be8c8fa064b49a736
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 5f05e832a74a80f7a79b67ec18e269e4241089b9..d84b976364b0ffc4b7356c6791d70f0e34deff48 100644
index 5db5e6b59ff996012f5b2d546f54d1f3b7442ce0..79aac02a4c702797c72970a40a17bdf4115fa644 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -844,13 +844,13 @@ public abstract class PlayerList {
@@ -845,13 +845,13 @@ public abstract class PlayerList {
f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D);
}
@ -129,10 +129,10 @@ index a64cd3b54840af9a9c946b3e4e4f91d1c5f4bc97..16f23ecffa52925904d585f3fed76aa6
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 24f77ef4a948bf5cf0346a8d8e1907f27a41cd2b..b16ce6bde4d7478a3fabe5a5c0a48489ada2d579 100644
index 05f128ebc156729cacd8321e2140c15971e5977a..657b7d30c1f84dfad3af3eb0b94ad82591652316 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1371,9 +1371,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1373,9 +1373,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) {

View File

@ -17,10 +17,10 @@ Async catch modifications to critical entity state
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 96897ccce68ecbff808077a07f213daccc57fa54..f2a96d282f65e405e8e396ef271ce0d5a094ac4b 100644
index f0688aba315ddea393fea88fc82752d9b46fec6a..df3bbf6c95068ac6d8b000d2ef13de1c6a5204e1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1652,6 +1652,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1653,6 +1653,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f2a96d282f65e405e8e396ef271ce0d5a094ac4b..f739357b5c304c06de6bab20a0dc9cb438c33fc1 100644
index df3bbf6c95068ac6d8b000d2ef13de1c6a5204e1..8321ab10cae1a8ea7c7e585d45668f5ef70fd941 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -837,6 +837,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -838,6 +838,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Paper end
// CraftBukkit end

View File

@ -47,10 +47,10 @@ index 595779cfd0ee1c405d7936f00a7cae1706125e7f..ed3af916dfa875dd0a5f1e730d20d11e
@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9848b4e62692c5044544710c93c099558fcbf1e6..db746a44c631380ff6bdf7a37d86d2e09877db88 100644
index 79aac02a4c702797c72970a40a17bdf4115fa644..0b3b926e6d9a0afbd2f4674517e39b3addd8acf5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -245,7 +245,7 @@ public abstract class PlayerList {
@@ -246,7 +246,7 @@ public abstract class PlayerList {
String s1 = "local";
if (connection.getRemoteAddress() != null) {

View File

@ -18,10 +18,10 @@ index 3e8255898e8afdd1127eea79338d5cc54502be76..fc187be6b3fb7bc9fa97d1ebcbe92294
}
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f739357b5c304c06de6bab20a0dc9cb438c33fc1..ee5ef598250ed02dbb44eb4240cb5b2521e33520 100644
index 8321ab10cae1a8ea7c7e585d45668f5ef70fd941..e9e7b06e6dd074da4f6821f1117c6a29dff78a7c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2698,8 +2698,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2699,8 +2699,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Refresh the current entity metadata
entity.getEntityData().refresh(player);
// SPIGOT-7136 - Allays

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add player health update API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index df7471ce615077933577f1e9e62933577a3b9781..d044420955a2a8e19337771ce155777a462c00fe 100644
index 657b7d30c1f84dfad3af3eb0b94ad82591652316..ee85c2f718c01c91e8fd850f448f189d42687900 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2383,9 +2383,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2385,9 +2385,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().maxHealthCache = getMaxHealth();
}
@ -22,7 +22,7 @@ index df7471ce615077933577f1e9e62933577a3b9781..d044420955a2a8e19337771ce155777a
if (this.getHandle().queueHealthUpdatePacket) {
this.getHandle().queuedHealthUpdatePacket = packet;
} else {
@@ -2394,6 +2396,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2396,6 +2398,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
}

Some files were not shown because too many files have changed in this diff Show More