geforkt von Mirrors/Paper
Updated Upstream (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 CraftBukkit Changes: ead719a65 SPIGOT-7136: Cancelling PlayerInteractEntityEvent with the Allay desyncs 8468e167e SPIGOT-7137: StructureGrowEvent isFromBonemeal and getPlayer have incorrect values d45057c59 SPIGOT-7089: Crash when command blocks attempt to load worlds Spigot Changes: 450dcaa8 Rebuild patches
Dieser Commit ist enthalten in:
Ursprung
3f0415b453
Commit
0ddd20c6f7
@ -142,10 +142,10 @@ index 82764c462f82163ee49f4e9466f383366cd23b8b..8da1226a6c293abb038d10c7921a77ed
|
||||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7740e69617c3d543a67ed0942ba8ec550ad4386d..b7d44c4a961ad3881bbf8f87f1595be79e3467f6 100644
|
||||
index cd9f94b98f9b7072ed7ca1becd779132dfc1dd12..80a3c56fb5e73c09c542b17aac952fb63081a662 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1737,7 +1737,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1753,7 +1753,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
PackRepository resourcepackrepository = this.packRepository;
|
||||
|
||||
Objects.requireNonNull(this.packRepository);
|
||||
|
@ -1893,7 +1893,7 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
|
||||
buf.writeComponent(this.footer);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 20a0a14f331ed891a64bd3ed69ade9cf2d917922..b9a6533afbfe07ff544f9f03f3c254890ee2e068 100644
|
||||
index 805a1773d55e2551911e5b8e69052e23f630359b..e4220f14a5ebf43dd3491fc8649c2be5238c5798 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -229,6 +229,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -1904,7 +1904,7 @@ index 20a0a14f331ed891a64bd3ed69ade9cf2d917922..b9a6533afbfe07ff544f9f03f3c25489
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
@Nullable
|
||||
@@ -1590,8 +1591,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1606,8 +1607,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.motd;
|
||||
}
|
||||
|
||||
@ -1923,7 +1923,7 @@ index 20a0a14f331ed891a64bd3ed69ade9cf2d917922..b9a6533afbfe07ff544f9f03f3c25489
|
||||
}
|
||||
|
||||
public boolean previewsChat() {
|
||||
@@ -2302,27 +2313,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2318,27 +2329,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
public final java.util.concurrent.ExecutorService chatExecutor = java.util.concurrent.Executors.newCachedThreadPool(
|
||||
@ -2048,19 +2048,19 @@ index 84564ca128d2dfc79c0b5a13b699cf6fc80bdea7..9ab4588e4e512176b881ad4c252e400f
|
||||
// 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 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f84735a4e 100644
|
||||
index bc253a8140f6775d038b2b0bfa185de99b3010d8..a258c965a4a0352f9d77def6748b176f3bdab106 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 org.apache.commons.lang3.StringUtils;
|
||||
@@ -188,6 +188,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
+import io.papermc.paper.adventure.ChatProcessor; // Paper
|
||||
+import io.papermc.paper.adventure.PaperAdventure; // Paper
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import net.minecraft.network.chat.OutgoingPlayerChatMessage;
|
||||
@@ -441,14 +443,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -444,14 +446,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return this.server.isSingleplayerOwner(this.player.getGameProfile());
|
||||
}
|
||||
|
||||
@ -2084,7 +2084,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
// CraftBukkit start - fire PlayerKickEvent
|
||||
if (this.processedDisconnect) {
|
||||
return;
|
||||
@@ -457,7 +462,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -460,7 +465,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
Waitable waitable = new Waitable() {
|
||||
@Override
|
||||
protected Object evaluate() {
|
||||
@ -2093,7 +2093,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -474,9 +479,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -477,9 +482,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2105,7 +2105,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -488,7 +493,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -491,7 +496,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
|
||||
@ -2114,7 +2114,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
// CraftBukkit end
|
||||
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
|
||||
@@ -1785,9 +1790,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1788,9 +1793,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
*/
|
||||
|
||||
this.player.disconnect();
|
||||
@ -2129,7 +2129,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.player.getTextFilter().leave();
|
||||
@@ -1877,7 +1884,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1880,7 +1887,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (this.verifyChatMessage(playerchatmessage)) {
|
||||
this.chatMessageChain.append(() -> {
|
||||
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent().plain());
|
||||
@ -2138,7 +2138,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
|
||||
return CompletableFuture.allOf(completablefuture, completablefuture1).thenAcceptAsync((ovoid) -> {
|
||||
FilterMask filtermask = ((FilteredText) completablefuture.join()).mask();
|
||||
@@ -2039,7 +2046,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2042,7 +2049,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
|
||||
@ -2152,7 +2152,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
Player player = this.getCraftPlayer();
|
||||
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
||||
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
|
||||
@@ -2172,9 +2184,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2175,9 +2187,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private ChatMessageContent getSignedContent(ServerboundChatPacket packet) {
|
||||
@ -2167,7 +2167,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
}
|
||||
|
||||
private void broadcastChatMessage(PlayerChatMessage message) {
|
||||
@@ -2277,14 +2292,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2280,14 +2295,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
private CompletableFuture<Component> queryChatPreview(String query) {
|
||||
MutableComponent ichatmutablecomponent = Component.literal(query);
|
||||
@ -2189,7 +2189,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
}
|
||||
|
||||
private CompletableFuture<Component> queryCommandPreview(String query) {
|
||||
@@ -2293,7 +2311,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2296,7 +2314,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
CompletableFuture<Component> completablefuture = this.getPreviewedArgument(commandlistenerwrapper, PreviewableCommand.of(parseresults));
|
||||
|
||||
completablefuture.thenAcceptAsync((ichatbasecomponent) -> {
|
||||
@ -2198,7 +2198,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f
|
||||
}, this.server);
|
||||
return completablefuture;
|
||||
}
|
||||
@@ -3084,30 +3102,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3092,30 +3110,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2549,7 +2549,7 @@ index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c18
|
||||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5550dbea555a99ee1612609093292db79a625c94..e4f8ccb45a16c35b5256e209435840609d527695 100644
|
||||
index 4dd952faac05f553b28d1252296b0587369865f4..6139a06453e370865889f47644a6840fce2934f2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -592,8 +592,10 @@ public final class CraftServer implements Server {
|
||||
|
@ -729,7 +729,7 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
|
||||
} catch (Exception exception) {
|
||||
if (listener.shouldPropagateHandlingExceptions()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b9a6533afbfe07ff544f9f03f3c254890ee2e068..56fc44274be4592107a89598c7d140b034a18b44 100644
|
||||
index e4220f14a5ebf43dd3491fc8649c2be5238c5798..53be6189d3fa6a65a09996683913fbbf5133dcb7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -177,7 +177,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
|
||||
@ -1146,7 +1146,7 @@ index 186a8f5895fedbaf27a7949d9bdbb1a9f2e36fbf..86acdd910eebb8beac4536942119c9e9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 95c3273d2379509cf6cd51a718f18b8697908932..1d4d60fa861b5e819c59f06168a096688d06e656 100644
|
||||
index a60af68365b4cb0e09061e1956d2ae6790659bc0..28669f2e9c4a49322fe44c730b2ed145c9c61273 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@ -1262,10 +1262,10 @@ index 95c3273d2379509cf6cd51a718f18b8697908932..1d4d60fa861b5e819c59f06168a09668
|
||||
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 b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e90946a04b3a 100644
|
||||
index a258c965a4a0352f9d77def6748b176f3bdab106..cdc24defe649644ceade1c6cfcfe20c29ca936c1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -339,7 +339,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -342,7 +342,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -1273,7 +1273,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -420,7 +419,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -423,7 +422,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909
|
||||
|
||||
this.chatPreviewThrottler.tick();
|
||||
}
|
||||
@@ -2146,7 +2144,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2149,7 +2147,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -1290,7 +1290,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2156,7 +2154,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2159,7 +2157,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -1299,7 +1299,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2169,7 +2167,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2172,7 +2170,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 {
|
||||
@ -1634,7 +1634,7 @@ index 98ba88896c73651591b8ad8e070868fb443ae999..864e2e0355a5fb8c1d4a5b0896ba299f
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 82199864f2046528358af08d4aa4a283fa3e7ffd..5badb27d2060b0b13c54f8945848afbeb775fc6c 100644
|
||||
index 295318717fc603b3adc58fbda39bd65e97462b88..eb5c7e15366ee5902d8c754a1e9daec50d26fb17 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2379,12 +2379,31 @@ public final class CraftServer implements Server {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 56fc44274be4592107a89598c7d140b034a18b44..97e2cbd5fa724ba5ba3f33ac1ce3da2e3e881eb8 100644
|
||||
index 53be6189d3fa6a65a09996683913fbbf5133dcb7..e6acf596c2c62134e8d2e499d273aa326f792451 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1416,7 +1416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1432,7 +1432,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
@ -19,7 +19,7 @@ index 56fc44274be4592107a89598c7d140b034a18b44..97e2cbd5fa724ba5ba3f33ac1ce3da2e
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 45c51529c9f94dfbd575ca94acd3c025bdb909e9..df74d459809da72c55dd93c299dd2b414fb64dea 100644
|
||||
index 37fefdf0d96cd2b6e23b6e69ee5a8db16f0e51da..fc22de3e1bb4e01fc2c43ffd9ecd0a8cd6d40ba5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -246,7 +246,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
@ -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 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720740d8662 100644
|
||||
index cdc24defe649644ceade1c6cfcfe20c29ca936c1..4fe65f979e8c3c15aea2211035745a71aef0feeb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2023,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2026,7 +2026,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720
|
||||
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
|
||||
@@ -2043,7 +2043,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
OutgoingPlayerChatMessage outgoing = OutgoingPlayerChatMessage.create(original);
|
||||
|
||||
@ -42,7 +42,7 @@ index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720
|
||||
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
|
||||
@@ -2146,7 +2146,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720
|
||||
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 bd17e22c6cb3176da054bce3699c278b2354f193..b61a98f2711c8aeca65e6e782c07ace05c56fbe8 100644
|
||||
index 56efe95512c851b965f2295d5eac7bc0c67bdb1f..1c6577bbbc005131661cbb4667cff6494b8fe5e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -863,6 +863,28 @@ public final class CraftServer implements Server {
|
||||
|
@ -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 6ce257fca3a3645fdb68f877279bcae343dbd548..2e9aa7bcdaf86165190d16098d7f6363bfa2f837 100644
|
||||
index 4fe65f979e8c3c15aea2211035745a71aef0feeb..bcd95c61ba98604552c3269e974e27b88658f38e 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
|
||||
@@ -1756,8 +1756,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,7 +23,7 @@ index 6ce257fca3a3645fdb68f877279bcae343dbd548..2e9aa7bcdaf86165190d16098d7f6363
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3794d05b17378ebf517199adbbfd54a395ef6b37..b85ca8bded5157adad810b9a50ca0fe377597c93 100644
|
||||
index d91f69639724aeeb4264f86cf8f76edc22567649..6ae934c6c7c50dd38ff2e762fddfe650e97aa4ae 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;
|
||||
|
@ -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 405e7a4b959bf288d6740ca6a789af4a137a2d8b..0c2cb67a037c40ac1abef36ce315c56b58370987 100644
|
||||
index bcd95c61ba98604552c3269e974e27b88658f38e..33237c6a9f8885abdd5379d17be2b71ad7c2204e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2627,8 +2627,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2635,8 +2635,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0dffb6e8d6f4edfb4dfaa6b24e81d72356446ebc..b3834c86eb79400c8cef60daa03c90a66b03b688 100644
|
||||
index a6c184d450e08737e0053f7526de2ab6e20c454b..c667f8b115ad77ca3d3f908d69915d60d950ffe5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -181,6 +181,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -25,7 +25,7 @@ index 0dffb6e8d6f4edfb4dfaa6b24e81d72356446ebc..b3834c86eb79400c8cef60daa03c90a6
|
||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2281,9 +2283,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2297,9 +2299,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -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 6d09bd67753a16effb80224bb4c970f7bf3aeb9a..d3d141d18d9e66bc04e4c1af38b44bdd41e8d416 100644
|
||||
index 33237c6a9f8885abdd5379d17be2b71ad7c2204e..cea1e100fb0cc7fe4768d1b5de518019fd69b2f8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1601,13 +1601,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1604,13 +1604,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// Spigot start - limit place/interactions
|
||||
private int limitedPackets;
|
||||
private long lastLimitedPacket = -1;
|
||||
|
@ -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 d3d141d18d9e66bc04e4c1af38b44bdd41e8d416..aea8d2376e88a327985f7f5d34e355cd9090941e 100644
|
||||
index cea1e100fb0cc7fe4768d1b5de518019fd69b2f8..952ad96c310b8d1285e1dd07ec224d5005d5c8cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -358,7 +358,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) {
|
||||
if (++this.aboveGroundTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
||||
@ -17,7 +17,7 @@ index d3d141d18d9e66bc04e4c1af38b44bdd41e8d416..aea8d2376e88a327985f7f5d34e355cd
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -374,7 +374,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -377,7 +377,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());
|
||||
|
@ -19,10 +19,10 @@ index 5b568d8f3f2e8bd466ac1edae9cafc602a226175..69dc4063ae0a3e7271ce0e4ca79c0b05
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a991d961145c6b86df482dbf029bc8e1d3c9e209..6e041f695f060ca79dcc26d56273afcf79d725f5 100644
|
||||
index 952ad96c310b8d1285e1dd07ec224d5005d5c8cc..2b54fe257db874cb74a9bd002de8721d47409e6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3266,7 +3266,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3274,7 +3274,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
||||
|
@ -30,11 +30,11 @@ will have plugins and worlds saving to the disk has a high potential to result
|
||||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f3f528cc7f07da69c45e4290de098c0443c7a952..41928abfffbf6102e92cb45532e691b35a603a31 100644
|
||||
index 8c9bc0995f5b59e05a4ecebbe2bfb5d65ec92dcf..81e54058bc5e034b076e2bad1115c53950b3b39b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -221,6 +221,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final Map<ResourceKey<Level>, ServerLevel> levels;
|
||||
private Map<ResourceKey<Level>, ServerLevel> levels;
|
||||
private PlayerList playerList;
|
||||
private volatile boolean running;
|
||||
+ private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
@ -64,7 +64,7 @@ index f3f528cc7f07da69c45e4290de098c0443c7a952..41928abfffbf6102e92cb45532e691b3
|
||||
if (flag) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 23687ae4a06be741a82cec1178d891aed4640084..03a19b3869eea9a59f4003a81ab488603347cd4a 100644
|
||||
index aadeb9c63436214d541c563179ed7a32bfdd6d88..dee794f1128309c87d02b1a6a19cf9db314994e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1152,8 +1152,15 @@ public abstract class PlayerList {
|
||||
|
@ -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 6e041f695f060ca79dcc26d56273afcf79d725f5..b3bdff6de8ad38bdb75b19a7dc70888234a39153 100644
|
||||
index 2b54fe257db874cb74a9bd002de8721d47409e6a..c06fbadc3960a31b376f814ad050f34954728762 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2452,6 +2452,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2455,6 +2455,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
|
@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2b1a80c1f6825f1b14babaa788fd0350a6f564c9..ea969d79fc3ee4a186a62e226fecb4e59d0e025c 100644
|
||||
index 81e54058bc5e034b076e2bad1115c53950b3b39b..f4effe6f006df5209cd130f42ff1cd207547bbc5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -156,7 +156,7 @@ import org.slf4j.Logger;
|
||||
@ -161,7 +161,7 @@ index 2b1a80c1f6825f1b14babaa788fd0350a6f564c9..ea969d79fc3ee4a186a62e226fecb4e5
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1554,7 +1558,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1570,7 +1574,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
@ -236,7 +236,7 @@ index dee794f1128309c87d02b1a6a19cf9db314994e3..73cf0363ebbe383348f8bcc79a85dcfa
|
||||
|
||||
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 593b998592cc340f8ff1f8806394fea7e0871cf0..4d15fb22c0b12ec438584c672c03a41ea50c4133 100644
|
||||
index 6109763453327f49a15c677a3af8f2de959b58cc..8da0beff6a7937130ecd99dd46880da0d4a16a1a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -45,7 +45,6 @@ import java.util.logging.Level;
|
||||
|
@ -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 bdef09be892bf2675f713e1f8babada7019c0781..60dfaa3d1f873cb6c01fd736e78dde6a9b5c148e 100644
|
||||
index c06fbadc3960a31b376f814ad050f34954728762..9eb204ba4df5064fcca40c9445a5fc6a10d1b3aa 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1283,7 +1283,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1286,7 +1286,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
boolean flag = d8 > 0.0D;
|
||||
|
||||
if (this.player.isOnGround() && !packet.isOnGround() && flag) {
|
||||
|
@ -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 796c40afe5e9853bba2c23dbd2136e969c78f7cd..11b409b97529afe837a63620807958dbf602cf4e 100644
|
||||
index 9eb204ba4df5064fcca40c9445a5fc6a10d1b3aa..96091153862433ffe2fdc90c00f1cc6be02e8977 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3225,14 +3225,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3233,14 +3233,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
||||
|
@ -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 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a653717d0a18a 100644
|
||||
index 96091153862433ffe2fdc90c00f1cc6be02e8977..90b09d4fcb267dff4ab3c910948876a4408abcd1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -253,7 +253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -256,7 +256,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public ServerPlayer player;
|
||||
private int tickCount;
|
||||
private int ackBlockChangesUpTo = -1;
|
||||
@ -29,7 +29,7 @@ index 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a6537
|
||||
private boolean keepAlivePending;
|
||||
private long keepAliveChallenge;
|
||||
// CraftBukkit start - multithreaded fields
|
||||
@@ -290,6 +290,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -293,6 +293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private final SignedMessageChain.Decoder signedMessageDecoder;
|
||||
private final LastSeenMessagesValidator lastSeenMessagesValidator;
|
||||
private final FutureChain chatMessageChain;
|
||||
@ -37,7 +37,7 @@ index 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a6537
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -388,18 +389,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -391,18 +392,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
this.server.getProfiler().push("keepAlive");
|
||||
|
@ -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 0ad2e5102df956040715ed77bfa0eb41663b23bc..a9c52b6759aa1f17ecc4c365892c48d8e80c3fe3 100644
|
||||
index 90b09d4fcb267dff4ab3c910948876a4408abcd1..d5861e01f7bc18a95f9287128aa829a28780e8c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -781,27 +781,58 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -784,27 +784,58 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ index 0ad2e5102df956040715ed77bfa0eb41663b23bc..a9c52b6759aa1f17ecc4c365892c48d8
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index adb3c54932a90c4881e6db0ed037d033220e9a7e..be5982fea6f354131e4562e2a109b4c56c77bcd9 100644
|
||||
index 90d88637b5690524d1899541abbb310d330d0e50..565ae5e0dc0db9aaf694003cb30e9af3ff6fc78d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2086,7 +2086,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -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 a9c52b6759aa1f17ecc4c365892c48d8e80c3fe3..9e0905b5cd2648f606276fa4408301e08aa0bc62 100644
|
||||
index d5861e01f7bc18a95f9287128aa829a28780e8c4..727350fb397e9be2917fa383dc6b8abeb15670e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3239,9 +3239,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3247,9 +3247,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
FilteredText filteredtext = (FilteredText) signText.get(i);
|
||||
|
||||
if (this.player.isTextFilteringEnabled()) {
|
||||
|
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3d3926a14229d922fb7b7e76c9babb031bf7d9ab..5029436157fe7279a2a583f06b7d02a0413d2178 100644
|
||||
index 0b1676f71e8da09af3cc0db1c6c17059a6bcf60c..45038c25904d919e0b69deaecdc09272df05bab4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1159,7 +1159,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -75,10 +75,10 @@ index 4eb69b62b4c3f568cad83fdc4b19cbde2c588be7..35a6dd9cfed631f66e31c71911433ec8
|
||||
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 9e0905b5cd2648f606276fa4408301e08aa0bc62..6f5ee7d4645eb5f5d3235c8b6fe8da476aa371e4 100644
|
||||
index 727350fb397e9be2917fa383dc6b8abeb15670e7..f7552186d8a5144c23d495bdc6a450e55d8f40d1 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;
|
||||
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.event.inventory.CraftItemEvent;
|
||||
import org.bukkit.event.inventory.InventoryAction;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
@ -86,7 +86,7 @@ index 9e0905b5cd2648f606276fa4408301e08aa0bc62..6f5ee7d4645eb5f5d3235c8b6fe8da47
|
||||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.inventory.SmithItemEvent;
|
||||
@@ -2765,10 +2766,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2773,10 +2774,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
@ -173,7 +173,7 @@ 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 751aa3bb55bdd52b3b7e356e5922f21bb4981ad7..21aedf1536b5b4a87fc952ea174a7be41fcde522 100644
|
||||
index 7234e96d6d956d84fbcbcb321c1fb05906da6adb..69c3602abfddc9c065736cf08c32f88029df0e5c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1079,7 +1079,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -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 6f5ee7d4645eb5f5d3235c8b6fe8da476aa371e4..bc4a9c972c04114f1dc37d1789fccd2e05d46d58 100644
|
||||
index f7552186d8a5144c23d495bdc6a450e55d8f40d1..abd3899c41c8c8be53cab04d946d15e621369d9a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2650,6 +2650,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2658,6 +2658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
@ -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 2d3d616b32caa23455aa94d162eb39e8bf617215..f31242fdfe6d3a643804da9bf8387f834f494f42 100644
|
||||
index abd3899c41c8c8be53cab04d946d15e621369d9a..0bac1fa4637d7132871b8f57b0431724bc9aa8c1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -259,6 +259,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -262,6 +262,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 2d3d616b32caa23455aa94d162eb39e8bf617215..f31242fdfe6d3a643804da9bf8387f83
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -413,6 +414,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -416,6 +417,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 2d3d616b32caa23455aa94d162eb39e8bf617215..f31242fdfe6d3a643804da9bf8387f83
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -790,7 +792,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -793,7 +795,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
|
||||
|
@ -2278,7 +2278,7 @@ index 97b29bcb20e199c2d02457f8025e67e2d4a925fc..8fda43173012ed3134ed1f114143ceaa
|
||||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, config.get(), ops.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7e57eb82dfb069e765f3d77991e4c54ccc0a3053..f147d68767dc92158c4163d5d67c8acddbc55db8 100644
|
||||
index 78f7f5603f6949c6aa92726d99e93ebdfea2b637..802b7767dd0878cf6d2e52bea74d5664f7d0664f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -956,7 +956,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -2716,7 +2716,7 @@ index a81644df294c739b72fc638cd06a3976250caa50..d66ec02b09bb7ae46aae8e55f0062613
|
||||
} finally {
|
||||
chunkMap.callbackExecutor.run();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index cfaa5a5df9ae2fb0147d66b41de91e6b771b769c..293657617c32acfe70b0ab98939135e5ac6dae28 100644
|
||||
index 6e804d560b44d8bfd0b184632e49d52fdb7879fb..02d4211b9c3a485ac23cce199d7edc7e4d445067 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -317,6 +317,78 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -2820,10 +2820,10 @@ index 0d536d72ac918fbd403397ff369d10143ee9c204..be677d437d17b74c6188ce1bd5fc6fdc
|
||||
private final String name;
|
||||
private final Comparator<T> comparator;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f31242fdfe6d3a643804da9bf8387f834f494f42..3ec50cc71758d0178dfb9a9b70e8fc9050d530f3 100644
|
||||
index 0bac1fa4637d7132871b8f57b0431724bc9aa8c1..d991354d65305ab7d02666f7c3362e4136c3f6af 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -796,6 +796,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -799,6 +799,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper
|
||||
return;
|
||||
}
|
||||
|
@ -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 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc03199d5e6 100644
|
||||
index d991354d65305ab7d02666f7c3362e4136c3f6af..5beba7d1ba44bde3d9cefccc80b6b8795a47b945 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -568,9 +568,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -571,9 +571,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
double d0 = entity.getX();
|
||||
double d1 = entity.getY();
|
||||
double d2 = entity.getZ();
|
||||
@ -22,7 +22,7 @@ index 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc0
|
||||
float f = Mth.wrapDegrees(packet.getYRot());
|
||||
float f1 = Mth.wrapDegrees(packet.getXRot());
|
||||
double d6 = d3 - this.vehicleFirstGoodX;
|
||||
@@ -605,6 +605,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -608,6 +608,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 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc0
|
||||
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});
|
||||
@@ -1254,9 +1264,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1257,9 +1267,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.allowedPlayerTicks = 20; // CraftBukkit
|
||||
} else {
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
@ -52,7 +52,7 @@ index 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc0
|
||||
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
|
||||
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
|
||||
|
||||
@@ -1312,6 +1322,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1315,6 +1325,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
} else {
|
||||
speed = this.player.getAbilities().walkingSpeed * 10f;
|
||||
}
|
||||
|
@ -59,10 +59,10 @@ index 53717a4a2bfd841346c00b5f854899e23661122c..3fadf6b46cc722ad81cf810c0761cf71
|
||||
|
||||
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 475b2165ae56b76a02b80c95b68fdbc03199d5e6..ef180347fc39b2b6b8665284d967103c26aaddbd 100644
|
||||
index 5beba7d1ba44bde3d9cefccc80b6b8795a47b945..e107aa00f51430a38e190be6d8b1ccba70a3c055 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1672,6 +1672,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1675,6 +1675,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
case START_DESTROY_BLOCK:
|
||||
case ABORT_DESTROY_BLOCK:
|
||||
case STOP_DESTROY_BLOCK:
|
||||
|
@ -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 ef180347fc39b2b6b8665284d967103c26aaddbd..19924f3d45af6c4006bd2d921cbeab67a4846059 100644
|
||||
index e107aa00f51430a38e190be6d8b1ccba70a3c055..c1270536fc3566454c98419f4bddc0b3b684d63b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1121,6 +1121,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1124,6 +1124,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||
|
@ -106,10 +106,10 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d
|
||||
|
||||
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 19924f3d45af6c4006bd2d921cbeab67a4846059..81c6dd957eb990708fd5f6a1b991a5e8370acf80 100644
|
||||
index c1270536fc3566454c98419f4bddc0b3b684d63b..1454d5c070bb004d75523d69eaa3d0d382944198 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -833,8 +833,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -836,8 +836,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) -> {
|
||||
@ -124,7 +124,7 @@ index 19924f3d45af6c4006bd2d921cbeab67a4846059..81c6dd957eb990708fd5f6a1b991a5e8
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -849,7 +853,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -852,7 +856,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
|
||||
}
|
||||
});
|
||||
|
@ -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 81c6dd957eb990708fd5f6a1b991a5e8370acf80..933d74f48dfedc15eec76b4e376e51c40bc4bea5 100644
|
||||
index 1454d5c070bb004d75523d69eaa3d0d382944198..db3b208e560ae2c8a59bfb474f7b2266d108068f 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
|
||||
@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private final LastSeenMessagesValidator lastSeenMessagesValidator;
|
||||
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 81c6dd957eb990708fd5f6a1b991a5e8370acf80..933d74f48dfedc15eec76b4e376e51c4
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -3286,7 +3287,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3294,7 +3295,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
||||
|
@ -22,22 +22,22 @@ 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 933d74f48dfedc15eec76b4e376e51c40bc4bea5..90af6b5e7f6188eec4a4e311a0d273857d3d1c5c 100644
|
||||
index db3b208e560ae2c8a59bfb474f7b2266d108068f..75cd936e28c3c933c53513093634a9d071a7f94b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2727,7 +2727,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2730,7 +2730,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
|
||||
- ServerGamePacketListenerImpl.this.send(new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true));
|
||||
+ // Paper start - update entity for all players
|
||||
+ ClientboundSetEntityDataPacket packet1 = new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true);
|
||||
+ ClientboundSetEntityDataPacket entityDataPacket = new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true);
|
||||
+ if (entity.tracker != null) {
|
||||
+ entity.tracker.broadcast(packet1);
|
||||
+ entity.tracker.broadcast(entityDataPacket);
|
||||
+ } else {
|
||||
+ ServerGamePacketListenerImpl.this.send(packet1);
|
||||
+ ServerGamePacketListenerImpl.this.send(entityDataPacket);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
// SPIGOT-7136 - Allays
|
||||
if (entity instanceof Allay) {
|
||||
ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
|
||||
|
@ -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 90af6b5e7f6188eec4a4e311a0d273857d3d1c5c..db079ad6516eba21915713be4d99f9566da47945 100644
|
||||
index 75cd936e28c3c933c53513093634a9d071a7f94b..0b31a2e2d3bde184c9e1ef9d4ff08e94da0a6960 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -516,7 +516,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -519,7 +519,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
Objects.requireNonNull(this.connection);
|
||||
// CraftBukkit - Don't wait
|
||||
|
@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
|
||||
synchronously when the server gets shut down.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8c48544daae0f18a39511df12f7066fc0e383d2c..49fe89baab93ae99a990684d78c5c05a223282c1 100644
|
||||
index 1d554a45097cdf0640788bb796b983f18af31a9f..f7d7e69e29f217c233869951d7d3188816f8216c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2311,7 +2311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2327,7 +2327,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isSameThread() {
|
||||
@ -29,7 +29,7 @@ index 8c48544daae0f18a39511df12f7066fc0e383d2c..49fe89baab93ae99a990684d78c5c05a
|
||||
|
||||
public boolean isDebugging() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f8640a3a147322d99dc23a28de0a77692205ff75..0cc0435e53379208cc9c5f25ca185a26bd595caa 100644
|
||||
index fec355dfc7e6353759276f82e6677fd9607e6e7c..2d6f8032cd5a5e7542a4a1cd791852873c93657e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2075,7 +2075,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -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 db079ad6516eba21915713be4d99f9566da47945..8138fbe3f991451134a179f3b0256f7d088375b8 100644
|
||||
index 0b31a2e2d3bde184c9e1ef9d4ff08e94da0a6960..9d3a88ed093c5eda7a11133ebc97226c544fbd18 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3331,6 +3331,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3339,6 +3339,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());
|
||||
|
@ -7,10 +7,10 @@ Fixes an AssertionError when setting the player's item in hand to null or a new
|
||||
Fixes GH-2718
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8138fbe3f991451134a179f3b0256f7d088375b8..84a1c8d7750a0a33c5f1338d0784e076ed223dac 100644
|
||||
index 9d3a88ed093c5eda7a11133ebc97226c544fbd18..0df93b204ddf55a2a3b8af33d6a3273697eea91e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1867,6 +1867,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1870,6 +1870,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ index 6a00f3d38da8107825ab1d405f337fd077b09f72..d31b5ed47cffc61c90c926a0cd2005b7
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 181e35da5919ba3b91246b427f2c5773acf1dd12..0612bf8ecc6e1b76d728fea852e850abc1702edf 100644
|
||||
index 27f19abc22e295a5480dbed5df86f5d885ad3b73..12ca13f5b0556c53fd36d638ee4fa854b89ee8ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -237,6 +237,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -153,7 +153,7 @@ index 181e35da5919ba3b91246b427f2c5773acf1dd12..0612bf8ecc6e1b76d728fea852e850ab
|
||||
this.frameTimer.logFrameDuration(i1 - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2523,4 +2534,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2539,4 +2550,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
@ -185,7 +185,7 @@ index 181e35da5919ba3b91246b427f2c5773acf1dd12..0612bf8ecc6e1b76d728fea852e850ab
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3a183c9c85439d9595cc5667743cd7f41cc8c727..051853707609fc026ab49fcd4a5a3798cdbed94a 100644
|
||||
index 8cc2a35486e8c6433e722ddc5e776c3332e7c7fe..a6f40cba559a4ca8c91b4daca0867f3be9cc94e6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2485,6 +2485,16 @@ public final class CraftServer implements Server {
|
||||
|
@ -71,7 +71,7 @@ index 336795dff742b7c6957fbd3476aff31d25a5e659..30a58229aa6dac5039511d0c0df5f291
|
||||
cause = cause.getCause();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0612bf8ecc6e1b76d728fea852e850abc1702edf..40945909bbefa59da6be784bcf440dfb2075b670 100644
|
||||
index 12ca13f5b0556c53fd36d638ee4fa854b89ee8ec..3a4222f78a02e10ecccc03df3c580895fbb8059d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -219,7 +219,7 @@ index 0612bf8ecc6e1b76d728fea852e850abc1702edf..40945909bbefa59da6be784bcf440dfb
|
||||
throw new RuntimeException("Error generating crash report", t);
|
||||
}
|
||||
// Spigot End
|
||||
@@ -1927,7 +1981,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1943,7 +1997,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(dataPacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
@ -330,7 +330,7 @@ index 5f65aa89dfb21fced457a3a9fef6ba05385b6b76..291bcca206722c86bca6d13058d18c41
|
||||
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/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fc1ed21c74b12b77544455e3c04453e71409c2c2..bfd785af2d459061054a101def1a6c6bfd9cdda1 100644
|
||||
index a35501ea43bf3589b346b1e684c318b44ca57977..4016b31bd020e00c0e79328646f9b5411b312e88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2075,7 +2075,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -37,10 +37,10 @@ index be677d437d17b74c6188ce1bd5fc6fdc228fd92f..78fbb4c3e52e900956ae0811aaf934c8
|
||||
public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1);
|
||||
public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 84a1c8d7750a0a33c5f1338d0784e076ed223dac..dc75a945a747e6140a5227819e4bb180f4ccb0c8 100644
|
||||
index 0df93b204ddf55a2a3b8af33d6a3273697eea91e..cadc14777f6a978d4a58bbaf1b606a53c28b2c08 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -251,6 +251,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -254,6 +254,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private static final int PENDING_MESSAGE_DISCONNECT_THRESHOLD = 4096;
|
||||
public final Connection connection;
|
||||
private final MinecraftServer server;
|
||||
@ -48,7 +48,7 @@ index 84a1c8d7750a0a33c5f1338d0784e076ed223dac..dc75a945a747e6140a5227819e4bb180
|
||||
public ServerPlayer player;
|
||||
private int tickCount;
|
||||
private int ackBlockChangesUpTo = -1;
|
||||
@@ -343,6 +344,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -346,6 +347,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -64,7 +64,7 @@ index 84a1c8d7750a0a33c5f1338d0784e076ed223dac..dc75a945a747e6140a5227819e4bb180
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -389,7 +399,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -392,7 +402,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.lastVehicle = null;
|
||||
this.clientVehicleIsFloating = false;
|
||||
this.aboveGroundVehicleTickCount = 0;
|
||||
|
@ -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 dc75a945a747e6140a5227819e4bb180f4ccb0c8..479365c3b632e74f693b3d3da46e8f1c6eae055e 100644
|
||||
index cadc14777f6a978d4a58bbaf1b606a53c28b2c08..7b6dedcf405e3f9ff85ebe8702ab6459385c5ff9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -970,7 +970,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -973,7 +973,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handlePickItem(ServerboundPickItemPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
|
@ -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 479365c3b632e74f693b3d3da46e8f1c6eae055e..d8517a11187baddb82c56045d34c4e9db05826be 100644
|
||||
index 7b6dedcf405e3f9ff85ebe8702ab6459385c5ff9..0bfd835a22b8bc353878f3f9b04564d6f3049279 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1635,6 +1635,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1638,6 +1638,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
||||
|
@ -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 d8517a11187baddb82c56045d34c4e9db05826be..870935874baa29edd1c641869c5f6a22155f2e8f 100644
|
||||
index 0bfd835a22b8bc353878f3f9b04564d6f3049279..a8014da4583bac40deecd439bb59287bf1de56f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1449,6 +1449,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1452,6 +1452,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
|
||||
|
@ -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 870935874baa29edd1c641869c5f6a22155f2e8f..237bf7e97dc89a551feb28914317344207a28e13 100644
|
||||
index a8014da4583bac40deecd439bb59287bf1de56f4..74df19cb16ea840f8d5d5354906f16757d5fe56d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3228,9 +3228,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3236,9 +3236,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 {
|
||||
|
@ -18,10 +18,10 @@ index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4
|
||||
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 237bf7e97dc89a551feb28914317344207a28e13..893b9557d742ad1d74a7f6a772c4f8f45a7172f6 100644
|
||||
index 74df19cb16ea840f8d5d5354906f16757d5fe56d..cf53c3cdbfd0a610aedee474c164f2d1ca5dacad 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -881,7 +881,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -884,7 +884,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 237bf7e97dc89a551feb28914317344207a28e13..893b9557d742ad1d74a7f6a772c4f8f4
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
||||
} else {
|
||||
BaseCommandBlock commandblocklistenerabstract = null;
|
||||
@@ -948,7 +948,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -951,7 +951,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"));
|
||||
|
@ -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 b6a05542a42b1f44b3a43fbcd333003e864e44ea..f2e6c5ed099a94be3aefca55cffd8e2447e39ac2 100644
|
||||
index 9c2589c7e0517f771b9ca06760273a0aecefb27d..7d2fee97f4d08eae245475c4b60c1a7ba46c840d 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
|
||||
@ -20,7 +20,7 @@ index b6a05542a42b1f44b3a43fbcd333003e864e44ea..f2e6c5ed099a94be3aefca55cffd8e24
|
||||
|
||||
this.forceTicks = false;
|
||||
// CraftBukkit end
|
||||
@@ -1694,11 +1694,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1710,11 +1710,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index b6a05542a42b1f44b3a43fbcd333003e864e44ea..f2e6c5ed099a94be3aefca55cffd8e24
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1712,7 +1715,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1728,7 +1731,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
@ -89,10 +89,10 @@ index 06e711aa9a0afedda48395ba2ee369bb211584da..28944fc50ea43a3ea40bd1e69c560c8f
|
||||
|
||||
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 893b9557d742ad1d74a7f6a772c4f8f45a7172f6..aea4c331c1bb0e84fc4743dbec539143755555d2 100644
|
||||
index cf53c3cdbfd0a610aedee474c164f2d1ca5dacad..4e8977ab293816fa5dee530eea63193dcc9162b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3498,7 +3498,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3506,7 +3506,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 893b9557d742ad1d74a7f6a772c4f8f45a7172f6..aea4c331c1bb0e84fc4743dbec539143
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fc7db6036a2c1b8f5b33a30e9604173dba63025b..979d0116e72417eec26193cd1e106dc9d27cdbe0 100644
|
||||
index be14033f3a16ab020916720c678f6c738f6c5f15..32fbc7ec5ebf58a46e20fb5c5aaa9c76481b96b4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -951,8 +951,8 @@ public final class CraftServer implements Server {
|
||||
|
@ -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 aea4c331c1bb0e84fc4743dbec539143755555d2..c489a3f2a0c62a15cd4de45dfc0e90245e1d9b25 100644
|
||||
index 4e8977ab293816fa5dee530eea63193dcc9162b9..40487804d50798a5bfd05754fb882d82a7b7a693 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
|
||||
@@ -299,6 +299,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 aea4c331c1bb0e84fc4743dbec539143755555d2..c489a3f2a0c62a15cd4de45dfc0e9024
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
this.lastSeenMessagesValidator = new LastSeenMessagesValidator();
|
||||
@@ -3453,6 +3455,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3461,6 +3463,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 aea4c331c1bb0e84fc4743dbec539143755555d2..c489a3f2a0c62a15cd4de45dfc0e9024
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
@@ -3480,6 +3484,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3488,6 +3492,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
try {
|
||||
byte[] data = new byte[packet.data.readableBytes()];
|
||||
packet.data.readBytes(data);
|
||||
@ -42,7 +42,7 @@ index aea4c331c1bb0e84fc4743dbec539143755555d2..c489a3f2a0c62a15cd4de45dfc0e9024
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -3489,6 +3502,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3497,6 +3510,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ index aea4c331c1bb0e84fc4743dbec539143755555d2..c489a3f2a0c62a15cd4de45dfc0e9024
|
||||
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 ac232efad56fd69577de8fa4ed47cb852c9a429e..03d43fdc119dc526928abf7b0f1b38d35e985ffc 100644
|
||||
index 8db930d54ad97435e367aa670466d8a072ca0b23..1ab74f26cf47372b89b74a077fe06e48f08581a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2691,6 +2691,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 36e0a9771705f02e67dd507f2c0c9a030f77c02a..f3d51b83acab0e10a1dd2c9ab7e64b0188a1a7f7 100644
|
||||
index 48650bc1c09b18f1b57d9828dfe27f51c74c4a75..dbe70160ac703e74613ac65bd62950a5cc951d4c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2016,6 +2016,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2032,6 +2032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
|
@ -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 c489a3f2a0c62a15cd4de45dfc0e90245e1d9b25..60afac8abc0ed87753b7341a388a4280dcda7a7f 100644
|
||||
index 40487804d50798a5bfd05754fb882d82a7b7a693..47f5a771c42c6a6e1c610913af1bf11c0dc2f660 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -763,7 +763,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -766,7 +766,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index c489a3f2a0c62a15cd4de45dfc0e90245e1d9b25..60afac8abc0ed87753b7341a388a4280
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1679,7 +1679,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1682,7 +1682,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f3d51b83acab0e10a1dd2c9ab7e64b0188a1a7f7..52a60c887753fce32f99adaee8b73077bde663e9 100644
|
||||
index dbe70160ac703e74613ac65bd62950a5cc951d4c..f02fc7d6d8d0aba84be5e85c8de0ccc0e5a01c78 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2082,13 +2082,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2098,13 +2098,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
||||
|
@ -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 60afac8abc0ed87753b7341a388a4280dcda7a7f..9b4d5d1745101b28048df16dabc5d983a65eb0bd 100644
|
||||
index 47f5a771c42c6a6e1c610913af1bf11c0dc2f660..a33334b45493c714b48439986b484256c03bdf8e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -578,9 +578,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -581,9 +581,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 60afac8abc0ed87753b7341a388a4280dcda7a7f..9b4d5d1745101b28048df16dabc5d983
|
||||
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
|
||||
@@ -590,8 +590,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -593,8 +593,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 60afac8abc0ed87753b7341a388a4280dcda7a7f..9b4d5d1745101b28048df16dabc5d983
|
||||
|
||||
// CraftBukkit start - handle custom speeds and skipped ticks
|
||||
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
|
||||
@@ -637,9 +648,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -640,9 +651,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
|
||||
|
||||
@ -57,7 +57,7 @@ index 60afac8abc0ed87753b7341a388a4280dcda7a7f..9b4d5d1745101b28048df16dabc5d983
|
||||
boolean flag1 = entity.verticalCollisionBelow;
|
||||
|
||||
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
@@ -1359,7 +1370,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1362,7 +1373,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 60afac8abc0ed87753b7341a388a4280dcda7a7f..9b4d5d1745101b28048df16dabc5d983
|
||||
|
||||
if (this.player.isSleeping()) {
|
||||
if (d11 > 1.0D) {
|
||||
@@ -1411,9 +1433,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1414,9 +1436,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
AABB axisalignedbb = this.player.getBoundingBox();
|
||||
|
||||
|
@ -37,10 +37,10 @@ index 6f2b52165c1935511790a429792d3754251537c8..9b4436bdb697d8350eac57282f8fad81
|
||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) {
|
||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile, publicKey);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9b4d5d1745101b28048df16dabc5d983a65eb0bd..b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8 100644
|
||||
index a33334b45493c714b48439986b484256c03bdf8e..cf490d9f622e7300c36aa4776987e328d151097d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -518,6 +518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -521,6 +521,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -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 b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8..25b44f5f83bf03fb6910b06c79f35ac10bf50e3a 100644
|
||||
index cf490d9f622e7300c36aa4776987e328d151097d..8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0 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
|
||||
@@ -264,6 +264,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 b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8..25b44f5f83bf03fb6910b06c79f35ac1
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -428,6 +429,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -431,6 +432,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 b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8..25b44f5f83bf03fb6910b06c79f35ac1
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -3247,6 +3249,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3255,6 +3257,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
|
@ -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 25b44f5f83bf03fb6910b06c79f35ac10bf50e3a..7db3c6502eb15192e876f5c766bf64c30f52e9c4 100644
|
||||
index 8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0..9da69a6e4d20e6b5f702f3a307239d789654de60 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1855,7 +1855,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1858,7 +1858,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 25b44f5f83bf03fb6910b06c79f35ac10bf50e3a..7db3c6502eb15192e876f5c766bf64c3
|
||||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2615,7 +2615,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2618,7 +2618,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));
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 52a60c887753fce32f99adaee8b73077bde663e9..e72af8f8c49dabcbe1d0a80176520ccdb55b1f5b 100644
|
||||
index f02fc7d6d8d0aba84be5e85c8de0ccc0e5a01c78..5c3b5cb0ffc3920da82b525bbc7a8963c981c595 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1978,7 +1978,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1994,7 +1994,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 52a60c887753fce32f99adaee8b73077bde663e9..e72af8f8c49dabcbe1d0a80176520ccd
|
||||
RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess();
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||
@@ -2004,6 +2010,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2020,6 +2026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(dataPacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
|
@ -193,10 +193,10 @@ index 0000000000000000000000000000000000000000..6f39e343147803e15e7681c993b8797a
|
||||
+public record RegistryKey<API extends Keyed, MINECRAFT>(Class<API> apiClass, ResourceKey<? extends Registry<MINECRAFT>> resourceKey) {
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e72af8f8c49dabcbe1d0a80176520ccdb55b1f5b..9484e447959a9c25ac6ef318be1569d236b5915d 100644
|
||||
index 5c3b5cb0ffc3920da82b525bbc7a8963c981c595..d60439d49de781b12af6fbe4ff89b7270f57cbeb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2010,6 +2010,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2026,6 +2026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(dataPacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
|
@ -282,10 +282,10 @@ index 0000000000000000000000000000000000000000..b4d0b7ecd56ab952319946854168c129
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 75cd5667eb0f047cdec56b4131dcd1c4f22d4067..af21aa771d90ea47cc23457711a17b69e7b56e9a 100644
|
||||
index abd1935ebc12f963b563023eb5279ad16ed1d8df..df570a64f1a8378f24977f0aa1e1f9b7191f0955 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1672,7 +1672,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1688,7 +1688,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
|
@ -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 7db3c6502eb15192e876f5c766bf64c30f52e9c4..9f233a68f4f0717edc7af4bc773fc7cdc9c29faf 100644
|
||||
index 9da69a6e4d20e6b5f702f3a307239d789654de60..d153bcdba1377ff89263840fcb7d0a99283583dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1847,7 +1847,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1850,7 +1850,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
int i = this.player.level.getMaxBuildHeight();
|
||||
|
||||
if (blockposition.getY() < i) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] forced whitelist: use configurable kick message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index af21aa771d90ea47cc23457711a17b69e7b56e9a..486acce909cdd2cacc5f2bb9eab1a600152f9971 100644
|
||||
index df570a64f1a8378f24977f0aa1e1f9b7191f0955..3c5b7f4b2db421d56e5832e283bd60702b2d67de 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2099,7 +2099,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2115,7 +2115,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||
|
@ -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 9f233a68f4f0717edc7af4bc773fc7cdc9c29faf..9b23e2caedea8ff851f91dc6da2b6443dba14da6 100644
|
||||
index d153bcdba1377ff89263840fcb7d0a99283583dc..3e32419d7038b2f87d81a1075039437f43b219c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1297,7 +1297,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1300,7 +1300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
itemstack.addTagElement("pages", nbttaglist);
|
||||
|
@ -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 9b23e2caedea8ff851f91dc6da2b6443dba14da6..26c707199cb3c87b3b56c28b2d4a1eaa8dd0b106 100644
|
||||
index 3e32419d7038b2f87d81a1075039437f43b219c4..2723bb42f3618fa57f3996b7880484d88afb552d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2056,6 +2056,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2059,6 +2059,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()) {
|
||||
|
@ -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 26c707199cb3c87b3b56c28b2d4a1eaa8dd0b106..9e3c6ff6b7db0c6add4fe76d20fdfaff88239660 100644
|
||||
index 2723bb42f3618fa57f3996b7880484d88afb552d..8dc4eac46bb7f127cb23d3994308d6ceb5dfedf5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2894,7 +2894,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2902,7 +2902,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
case PERFORM_RESPAWN:
|
||||
if (this.player.wonGame) {
|
||||
this.player.wonGame = false;
|
||||
|
@ -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 9e3c6ff6b7db0c6add4fe76d20fdfaff88239660..1811c6492d5fb5910b15b3d95506076245cd8b89 100644
|
||||
index 8dc4eac46bb7f127cb23d3994308d6ceb5dfedf5..1b6cad1fda904a1c76af508325c21c1db642e8ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2903,7 +2903,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2911,7 +2911,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
this.player = this.server.getPlayerList().respawn(this.player, false);
|
||||
if (this.server.isHardcore()) {
|
||||
@ -139,7 +139,7 @@ index 9e3c6ff6b7db0c6add4fe76d20fdfaff88239660..1811c6492d5fb5910b15b3d955060762
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8024b7bcc18a9b2298864d53230d54c23b9d1166..b7803148a96bdf69e1208105ee0ddecf6d9662f0 100644
|
||||
index 8608fbd5484498f0e478d857ea1dd548ad6a93e0..0004b78b63a2bf4b34467f9a550f6f0807e4dfb4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1396,7 +1396,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -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 1811c6492d5fb5910b15b3d95506076245cd8b89..f54a2fd855c0a901ee72258b7a315d0c1caf4ff0 100644
|
||||
index 1b6cad1fda904a1c76af508325c21c1db642e8ff..2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1833,6 +1833,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1836,6 +1836,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
ItemStack itemstack = this.player.getItemInHand(enumhand);
|
||||
BlockHitResult movingobjectpositionblock = packet.getHitResult();
|
||||
Vec3 vec3d = movingobjectpositionblock.getLocation();
|
||||
|
@ -5,10 +5,10 @@ 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 749421b638bbb5868a426888e42edc461ad0edf3..4f14a5d9b9b14727021fcb2491c15b9978f17f10 100644
|
||||
index 84e76fbe3eca77b112c9dff936e21cba1c83e5aa..98fe4165d291b47a39ce741884353c87dd0a4789 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2102,7 +2102,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2118,7 +2118,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||
@ -57,10 +57,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 f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0b92d5e55 100644
|
||||
index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789de7659e6 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
|
||||
@@ -375,7 +375,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) {
|
||||
if (++this.aboveGroundTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
||||
@ -69,7 +69,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -391,7 +391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -394,7 +394,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());
|
||||
@ -78,7 +78,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -413,7 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -416,7 +416,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
|
||||
@ -87,7 +87,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
} else {
|
||||
if (elapsedTime >= 15000L) { // 15 seconds
|
||||
@@ -443,7 +443,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -446,7 +446,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
|
||||
@ -96,7 +96,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
|
||||
this.chatPreviewThrottler.tick();
|
||||
@@ -467,16 +467,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -470,16 +470,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return this.server.isSingleplayerOwner(this.player.getGameProfile());
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
// Paper end
|
||||
// CraftBukkit start - fire PlayerKickEvent
|
||||
if (this.processedDisconnect) {
|
||||
@@ -505,7 +515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -508,7 +518,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
|
||||
|
||||
@ -135,7 +135,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -575,7 +585,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -578,7 +588,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())) {
|
||||
@ -144,7 +144,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
} else {
|
||||
Entity entity = this.player.getRootVehicle();
|
||||
|
||||
@@ -773,7 +783,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -776,7 +786,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (packet.getId() == this.awaitingTeleport) {
|
||||
if (this.awaitingPositionFromClient == null) {
|
||||
@ -153,7 +153,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -830,13 +840,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -833,13 +843,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
|
||||
@ -169,7 +169,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -989,7 +999,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -992,7 +1002,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());
|
||||
@ -178,7 +178,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed
|
||||
@@ -1176,7 +1186,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1179,7 +1189,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!");
|
||||
@ -187,7 +187,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
byteTotal += byteLength;
|
||||
@@ -1199,14 +1209,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1202,14 +1212,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());
|
||||
@ -204,7 +204,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
this.lastBookTick = MinecraftServer.currentTick;
|
||||
@@ -1330,7 +1340,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1333,7 +1343,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))) {
|
||||
@ -213,7 +213,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
} else {
|
||||
ServerLevel worldserver = this.player.getLevel();
|
||||
|
||||
@@ -1757,7 +1767,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1760,7 +1770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.dropCount++;
|
||||
if (this.dropCount >= 20) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
|
||||
@ -222,7 +222,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1965,7 +1975,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1968,7 +1978,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());
|
||||
@ -231,7 +231,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
// Paper start
|
||||
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()];
|
||||
@@ -2078,7 +2088,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2081,7 +2091,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());
|
||||
@ -240,7 +240,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2091,7 +2101,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2094,7 +2104,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
|
||||
@ -249,7 +249,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
} else {
|
||||
if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) {
|
||||
// this.server.submit(() -> { // CraftBukkit - async chat
|
||||
@@ -2119,7 +2129,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2122,7 +2132,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
||||
@ -258,7 +258,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
} else {
|
||||
if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) {
|
||||
this.server.submit(() -> {
|
||||
@@ -2205,7 +2215,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2208,7 +2218,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private boolean 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);
|
||||
@ -267,7 +267,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return false;
|
||||
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
||||
@@ -2464,7 +2474,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2467,7 +2477,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
if (!playerchatmessage.verify(chatsender)) {
|
||||
@ -276,7 +276,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2492,7 +2502,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2495,7 +2505,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
|
||||
@ -285,7 +285,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2595,7 +2605,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2598,7 +2608,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
private void handleValidationFailure(Set<LastSeenMessagesValidator.ErrorCondition> reasons) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(",")));
|
||||
@ -294,7 +294,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2742,7 +2752,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2745,7 +2755,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
if (i > 4096) {
|
||||
@ -303,7 +303,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2757,7 +2767,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2760,7 +2770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// Spigot Start
|
||||
if ( entity == this.player && !this.player.isSpectator() )
|
||||
{
|
||||
@ -312,7 +312,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
// Spigot End
|
||||
@@ -2850,7 +2860,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2858,7 +2868,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// CraftBukkit end
|
||||
} else {
|
||||
@ -321,7 +321,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
|
||||
}
|
||||
}
|
||||
@@ -3258,7 +3268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3266,7 +3276,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) {
|
||||
@ -330,7 +330,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3461,7 +3471,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3469,7 +3479,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(() -> {
|
||||
@ -339,7 +339,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
});
|
||||
// Paper end
|
||||
}
|
||||
@@ -3507,7 +3517,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3515,7 +3525,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
|
||||
@ -348,7 +348,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
} else if (packet.identifier.equals(CUSTOM_UNREGISTER)) {
|
||||
try {
|
||||
@@ -3517,7 +3527,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3525,7 +3535,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
|
||||
@ -357,7 +357,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
@@ -3535,7 +3545,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3543,7 +3553,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);
|
||||
@ -391,7 +391,7 @@ index 63f92d68b91f1049802a1541c7ec4efaa324ac11..c332750833cccee1264a3399ed0539f6
|
||||
// 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 b7803148a96bdf69e1208105ee0ddecf6d9662f0..bf5931cbcfbfdc6e68706b7e86b24b2478e4bbef 100644
|
||||
index 0004b78b63a2bf4b34467f9a550f6f0807e4dfb4..4750ac09f2abfb712b042028a95d23121ffc049f 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 {
|
||||
|
@ -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 1b1bf6fdc29a78b70eb39ce0770056a0b92d5e55..6fbba4cb8e3d00ea910c7d32b37b70df7f9cf133 100644
|
||||
index 32262185c3997c17f1b5b1847f768789de7659e6..c59cfe44536b62e1853903bd22990197b9d85083 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1216,7 +1216,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1219,7 +1219,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// Paper end
|
||||
// CraftBukkit start
|
||||
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
|
||||
|
@ -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 6fbba4cb8e3d00ea910c7d32b37b70df7f9cf133..dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec 100644
|
||||
index c59cfe44536b62e1853903bd22990197b9d85083..93dc44365bb3140a4b6989f1d520091c4b35e76e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2636,7 +2636,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2639,7 +2639,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
// Arm swing animation
|
||||
|
@ -17,10 +17,10 @@ index 9a60cf249e0b9f089b0966c670e6046e7e1ed08a..787f2b23352fbfb66a76ca5fce6de94c
|
||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1c39ca45b 100644
|
||||
index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef46404e782 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -525,7 +525,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -528,7 +528,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// Do not kick the player
|
||||
return;
|
||||
}
|
||||
@ -28,7 +28,7 @@ index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1
|
||||
// Send the possibly modified leave message
|
||||
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
|
||||
// CraftBukkit end
|
||||
@@ -534,7 +533,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -537,7 +536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
|
||||
this.connection.disconnect(ichatbasecomponent);
|
||||
}));
|
||||
@ -37,7 +37,7 @@ index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1
|
||||
this.connection.setReadOnly();
|
||||
MinecraftServer minecraftserver = this.server;
|
||||
Connection networkmanager = this.connection;
|
||||
@@ -2000,6 +1999,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2003,6 +2002,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void onDisconnect(Component reason) {
|
||||
@ -49,7 +49,7 @@ index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1
|
||||
// CraftBukkit start - Rarely it would send a disconnect line twice
|
||||
if (this.processedDisconnect) {
|
||||
return;
|
||||
@@ -2016,7 +2020,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2019,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
this.player.disconnect();
|
||||
// Paper start - Adventure
|
||||
|
@ -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 ab956e3bb44374cf8a3792eeadb1ffb1c39ca45b..f9e1057401857ccc48f4655a64f9065dc9d93d5a 100644
|
||||
index e1b3045d4fa6f69e9d70279980ab7ef46404e782..6a20b0265b278593c87f61206785090b9392f6d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -441,7 +441,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -444,7 +444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
--this.dropSpamTickCount;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ index 23e564b05ba438924180c91f9b19a60731eedd1b..5ec241d49ff5e3a161a39006f05823a5
|
||||
|
||||
private MinecraftTimings() {}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4f14a5d9b9b14727021fcb2491c15b9978f17f10..2d94390e3b9fa3afd2471cc691d59de0f470b46c 100644
|
||||
index 98fe4165d291b47a39ce741884353c87dd0a4789..99073ea2757cd1c15b098d7cfaf8681702f04a19 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1304,6 +1304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -30,7 +30,7 @@ index 4f14a5d9b9b14727021fcb2491c15b9978f17f10..2d94390e3b9fa3afd2471cc691d59de0
|
||||
return true;
|
||||
} else {
|
||||
if (this.haveTime()) {
|
||||
@@ -2659,4 +2660,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2675,4 +2676,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
@ -126,7 +126,7 @@ index 438406936633b9c67d21b26527c3d1654118c744..2de322ffc2eedae9efe39f9b771c447d
|
||||
}
|
||||
// Paper start - optimise chunk tick iteration
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 306e40f7fa6435cfb3c2da7382daf71a51b58e18..53105ca96f5056adbba6a97ac428587e7c3b683a 100644
|
||||
index 0753b792f3cfc1d0b53b767be4c5f728f467dca0..8a1efe19d7b0c31a306bea28b9cbab112702895a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -211,6 +211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -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 f9e1057401857ccc48f4655a64f9065dc9d93d5a..c4fd848c540eb70502b5073a4a50bef90c1c33b0 100644
|
||||
index 6a20b0265b278593c87f61206785090b9392f6d6..aecf10bddc2607924f716791315333d93e78bddf 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -850,6 +850,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -853,6 +853,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
|
@ -17,6 +17,21 @@ index 319dfa82dff1fe188a52bed5aa2d39575853b793..919758363c7b703cb200582768e68c97
|
||||
// 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 aecf10bddc2607924f716791315333d93e78bddf..52a5df31e7e0420c0cebeca4f9bfc1c981b8e128 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2824,8 +2824,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// Paper end
|
||||
// SPIGOT-7136 - Allays
|
||||
- if (entity instanceof Allay) {
|
||||
- ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
|
||||
+ if (entity instanceof Allay allay) { // Paper
|
||||
+ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta
|
||||
player.containerMenu.sendAllDataToRemote();
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index d8522072adb93d47fdd7cfa947132c23c2386952..8dc54061802f0253193bda79bded1d5265591519 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling
|
||||
Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1861708d7 100644
|
||||
index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95e29be9a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -658,7 +658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -661,7 +661,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
|
||||
d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above
|
||||
d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above
|
||||
@@ -666,6 +666,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -669,6 +669,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
boolean flag1 = entity.verticalCollisionBelow;
|
||||
|
||||
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
@ -26,7 +26,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
double d11 = d7;
|
||||
|
||||
d6 = d3 - entity.getX();
|
||||
@@ -679,16 +680,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -682,16 +683,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
boolean flag2 = false;
|
||||
|
||||
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
|
||||
@ -54,7 +54,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
entity.absMoveTo(d0, d1, d2, f, f1);
|
||||
this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
|
||||
this.connection.send(new ClientboundMoveVehiclePacket(entity));
|
||||
@@ -774,7 +783,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -777,7 +786,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private boolean noBlocksAround(Entity entity) {
|
||||
@ -88,7 +88,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1354,7 +1388,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1357,7 +1391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
@ -97,7 +97,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
||||
}
|
||||
@@ -1448,7 +1482,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1451,7 +1485,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
|
||||
d7 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above
|
||||
d8 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above
|
||||
@@ -1489,6 +1523,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1492,6 +1526,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
boolean flag1 = this.player.verticalCollisionBelow;
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
|
||||
@ -114,7 +114,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
||||
// Paper start - prevent position desync
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
@@ -1508,12 +1543,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1511,12 +1546,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
boolean flag2 = false;
|
||||
|
||||
if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
|
||||
@ -140,7 +140,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
|
||||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
} else {
|
||||
// CraftBukkit start - fire PlayerMoveEvent
|
||||
@@ -1599,6 +1645,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1602,6 +1648,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,10 +7,10 @@ Makes the PlayerKickEvent fire on the main thread for
|
||||
illegal characters or chat out-of-order errors.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c3ce4657e9eed5a398352b362d0ee6a1861708d7..9034b997fdbe5ca1c71eb154205510e99865dc3d 100644
|
||||
index 36c37ae73696a5fe443e7fd6614bca95e29be9a8..e16de9e1cf9c6d5377f7ce434cc737056093e71f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2177,7 +2177,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2180,7 +2180,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
|
||||
@ -20,7 +20,7 @@ index c3ce4657e9eed5a398352b362d0ee6a1861708d7..9034b997fdbe5ca1c71eb154205510e9
|
||||
} else {
|
||||
if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) {
|
||||
// this.server.submit(() -> { // CraftBukkit - async chat
|
||||
@@ -2205,7 +2207,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2208,7 +2210,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
||||
@ -30,7 +30,7 @@ index c3ce4657e9eed5a398352b362d0ee6a1861708d7..9034b997fdbe5ca1c71eb154205510e9
|
||||
} else {
|
||||
if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) {
|
||||
this.server.submit(() -> {
|
||||
@@ -2291,7 +2295,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2294,7 +2298,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private boolean 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);
|
||||
|
@ -7,34 +7,34 @@ Some parts of legacy conversion will need the overworld
|
||||
to get the legacy structure data storage
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index faa380a0119d5827735a45104beef9880992240a..cd1edd0cb404cab5e71efdb82f3b911c2fe96d01 100644
|
||||
index d53972b69322e03d7e8054a2dcdbdb963055988c..5f3592f570fae791f2bd55d05d02c8bb5ecc0f85 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -601,9 +601,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
||||
+ this.levels.put(world.dimension(), world); // Paper - move up
|
||||
+ this.addLevel(world); // Paper - move up
|
||||
this.initWorld(world, worlddata, worldData, worlddata.worldGenSettings());
|
||||
|
||||
- this.levels.put(world.dimension(), world);
|
||||
- this.addLevel(world);
|
||||
+ // Paper - move up
|
||||
this.getPlayerList().addWorldborderListener(world);
|
||||
|
||||
if (worlddata.getCustomBossEvents() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ac8f105371e61a93eb416e086ece0243bd251625..c08342f861ed60d82c0e341943d94fe7542d0923 100644
|
||||
index 9162384ac3365f43aa9749e1242553ca14045f47..d5ee84449de7fe6dc5a2a6a2044a93f14901ea80 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1241,10 +1241,11 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
+ console.levels.put(internal.dimension(), internal); // Paper - move up
|
||||
+ this.console.addLevel(internal); // Paper - move up
|
||||
this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenSettings());
|
||||
|
||||
internal.setSpawnSettings(true, true);
|
||||
- console.levels.put(internal.dimension(), internal);
|
||||
- this.console.addLevel(internal);
|
||||
+ // Paper - move up
|
||||
|
||||
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
||||
|
@ -24,10 +24,10 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index cd1edd0cb404cab5e71efdb82f3b911c2fe96d01..dca520534feac302b8e0f389ee9286bd719e31a6 100644
|
||||
index 5f3592f570fae791f2bd55d05d02c8bb5ecc0f85..df08b7afcf19ce694a87c25e8589c0c72521c5db 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2033,6 +2033,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2049,6 +2049,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
io.papermc.paper.registry.PaperRegistry.clearCaches(); // Paper
|
||||
@ -164,7 +164,7 @@ index 3d688e334c7287f41460bd866bfd1155e8bb55d2..55006724ccec9f3de828ec18693728e9
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c08342f861ed60d82c0e341943d94fe7542d0923..9b24f38406a1017dca430bbaeed4bf4227677972 100644
|
||||
index d5ee84449de7fe6dc5a2a6a2044a93f14901ea80..65e5f05d112f715c61698fbcc26883816cb8b6a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -285,6 +285,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -7,10 +7,10 @@ Bring the vehicle move packet behavior in line with the
|
||||
regular player move packet.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9034b997fdbe5ca1c71eb154205510e99865dc3d..79e5814adca6b38c533fae2288726aa1b99de010 100644
|
||||
index e16de9e1cf9c6d5377f7ce434cc737056093e71f..995cf6908108844299e582581a99d195a99df15b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -588,6 +588,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -591,6 +591,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
} else {
|
||||
Entity entity = this.player.getRootVehicle();
|
||||
|
||||
|
@ -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 79e5814adca6b38c533fae2288726aa1b99de010..ddc1e2d1d7800cbc846fa1fd6af4feb1dd402f63 100644
|
||||
index 995cf6908108844299e582581a99d195a99df15b..d35a49294b344f2e5fd22738a259021e72392596 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3411,7 +3411,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3419,7 +3419,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
|
||||
|
||||
if (this.player.level.isLoaded(blockposition)) {
|
||||
|
@ -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 ddc1e2d1d7800cbc846fa1fd6af4feb1dd402f63..79337f4bee57d86653603b4672d45b14fccec5db 100644
|
||||
index d35a49294b344f2e5fd22738a259021e72392596..f047f1027c5556b4dd7fe51875f075b3ba515c7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3007,7 +3007,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3015,7 +3015,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
|
||||
|
@ -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 79337f4bee57d86653603b4672d45b14fccec5db..a990e92b9136da4e39497c41ef7d08d7879efc75 100644
|
||||
index f047f1027c5556b4dd7fe51875f075b3ba515c7f..82230f8f4e7f5287fe7f2da9ad5ad7d86ff28782 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3590,6 +3590,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3598,6 +3598,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
|
@ -7,7 +7,7 @@ There are no plans to support creating worlds while worlds are
|
||||
being ticked themselvess.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 33cf037bf8ed5ea88f52ee3731cde63c70e813ef..081c7160cf727646cdec4cd551dbc2aad56326f6 100644
|
||||
index 4d920031300a9801debc2eb39a4d3cb9d8fbb330..dd9ab51e904be2f2f2a2981d4f0f6638a6895e8d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -297,6 +297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -35,13 +35,13 @@ index 33cf037bf8ed5ea88f52ee3731cde63c70e813ef..081c7160cf727646cdec4cd551dbc2aa
|
||||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index eaf51d2b6ad149e19585e6cf600dddbf4bb3e68b..051899f6f6bb656a836045ee36e6a2afe83f34f6 100644
|
||||
index 81eedf4812b654bd068a00e7f0e63ae6388dfe31..b867d19113862300968a54cb3d6926bef2d04e69 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1139,6 +1139,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public World createWorld(WorldCreator creator) {
|
||||
Preconditions.checkState(!console.levels.isEmpty(), "Cannot create additional worlds on STARTUP");
|
||||
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
||||
+ Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper
|
||||
Validate.notNull(creator, "Creator may not be null");
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't print component in resource pack rejection message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a990e92b9136da4e39497c41ef7d08d7879efc75..da19def22a2c965039f042766e310de56e126681 100644
|
||||
index 82230f8f4e7f5287fe7f2da9ad5ad7d86ff28782..9f5879498999ad421cec055eaf3b031a4e10b1fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2051,7 +2051,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2054,7 +2054,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
|
||||
|
@ -6,10 +6,10 @@ 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 da19def22a2c965039f042766e310de56e126681..9ed83f352cf9d1ea0d869436796f0073412d72c7 100644
|
||||
index 9f5879498999ad421cec055eaf3b031a4e10b1fc..421f8d21f3edb65b42bf7228989bd95877976e06 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2300,7 +2300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2303,7 +2303,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
||||
if (!this.updateChatOrder(timestamp)) {
|
||||
@ -18,7 +18,7 @@ index da19def22a2c965039f042766e310de56e126681..9ed83f352cf9d1ea0d869436796f0073
|
||||
this.server.scheduleOnMain(() -> { // Paper - push to main
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause
|
||||
}); // Paper - push to main
|
||||
@@ -2568,7 +2568,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2571,7 +2571,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
if (playerchatmessage.hasExpiredServer(Instant.now())) {
|
||||
|
@ -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 9ed83f352cf9d1ea0d869436796f0073412d72c7..71279d9c4d3c728f828eb8a5a2d7b435e527c01b 100644
|
||||
index 421f8d21f3edb65b42bf7228989bd95877976e06..e2197e11f8ec49495802f7d265709d716bc0524c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2588,7 +2588,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2591,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// Spigot end
|
||||
// this.chatSpamTickCount += 20;
|
||||
|
@ -5,10 +5,10 @@ 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 71279d9c4d3c728f828eb8a5a2d7b435e527c01b..07af82f89b417586aeb9b4b0a44562665a824f3b 100644
|
||||
index e2197e11f8ec49495802f7d265709d716bc0524c..ad6ae4a8c9e5af5f75d796add202bd8b2dec701a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1732,11 +1732,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1735,11 +1735,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return false; // CraftBukkit - Return event status
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ 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 2cf84abadc7fd7806566948d4c6e2212bdf2aeb7..e6411d8293c36f41b790cf17ecc507507f04d604 100644
|
||||
index 77339926519057b1c878761780ff2d6621f5ccb7..6f0ffd1895a9c392b643f3595e709ec3706c39b4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1135,7 +1135,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -57,10 +57,10 @@ index 9378e83a67a70dbb1fb4f05b33f1e553d008e62b..5a60f5dc202c44b06ca34e9a19d45cb7
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 07af82f89b417586aeb9b4b0a44562665a824f3b..e0d676f08f99882170307d6996c83f533aef2999 100644
|
||||
index ad6ae4a8c9e5af5f75d796add202bd8b2dec701a..d030574fbd282c018898b64b6ced9749f54cb813 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1877,8 +1877,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1880,8 +1880,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
// Paper end - Don't allow digging in unloaded chunks
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix command preprocess cancelling and command changing
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e0d676f08f99882170307d6996c83f533aef2999..f4950ed28a905f7cc227941f9a1f6a1cb64b4eca 100644
|
||||
index d030574fbd282c018898b64b6ced9749f54cb813..50d89accf52799de11ab0488e9353ca40f2de3dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2261,13 +2261,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2264,13 +2264,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server));
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add async catcher to PlayerConnection internalTeleport
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f4950ed28a905f7cc227941f9a1f6a1cb64b4eca..dbefefc123e3cb38a95bd321d74c384bc087cfba 100644
|
||||
index 50d89accf52799de11ab0488e9353ca40f2de3dd..c3a5aa2cbfeef1d2841ef85d135a2f6e0a7a2f61 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1760,6 +1760,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1763,6 +1763,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c379a6b4e421561edd6e1a62e2e4410f48bf1ab1
|
||||
Subproject commit ead719a65bf1202e32a4d81442a8bde1a62c07fd
|
@ -1 +1 @@
|
||||
Subproject commit 584b459dceac6e6f4708b70706671206d7a2c8ea
|
||||
Subproject commit 450dcaa86efd759674bbdeae0f6a37c97977618e
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren