13
0
geforkt von Mirrors/Paper

Separate out chat and commands sent via API (#8131)

Dieser Commit ist enthalten in:
Jake Potrebic 2022-07-27 19:07:26 -07:00 committet von GitHub
Ursprung 71544ab01f
Commit 4a4ee79cd6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
41 geänderte Dateien mit 192 neuen und 141 gelöschten Zeilen

Datei anzeigen

@ -13,23 +13,49 @@ This change will synchronize the command execution back to the main thread, caus
big slowdown in execution but throwing an exception at same time to raise awareness
that it is happening so that plugin authors can fix their code to stop executing commands async.
This also properly splits up the chat and command handling to reflect the server now
having separate packets for both, and the client always using the correct packet. Text
from a chat packet should never be parsed into a command, even if it starts with the `/`
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 fda4d570ef04e91c4e6c29c52221c04937dc4fbc..350128dc1c4c2c1597ad19d8b24193bc94c90d81 100644
index 4bdb7b50315c68a3f3c929745bf090f5c7a51c52..6ce257fca3a3645fdb68f877279bcae343dbd548 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2041,6 +2041,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2023,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return true;
}
- private static boolean isChatMessageIllegal(String message) {
+ public static boolean isChatMessageIllegal(String message) { // Paper - private -> public
for (int i = 0; i < message.length(); ++i) {
if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) {
return true;
@@ -2040,7 +2040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
OutgoingPlayerChatMessage outgoing = OutgoingPlayerChatMessage.create(original);
if (!async && s.startsWith("/")) {
- if (!async && s.startsWith("/")) {
+ if (false && !async && s.startsWith("/")) { // Paper - don't handle commands in chat logic
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@@ -2143,7 +2143,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}
- private void handleCommand(String s) {
+ public void handleCommand(String s) { // Paper - private -> public
+ // Paper Start
+ if (!org.spigotmc.AsyncCatcher.shuttingDown && !org.bukkit.Bukkit.isPrimaryThread()) {
+ final String fCommandLine = s;
+ LOGGER.error("Command Dispatched Async: " + fCommandLine);
+ LOGGER.error("Command Dispatched Async: " + s);
+ LOGGER.error("Please notify author of plugin causing this execution to fix this bug! see: http://bit.ly/1oSiM6C", new Throwable());
+ Waitable wait = new Waitable() {
+ Waitable<Void> wait = new Waitable<>() {
+ @Override
+ protected Object evaluate() {
+ chat(fCommandLine, original, false);
+ protected Void evaluate() {
+ ServerGamePacketListenerImpl.this.handleCommand(s);
+ return null;
+ }
+ };
@ -44,9 +70,9 @@ index fda4d570ef04e91c4e6c29c52221c04937dc4fbc..350128dc1c4c2c1597ad19d8b24193bc
+ }
+ }
+ // Paper End
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 415393e965c7253412ec4d893c3e62ad14dd69f2..846c5144fefd1dfd1bbd8e6f82bd9248be34ad1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@ -80,6 +106,31 @@ index 415393e965c7253412ec4d893c3e62ad14dd69f2..846c5144fefd1dfd1bbd8e6f82bd9248
if (this.commandMap.dispatch(sender, commandLine)) {
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 62a4ae1ee2a0784787b6f45bff6393630e1d4219..f4ce3bf0b7c285d5c98c34290f64d317f13da68d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -461,7 +461,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void chat(String msg) {
if (this.getHandle().connection == null) return;
- this.getHandle().connection.chat(msg, null, false);
+ // Paper start - improve chat handling
+ if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {
+ this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS);
+ } else {
+ if (msg.startsWith("/")) {
+ this.getHandle().connection.handleCommand(msg);
+ } else {
+ // TODO text filtering
+ // TODO chat decorating
+ this.getHandle().connection.chat(msg, PlayerChatMessage.unsigned(net.minecraft.network.chat.MessageSigner.create(this.getUniqueId()), new net.minecraft.network.chat.ChatMessageContent(msg)), false);
+ }
+ }
+ // Paper end
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 19c44daaa407b7c1c7a7ffe56fef8c8814c6d5b2..6a073a9dc44d93eba296a0e18a9c7be8a7881725 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java

Datei anzeigen

@ -16,10 +16,10 @@ 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 383168bc9af2174cbe6a0c914d0dbbc8b9d3d156..797c6f7e055cc2579db5f20b393f8011bc62eadb 100644
index 97307be401ca8a5207aa7b96a6f7961f9fc76786..3794d05b17378ebf517199adbbfd54a395ef6b37 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1038,7 +1038,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1050,7 +1050,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
entity.connection.teleport(to);
} else {

Datei anzeigen

@ -5,7 +5,7 @@ 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 e9999a52a0f54c47e973bc22fa91465e8e993b1c..02b5b4c3ae00354d105c5f7f47d01317f1097922 100644
index 6ce257fca3a3645fdb68f877279bcae343dbd548..2e9aa7bcdaf86165190d16098d7f6363bfa2f837 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1753,8 +1753,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -23,7 +23,7 @@ index e9999a52a0f54c47e973bc22fa91465e8e993b1c..02b5b4c3ae00354d105c5f7f47d01317
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 797c6f7e055cc2579db5f20b393f8011bc62eadb..946f68af7d9b7f812675eeda02cc6ac37d839917 100644
index 3794d05b17378ebf517199adbbfd54a395ef6b37..b85ca8bded5157adad810b9a50ca0fe377597c93 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -144,6 +144,7 @@ import org.bukkit.plugin.Plugin;
@ -45,7 +45,7 @@ index 797c6f7e055cc2579db5f20b393f8011bc62eadb..946f68af7d9b7f812675eeda02cc6ac3
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -2115,6 +2120,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2127,6 +2132,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning;
}

Datei anzeigen

@ -44,10 +44,10 @@ index 1dcf41a4105c05c3182afa8585dee20723d2c136..54e7fa7a483e15c440f562559601292c
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 946f68af7d9b7f812675eeda02cc6ac37d839917..16103cea67ec657edfd57b2a1d582794efeac4b6 100644
index b85ca8bded5157adad810b9a50ca0fe377597c93..edd750b20a3367a1fb00ed5df593102730a8f26a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1920,6 +1920,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1932,6 +1932,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

Datei anzeigen

@ -20,10 +20,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510
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 02b5b4c3ae00354d105c5f7f47d01317f1097922..6d09bd67753a16effb80224bb4c970f7bf3aeb9a 100644
index 2e9aa7bcdaf86165190d16098d7f6363bfa2f837..680193185185972d3b9112c7b59565bce1b1729a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2614,8 +2614,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2613,8 +2613,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
});
}
}

Datei anzeigen

@ -19,10 +19,10 @@ index b117a98dea77755bee33f8a141f8df16b587beeb..8f4b8e4911d5c3bb82c9ac246c041c0e
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index aea8d2376e88a327985f7f5d34e355cd9090941e..c14ab179046b3c608190ddf1ffa1048411c664aa 100644
index 50759c53b46b913ac7ff56476d2a49163e54fff4..44daf6210786748f44275a97ecebbd191837b5e5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3253,7 +3253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3252,7 +3252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
public final boolean isDisconnected() {

Datei anzeigen

@ -11,10 +11,10 @@ I suspect Mojang may switch to this behavior before full release.
To be converted into a Paper-API event at some point in the future?
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c14ab179046b3c608190ddf1ffa1048411c664aa..bdef09be892bf2675f713e1f8babada7019c0781 100644
index 44daf6210786748f44275a97ecebbd191837b5e5..7bf555082539dc6cc4151df875b048b85fdba020 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2439,6 +2439,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2438,6 +2438,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);

Datei anzeigen

@ -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 60dfaa3d1f873cb6c01fd736e78dde6a9b5c148e..1be835e21c1400bbd4f6b793061c3d9f9c0625cd 100644
index f7da31103f75e6bdc06f28a35e3341ec360bd245..49f7840a04f12ae6a28f3e0282d3e4529496c736 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3212,14 +3212,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3211,14 +3211,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {

Datei anzeigen

@ -10,10 +10,10 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1c620dc2e798c9d4f0816753362cab8564037ca0..383df34b8c71c0d3bd9315a978d242cf76d4a9b5 100644
index 4ad178d99da224927b785d586bb2057ddd73ccd8..d1271b9c31502407dfeaf8eb47b73f515bf6c0fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1353,7 +1353,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1365,7 +1365,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

Datei anzeigen

@ -24,7 +24,7 @@ index 681c4dddac4ffc5997f3ea92befaeafc36da99c4..7c3c76b7ef169e0c0832e26212775111
playerName = gameProfile.getName();
uniqueId = gameProfile.getId();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 383df34b8c71c0d3bd9315a978d242cf76d4a9b5..785e11b21b580298d5c3153aeb3cc3496ec97176 100644
index d1271b9c31502407dfeaf8eb47b73f515bf6c0fd..32554bad10cccec164bc36063333244344c16473 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -75,6 +75,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
@ -47,7 +47,7 @@ index 383df34b8c71c0d3bd9315a978d242cf76d4a9b5..785e11b21b580298d5c3153aeb3cc349
@Override
public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null;
@@ -1486,8 +1482,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1498,8 +1494,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.hiddenEntities.put(entity.getUniqueId(), hidingPlugins);
// Remove this entity from the hidden player's EntityTrackerEntry
@ -64,7 +64,7 @@ index 383df34b8c71c0d3bd9315a978d242cf76d4a9b5..785e11b21b580298d5c3153aeb3cc349
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) {
entry.removePlayer(this.getHandle());
@@ -1500,8 +1503,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1512,8 +1515,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, otherPlayer));
}
}
@ -73,7 +73,7 @@ index 383df34b8c71c0d3bd9315a978d242cf76d4a9b5..785e11b21b580298d5c3153aeb3cc349
}
@Override
@@ -1538,8 +1539,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1550,8 +1551,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
this.hiddenEntities.remove(entity.getUniqueId());
@ -90,7 +90,7 @@ index 383df34b8c71c0d3bd9315a978d242cf76d4a9b5..785e11b21b580298d5c3153aeb3cc349
if (other instanceof ServerPlayer) {
ServerPlayer otherPlayer = (ServerPlayer) other;
@@ -1550,9 +1558,51 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1562,9 +1570,51 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
entry.updatePlayer(this.getHandle());
}

Datei anzeigen

@ -9,7 +9,7 @@ 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 785e11b21b580298d5c3153aeb3cc3496ec97176..375821d136bf98d13b86cdebef8a7968d6c8d3a9 100644
index 32554bad10cccec164bc36063333244344c16473..c63831b9ec29ea1589cc87fbe4615f6dfddce473 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -167,6 +167,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -20,7 +20,7 @@ index 785e11b21b580298d5c3153aeb3cc3496ec97176..375821d136bf98d13b86cdebef8a7968
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1802,7 +1803,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1814,7 +1815,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
public void addChannel(String channel) {

Datei anzeigen

@ -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 795bd69354dc59ea3fc59daa7239e5e8fa110e8c..4471a220b66cdb055b5e4c32b5d7859685ea4666 100644
index dc3725622f8ae2832ff4329aa78395c5cc67c02f..5bd5cde911520eb0da695b961867a52845ad416f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3218,9 +3218,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3217,9 +3217,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
FilteredText filteredtext = (FilteredText) signText.get(i);
if (this.player.isTextFilteringEnabled()) {

Datei anzeigen

@ -75,7 +75,7 @@ index a9497e21c87e785631788968bc4922f6261169f9..522c8791edd87feb6cb32ef8e621ae35
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 4e8dbad3ce78e90f71990de3c21164989280280f..0cbca2deb19f523210b0f67884872662c5baab9b 100644
index 5bd5cde911520eb0da695b961867a52845ad416f..57e3301e5b18d90d6f499fa6a544866a5eca01a9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -216,6 +216,7 @@ import org.bukkit.event.inventory.ClickType;
@ -86,7 +86,7 @@ index 4e8dbad3ce78e90f71990de3c21164989280280f..0cbca2deb19f523210b0f67884872662
import org.bukkit.event.inventory.InventoryCreativeEvent;
import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.event.inventory.SmithItemEvent;
@@ -2744,10 +2745,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2743,10 +2744,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleContainerClose(ServerboundContainerClosePacket packet) {
@ -173,10 +173,10 @@ index 4ff81744b7c9113f57cf1fa89bb943902711b2dc..404ed5e8f54d70a50de4232c6ea0f616
@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 375821d136bf98d13b86cdebef8a7968d6c8d3a9..04786e67f1699b944cd5d09d916a086e34acfaef 100644
index c63831b9ec29ea1589cc87fbe4615f6dfddce473..f5259ada3e21b036fd3e3b96d727f1c8c4a042b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1067,7 +1067,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1079,7 +1079,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

Datei anzeigen

@ -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 0e323c2acd447f0cd41d8afbc80f7fa20f03ca72..af966cd751b73af9e01c8561d3e74972a241b0f5 100644
index 57e3301e5b18d90d6f499fa6a544866a5eca01a9..15e69839cb1da5f0402e9abd155fb67d323b8f5d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2629,6 +2629,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2628,6 +2628,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
if (event.isCancelled()) {

Datei anzeigen

@ -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 04786e67f1699b944cd5d09d916a086e34acfaef..be4663e5ab3afd554dec58b97b940eb6e46fead7 100644
index f5259ada3e21b036fd3e3b96d727f1c8c4a042b8..d445ebe4b5055a270b679c353abcecf6dea3dc8c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2498,6 +2498,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2510,6 +2510,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

Datei anzeigen

@ -310,10 +310,10 @@ index f94a74728bd7c02a7f8245c92e7916f0b669ee0d..cd54fa8f7bbcb6036e90f4ef7cdc01d7
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 be4663e5ab3afd554dec58b97b940eb6e46fead7..0c29d7271c0ebc4aa11743db7a0c1a89036b4a27 100644
index d445ebe4b5055a270b679c353abcecf6dea3dc8c..df164a6fe8d53d34db93f4f1f2af6a9c1c98a7e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2062,7 +2062,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2074,7 +2074,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendHealthUpdate() {

Datei anzeigen

@ -28,7 +28,7 @@ index f95e8e53fc0438858921446f44279f747414b12f..eaf95c84896f71f36e250b3a07bb5042
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 f181ee0db6c25eee07d2750ebe35b97b586c8c35..c3d797f0f57dfb065ba4ea594fbae734b1066318 100644
index 734a7b101e5ac9ac4ceb0ba3cb74b94bf2c18683..f6f086d1e5f08e5beae142685cfb682b8e5683f1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -178,6 +178,7 @@ public abstract class PlayerList {
@ -106,7 +106,7 @@ index e7442952ef1f03969949014492a7ddc6d0796ba5..d7823d7dc88cfba6f6ac9dae220e03de
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 0c29d7271c0ebc4aa11743db7a0c1a89036b4a27..e434550ee5922e0d622a075085e0135ce1e93217 100644
index df164a6fe8d53d34db93f4f1f2af6a9c1c98a7e8..500c1a317f58c1b24ae1b7cbcd101f1d327e3ae8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -168,6 +168,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -117,7 +117,7 @@ index 0c29d7271c0ebc4aa11743db7a0c1a89036b4a27..e434550ee5922e0d622a075085e0135c
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1674,6 +1675,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1686,6 +1687,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@ -136,7 +136,7 @@ index 0c29d7271c0ebc4aa11743db7a0c1a89036b4a27..e434550ee5922e0d622a075085e0135c
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
@@ -1696,6 +1709,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1708,6 +1721,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 0c29d7271c0ebc4aa11743db7a0c1a89036b4a27..e434550ee5922e0d622a075085e0135c
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
@@ -1710,6 +1725,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1722,6 +1737,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

Datei anzeigen

@ -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 e434550ee5922e0d622a075085e0135ce1e93217..c8b9c55c2d927ed5f9a0597822ceef95842abe5e 100644
index 500c1a317f58c1b24ae1b7cbcd101f1d327e3ae8..f201e1b7f4487ce79e296b74e71ed959568fd0ad 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2545,6 +2545,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2557,6 +2557,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}

Datei anzeigen

@ -22,7 +22,7 @@ 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 4ce4cba4f105c9abcad29173be38bb36feb1d061..fdc13ca3d48cf20d8b15f42fc19f1375947f0c90 100644
index ed272499b40a96efd83f1a09a063e4d65dbe48e8..32c89f89fc9dbcdc9528acf46415b4d7c6475ff3 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -293,6 +293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -33,7 +33,7 @@ index 4ce4cba4f105c9abcad29173be38bb36feb1d061..fdc13ca3d48cf20d8b15f42fc19f1375
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
@@ -3263,7 +3264,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3262,7 +3263,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {

Datei anzeigen

@ -22,10 +22,10 @@ index d6f34adbdf45bbef4a39e629dd7cb6d7fcb5db0f..7881176a900daa3306c691454f688c1f
this.broadcast.accept(packet);
if (this.entity instanceof ServerPlayer) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fdc13ca3d48cf20d8b15f42fc19f1375947f0c90..c3a2c3acaacff9a2570a54cab5239b888946728f 100644
index 32c89f89fc9dbcdc9528acf46415b4d7c6475ff3..30b65246eacf2955a52bbf46856ca82ae9e1d5cb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2704,7 +2704,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2703,7 +2703,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) {
// Refresh the current entity metadata

Datei anzeigen

@ -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 b3a23434a5111d6ad393a7b3c0da67cb48dbaad9..e1c413ef1db2c8e3aa2303351ef97aa8deb3da11 100644
index 83d9eac28a08bc075904d274effed54de77be6bf..00f9b6213a7289ea8d48fcf41d701bde5497006d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3308,6 +3308,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3307,6 +3307,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());

Datei anzeigen

@ -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 a0f492b0c7783fc8c5ce2e1a60707ae2db74ab9f..640a9e56477e827f25acb962cbbda37a33401139 100644
index a42d153d861134a1255e302b44b291f6f36132ce..38f514320de5a2b3c09e288f7fb1b88c1662e9f8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3205,9 +3205,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3204,9 +3204,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 {

Datei anzeigen

@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8e74c4b6b5186663537be304cfe462bb462e92f9..b80b2674077f23a5fe33d20e771b0e8b0968dc69 100644
index e2ba646cf628c3791e8a5b1195f985cb1b3e6916..546ee711f3a11789647b021383841a332cc9c72f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -791,7 +791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -89,10 +89,10 @@ index be00b0f9c15e1e7c22c2d2ebf3063639520f2030..b0dffb7c7c8fece2528ac218acef4287
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 650a93fab930b5c2b649477b0549124bd1802e5c..b72924b80021a4b9748723af7b6b71544d7bede1 100644
index 3bf70e93d47b2738f6f840b1f4fb71915519077c..a29b1bdac36b3fc10bc7a8c1be6602e3c31b1d7c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3475,7 +3475,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3474,7 +3474,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()) {

Datei anzeigen

@ -1112,7 +1112,7 @@ index 8770fe0db46b01e8b608637df4f1a669a3f4cdde..3c1698ba0d3bc412ab957777d9b5211d
private final String name;
private final Comparator<T> comparator;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 04a4f87920f8e8ab56f864d58424153b54686e3f..9d54f0cffd201d3ee7f2ba39740e08be4823c691 100644
index 1d5a8cf65b5eb4aa9b2e316d23cf9e9d13500fed..6e433410e5d26627b553c0aabd965da10da9307f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -179,6 +179,7 @@ public abstract class PlayerList {
@ -1194,10 +1194,10 @@ index b234ba968e82ddf1e8f7c84d3a17659e3beda2b3..af22fa8aa8ddef4d592564b14d0114cc
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
if (chunk != null) addTicket(x, z); // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 14dc5a18bffc4d8a7d3e786142a3fd853aaeeac4..bd1611e9e83d0e579d38ad295d9f241570696cb3 100644
index 5f50296f2f2b1c5a68309de9687d7c7c6a2ede3b..593925b1f20f94d7cd25492e0a70b9558c8b63c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1035,6 +1035,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1047,6 +1047,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead.");
}

Datei anzeigen

@ -5,7 +5,7 @@ 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 b72924b80021a4b9748723af7b6b71544d7bede1..322c9d39cd63e1651e5bb1b9ba5b070a18bf5340 100644
index a29b1bdac36b3fc10bc7a8c1be6602e3c31b1d7c..5a33dd6575a4453694736e39652c1da2486c98d7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -296,6 +296,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -17,7 +17,7 @@ index b72924b80021a4b9748723af7b6b71544d7bede1..322c9d39cd63e1651e5bb1b9ba5b070a
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
this.lastSeenMessagesValidator = new LastSeenMessagesValidator();
@@ -3430,6 +3432,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3429,6 +3431,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 b72924b80021a4b9748723af7b6b71544d7bede1..322c9d39cd63e1651e5bb1b9ba5b070a
@Override
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
@@ -3457,6 +3461,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3456,6 +3460,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
try {
byte[] data = new byte[packet.data.readableBytes()];
packet.data.readBytes(data);
@ -42,7 +42,7 @@ index b72924b80021a4b9748723af7b6b71544d7bede1..322c9d39cd63e1651e5bb1b9ba5b070a
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
@@ -3466,6 +3479,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3465,6 +3478,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
@ -56,10 +56,10 @@ index b72924b80021a4b9748723af7b6b71544d7bede1..322c9d39cd63e1651e5bb1b9ba5b070a
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 bd1611e9e83d0e579d38ad295d9f241570696cb3..d70be6515dbf00ab6fe5b3c05d208a5686ce0209 100644
index 593925b1f20f94d7cd25492e0a70b9558c8b63c6..7783ba0edd8fb3f102769eeb4d755f915c8f7820 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2679,6 +2679,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2691,6 +2691,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

Datei anzeigen

@ -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 a2a227f24855c89a1a8c45507f8ab0bd750638c4..ced1fd7ac0cbc80d5d65c95163ee271b26281773 100644
index 4e687f502ef8e0cb11400fb4254e1a1b4640dc1b..61a7f08a78381ee4e3fbec53dc1374ce04ec90ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2261,7 +2261,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2273,7 +2273,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());
}

Datei anzeigen

@ -5,7 +5,7 @@ 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 31295e991b4269bc36293a70ba10738b9668244e..04bd217574e4395f3a42511d7e8b1938f5106cec 100644
index 0ddc1d16255d0c4a4bbfaccc9e167a83fc221485..7f91a1129a7702a4cff001de791514a37f9def09 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -24,7 +24,7 @@ index 31295e991b4269bc36293a70ba10738b9668244e..04bd217574e4395f3a42511d7e8b1938
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -3224,6 +3226,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3223,6 +3225,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {

Datei anzeigen

@ -6,7 +6,7 @@ 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 04bd217574e4395f3a42511d7e8b1938f5106cec..75b8e92c1fb57c3062ce30e0d00396e4a69ec3c0 100644
index 7f91a1129a7702a4cff001de791514a37f9def09..6525d8cee86928158dfd121ff11d18b088898a67 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1845,7 +1845,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -18,7 +18,7 @@ index 04bd217574e4395f3a42511d7e8b1938f5106cec..75b8e92c1fb57c3062ce30e0d00396e4
this.player.swing(enumhand, true);
}
}
@@ -2592,7 +2592,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2591,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Vec3 vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
HitResult movingobjectposition = this.player.level.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.player));

Datei anzeigen

@ -5,10 +5,10 @@ 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 539e98cad4a62c6c838ce6cec1947197878da01b..2278cc53e29f288e157ccb13e1332e63c6fdb939 100644
index 125cc1951c785fd1a75569f57f779626a1fbe586..035b8a49c3647be3c2e6478767078d6dd14e6208 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2877,7 +2877,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2876,7 +2876,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
case PERFORM_RESPAWN:
if (this.player.wonGame) {
this.player.wonGame = false;
@ -18,7 +18,7 @@ index 539e98cad4a62c6c838ce6cec1947197878da01b..2278cc53e29f288e157ccb13e1332e63
} 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 788a6dae744fd95d11d4f97a2fb0a7f53eed5884..45844d2afd5e5203a85d1419ee0a0d66722e4aed 100644
index f58f35cdab48066688cf4cf16fc4819229d2191d..bdb37391b9df7ec4983728de8324aa3f1ed20f4b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -811,6 +811,12 @@ public abstract class PlayerList {

Datei anzeigen

@ -126,10 +126,10 @@ index 32746dfbc2fdfc150583676b1bf0762398b76d75..1ad1f958a9b6e1bc21f1c505aa7ea549
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 749269cf1af41717d50eec75ab0f9a8e51370273..e6d496324d9188e7885687ff6fb62bfeb32a1ecc 100644
index 035b8a49c3647be3c2e6478767078d6dd14e6208..9ad786bb2fd516e167c3ec55e854155d64dd73a5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2886,7 +2886,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2885,7 +2885,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player = this.server.getPlayerList().respawn(this.player, false);
if (this.server.isHardcore()) {
@ -139,10 +139,10 @@ index 749269cf1af41717d50eec75ab0f9a8e51370273..e6d496324d9188e7885687ff6fb62bfe
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e3ea73cc055a0738bc575f7f523bd61ff050e171..cacadcbffdc9629e693dfea6185009ebca2740f6 100644
index c6019b688eed5426e21f2950065363268f8285a5..60024a387429a13593f7f709004282d27678cbbe 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1384,7 +1384,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1396,7 +1396,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new IllegalArgumentException("Mode cannot be null");
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerKickEvent causes
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fdf08831a9d1b27c8050432e958f7133f3d10e1e..d605c4355674644e47ea5ea9e979f7806aed1607 100644
index db60b41f7da9caebfb798ed39ccac51d15bd1324..1376f0aa4ec2c37a64d208168c0160255aa4899b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2101,7 +2101,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -57,7 +57,7 @@ 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 f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec6dcaaabb 100644
index 2217d9b3bb589278da5b421ffce9e00261d08469..d19ca87b0819d281cc36d812ce01b72ff08aad83 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -372,7 +372,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -236,7 +236,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
} else {
if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) {
// this.server.submit(() -> { // CraftBukkit - async chat
@@ -2478,7 +2486,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2477,7 +2485,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
@ -245,7 +245,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
}
}
@@ -2740,7 +2748,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2739,7 +2747,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Spigot Start
if ( entity == this.player && !this.player.isSpectator() )
{
@ -254,7 +254,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
return;
}
// Spigot End
@@ -2833,7 +2841,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2832,7 +2840,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// CraftBukkit end
} else {
@ -263,7 +263,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
}
}
@@ -3241,7 +3249,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3240,7 +3248,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) {
@ -272,7 +272,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
return;
}
}
@@ -3444,7 +3452,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3443,7 +3451,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(() -> {
@ -281,7 +281,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
});
// Paper end
}
@@ -3490,7 +3498,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3489,7 +3497,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
@ -290,7 +290,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
}
} else if (packet.identifier.equals(CUSTOM_UNREGISTER)) {
try {
@@ -3500,7 +3508,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3499,7 +3507,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
@ -299,7 +299,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
}
} else {
try {
@@ -3518,7 +3526,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3517,7 +3525,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);
@ -309,7 +309,7 @@ index f181c9bbdd399e06ed5d43b3165d9b702e2267d5..7810804dfeeb8e78b2af10f7e2ae8aec
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 45844d2afd5e5203a85d1419ee0a0d66722e4aed..69af47c070806ae410a2f4c80c121f48689f56bc 100644
index bdb37391b9df7ec4983728de8324aa3f1ed20f4b..ca0ad4fd5f4aafacd197494970f2aec3b2a6c4d0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -720,7 +720,7 @@ public abstract class PlayerList {
@ -333,7 +333,7 @@ index 45844d2afd5e5203a85d1419ee0a0d66722e4aed..69af47c070806ae410a2f4c80c121f48
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cacadcbffdc9629e693dfea6185009ebca2740f6..8ffef2843d8d4fa6ddfc0fb1403c6eacdafa63a9 100644
index 60024a387429a13593f7f709004282d27678cbbe..d72e5c06ab4f34742ec74448d1cad892048f159b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -516,7 +516,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -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 dfe1966bfb30b3d2e60e6b88d0a7c2331b02e9a4..4d3874b5f44d0162e245a73b5543c9f2cc75c9ce 100644
index 7727749b09ef5a4bf5ea51f12befd3c106f3a56f..7c9f4f7b0687dcd04eee24464c2902f931552aba 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2617,7 +2617,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2616,7 +2616,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Arm swing animation

Datei anzeigen

@ -89,7 +89,7 @@ index f523311e822af9cbef571338fd8fef177b9fc73d..ec713ffb7c4cba53dc983ebde5596e47
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 387158d5aad22e0da186e1087364d8a990aadd23..5dcb961275abd3eeefb60e68276f765539b366df 100644
index 0354b7e20bbc9f888cf85d6db42ce2b64a25b4c2..76fa5e31701bc0e504d8e7b6ebfa737f3a10dc3b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -896,13 +896,13 @@ public abstract class PlayerList {
@ -129,10 +129,10 @@ index c3e49a781f838e6a46cb89744f3f1846de182275..c2f3d3a09327e7cb7d3167609eb3ce68
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8ffef2843d8d4fa6ddfc0fb1403c6eacdafa63a9..0d7da68faa8c3401dcc12c67ae9edd977c436e55 100644
index d72e5c06ab4f34742ec74448d1cad892048f159b..fa85a7be4a131b7ae8a5d2aae78a82fcd53e5967 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1204,9 +1204,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1216,9 +1216,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) {

Datei anzeigen

@ -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 0d7da68faa8c3401dcc12c67ae9edd977c436e55..b0f49701460fd2d53f691d7485aab49b14da024f 100644
index fa85a7be4a131b7ae8a5d2aae78a82fcd53e5967..7112eb5f32faceb371b73a0ee82cf7b23b977f3a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2140,9 +2140,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2152,9 +2152,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().maxHealthCache = getMaxHealth();
}
@ -22,7 +22,7 @@ index 0d7da68faa8c3401dcc12c67ae9edd977c436e55..b0f49701460fd2d53f691d7485aab49b
if (this.getHandle().queueHealthUpdatePacket) {
this.getHandle().queuedHealthUpdatePacket = packet;
} else {
@@ -2150,7 +2152,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2162,7 +2164,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end
}

Datei anzeigen

@ -25,7 +25,7 @@ index 82ea4fabd5732052a286d50bcff8bbcc2c4aa7d7..652bea6868a03a5315965f79c76172fb
public void write(FriendlyByteBuf buf) {
buf.writeLong(this.sectionPos.asLong());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b0f49701460fd2d53f691d7485aab49b14da024f..690bbb42ebe86c9ebca21ac53ad1d10d011d9e6e 100644
index 7112eb5f32faceb371b73a0ee82cf7b23b977f3a..8b1c5d035b6cfe7aec1321d637bb88375c8213fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
@ -36,7 +36,7 @@ index b0f49701460fd2d53f691d7485aab49b14da024f..690bbb42ebe86c9ebca21ac53ad1d10d
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.ChatSender;
@@ -870,6 +871,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -882,6 +883,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8ac6bba7a4427733f9f03835480fd574fe17dd93..ae83029dc0a3b5e6d511dd4e0140d4f19c325a42 100644
index a73f7e62de04f8e9556014c2a7c33b20220a38de..f72402cc1fef02f72b4b0dfda1c01d1d0774205b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3392,7 +3392,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3391,7 +3391,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
if (this.player.level.isLoaded(blockposition)) {

Datei anzeigen

@ -18,10 +18,10 @@ index 20670bc075c387ee0422eb1014207e26105efccd..bdd6560fe85950b0a857a949cb38c044
if (dedicatedserverproperties.enableQuery) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ae83029dc0a3b5e6d511dd4e0140d4f19c325a42..9f574e4425e73826b969302cf85025fc63b66f4a 100644
index f72402cc1fef02f72b4b0dfda1c01d1d0774205b..a480c1a64d6d22f973ab1b4399816610da836101 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2988,7 +2988,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2987,7 +2987,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player = this.server.getPlayerList().respawn(this.player, false);
if (this.server.isHardcore()) {
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 9f574e4425e73826b969302cf85025fc63b66f4a..c5278cc28eaba16d6adc31fc5f276e0c972fd8dc 100644
index a480c1a64d6d22f973ab1b4399816610da836101..ca066bb34e4bbad587b1ecb07f06958742082c64 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3571,6 +3571,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3570,6 +3570,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors
TODO: potentially add some kick leeway
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ea47d8f0275a99920c6e3f5c7a9c09ccb2341139..3b3a60bbc4547ae7e89ce40ae1572dbe1c028416 100644
index ad083a1e57e15568d05f54f5606f7c9b355c1927..66fa86f67a835b7a4c2de6c5111367d1ab6034fb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2294,7 +2294,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -18,7 +18,7 @@ index ea47d8f0275a99920c6e3f5c7a9c09ccb2341139..3b3a60bbc4547ae7e89ce40ae1572dbe
this.server.scheduleOnMain(() -> { // Paper - push to main
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"));
}); // Paper - push to main
@@ -2551,7 +2551,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2550,7 +2550,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return false;
} else {
if (message.hasExpiredServer(Instant.now())) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3b3a60bbc4547ae7e89ce40ae1572dbe1c028416..64542840d4b0a86d13e4a1ebef05a0761ea8edb9 100644
index 66fa86f67a835b7a4c2de6c5111367d1ab6034fb..309fce97cff8ec60c4734e61c0572897927539b4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2572,7 +2572,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2571,7 +2571,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Spigot end
// this.chatSpamTickCount += 20;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 64542840d4b0a86d13e4a1ebef05a0761ea8edb9..e8b6fe40b4d51f506fc9686a12ec240c6bb8328b 100644
index 309fce97cff8ec60c4734e61c0572897927539b4..a14710afaabf2b3b43f18ebe52eec8befff2b4ed 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1726,11 +1726,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -69,10 +69,10 @@ index 2a6c67634c31c332102d24bef293da1bacd0c000..b80cc0938b2b3928f4450f1314a9fbd7
// Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 37f43ef07881b0898caef3ec28779a8b61fada47..0cb2b0bda179f90ec8bf8bc4d9be092290eccba0 100644
index 6acac39e4fe5a9303ee2bd8356633b5173de55af..9b5eb67b085c706acbf38278abacc1cd0c01d388 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1123,7 +1123,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1135,7 +1135,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setRotation(float yaw, float pitch) {
@ -89,7 +89,7 @@ index 37f43ef07881b0898caef3ec28779a8b61fada47..0cb2b0bda179f90ec8bf8bc4d9be0922
}
// Paper start - Chunk priority
@@ -1138,8 +1146,79 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1150,8 +1158,79 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public boolean teleport(Location location, PlayerTeleportEvent.TeleportCause cause) {
@ -169,7 +169,7 @@ index 37f43ef07881b0898caef3ec28779a8b61fada47..0cb2b0bda179f90ec8bf8bc4d9be0922
location.checkFinite();
ServerPlayer entity = this.getHandle();
@@ -1152,7 +1231,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1164,7 +1243,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false;
}
@ -178,7 +178,7 @@ index 37f43ef07881b0898caef3ec28779a8b61fada47..0cb2b0bda179f90ec8bf8bc4d9be0922
return false;
}
@@ -1170,7 +1249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1182,7 +1261,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// If this player is riding another entity, we must dismount before teleporting.
@ -187,7 +187,7 @@ index 37f43ef07881b0898caef3ec28779a8b61fada47..0cb2b0bda179f90ec8bf8bc4d9be0922
// SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) {
@@ -1192,7 +1271,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1204,7 +1283,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Check if the fromWorld and toWorld are the same.
if (fromWorld == toWorld) {