mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 0a4b84d6 SPIGOT-7003: Add missing PlayerAnimationType 830db7d5 SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas 20caf8ff PR-754: Add DamageCause.SONIC_BOOM CraftBukkit Changes: 576a03704 SPIGOT-7003: Add missing PlayerAnimationType 0dcc5fdd0 SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas d75aacb43 Update Netty version 3b34c6bea SPIGOT-7044: Modified RandomSourceWrapper to ensure random is not null before setting seed 4b60bfd18 PR-1059: Add DamageCause.SONIC_BOOM
This commit is contained in:
parent
e1c2939c11
commit
d385af0e01
@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
|
||||
index 6cd236cd1fa10ec37e6e0228c7bbd4415b39399d..4d18b0f2984b301bb2d909c9c362de4cbd4366fe 100644
|
||||
index b7ca545c3574d4639f2783f2367de871086a5704..eae7efdaea1f288b17101456aee37710ae2715e2 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
|
||||
@@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@ -49,23 +49,3 @@ index 6cd236cd1fa10ec37e6e0228c7bbd4415b39399d..4d18b0f2984b301bb2d909c9c362de4c
|
||||
*/
|
||||
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -18,12 +19,19 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
*
|
||||
* @param player The player instance
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public PlayerAnimationEvent(@NotNull final Player player) {
|
||||
super(player);
|
||||
|
||||
// Only supported animation type for now:
|
||||
animationType = PlayerAnimationType.ARM_SWING;
|
||||
}
|
||||
+ // Paper start
|
||||
+ public PlayerAnimationEvent(@NotNull final Player player, @NotNull PlayerAnimationType animationType) {
|
||||
+ super(player);
|
||||
+ this.animationType = animationType;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Get the type of this animation event
|
||||
|
@ -172,7 +172,7 @@ index 0000000000000000000000000000000000000000..d10ff4a52c22033e2adb2a4e7f2cee98
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 380703ab3e6ecaa5013b6d24a12cba35dc8ee392..0000000000000000000000000000000000000000
|
||||
index c8cf5991362ba4c999fc6cb925757f02ac7424b5..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,616 +0,0 @@
|
||||
@ -288,63 +288,63 @@ index 380703ab3e6ecaa5013b6d24a12cba35dc8ee392..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-buffer</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-codec</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-common</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-handler</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-resolver</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-transport</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-transport-classes-epoll</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-transport-native-epoll</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <classifier>linux-x86_64</classifier>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-transport-native-epoll</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <classifier>linux-aarch_64</classifier>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-transport-native-unix-common</artifactId>
|
||||
- <version>4.1.76.Final</version>
|
||||
- <version>4.1.77.Final</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
|
@ -1417,7 +1417,7 @@ index 56996af65ef7478adb90d3b2f4cd3351fc49200b..7002d5f5700570e32ebf0b63e340d87d
|
||||
// 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 2cbe0230173ad391fe70b0a31d8999927461b5e6..56e1886b4cf63fd1f14cd8420ccdba1271cf2d6c 100644
|
||||
index 519895351790f8a85d32a6dd87ea8693cae492b7..a22008c6534c78a751dcd69f217db305b13d2c56 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -172,6 +172,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
@ -1429,7 +1429,7 @@ index 2cbe0230173ad391fe70b0a31d8999927461b5e6..56e1886b4cf63fd1f14cd8420ccdba12
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import net.minecraft.world.entity.animal.Bucketable;
|
||||
@@ -412,21 +414,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -413,21 +415,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return this.server.isSingleplayerOwner(this.player.getGameProfile());
|
||||
}
|
||||
|
||||
@ -1462,7 +1462,7 @@ index 2cbe0230173ad391fe70b0a31d8999927461b5e6..56e1886b4cf63fd1f14cd8420ccdba12
|
||||
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -438,8 +443,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -439,8 +444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// Send the possibly modified leave message
|
||||
@ -1472,7 +1472,7 @@ index 2cbe0230173ad391fe70b0a31d8999927461b5e6..56e1886b4cf63fd1f14cd8420ccdba12
|
||||
// CraftBukkit end
|
||||
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> {
|
||||
@@ -1719,9 +1723,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1720,9 +1724,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
*/
|
||||
|
||||
this.player.disconnect();
|
||||
@ -1487,7 +1487,7 @@ index 2cbe0230173ad391fe70b0a31d8999927461b5e6..56e1886b4cf63fd1f14cd8420ccdba12
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.player.getTextFilter().leave();
|
||||
@@ -1946,7 +1952,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1947,7 +1953,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.handleCommand(s);
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
@ -1501,7 +1501,7 @@ index 2cbe0230173ad391fe70b0a31d8999927461b5e6..56e1886b4cf63fd1f14cd8420ccdba12
|
||||
Player player = this.getCraftPlayer();
|
||||
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -2860,30 +2871,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2861,30 +2872,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2885,7 +2885,7 @@ index eebd8c56d319100f1f5ad9bc0b4d5a0d01e27fba..028d7a4cec039312bef59c693ef3d996
|
||||
private final Player.Spigot spigot = new Player.Spigot()
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e9349ebcaa86144eefdb053b9eacf7ff37f2c0ec..147368eb3003b6a081389ab81bd5016db15ddba6 100644
|
||||
index 76ee5046fcfa2b66934cab2dee6af0226a906aee..1f74088858aff5deb8aac7057ad07727234f817e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -815,9 +815,9 @@ public class CraftEventFactory {
|
||||
|
@ -1262,10 +1262,10 @@ index 006d7ee33542fe6eba955410fc0054786662f82b..379e546faa873d4d13751e54d38942f9
|
||||
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 56e1886b4cf63fd1f14cd8420ccdba1271cf2d6c..e65175696d4d99225e87d79cf3e59cf2f29637e1 100644
|
||||
index a22008c6534c78a751dcd69f217db305b13d2c56..357ff7f3ade2d59a7a2b3d93d7d35534565b6add 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -310,7 +310,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -311,7 +311,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
public void tick() {
|
||||
@ -1273,7 +1273,7 @@ index 56e1886b4cf63fd1f14cd8420ccdba1271cf2d6c..e65175696d4d99225e87d79cf3e59cf2
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -391,7 +390,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -392,7 +391,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ index 56e1886b4cf63fd1f14cd8420ccdba1271cf2d6c..e65175696d4d99225e87d79cf3e59cf2
|
||||
|
||||
this.chatPreviewThrottler.tick();
|
||||
}
|
||||
@@ -2021,7 +2019,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2022,7 +2020,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -1290,7 +1290,7 @@ index 56e1886b4cf63fd1f14cd8420ccdba1271cf2d6c..e65175696d4d99225e87d79cf3e59cf2
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2031,7 +2029,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2032,7 +2030,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -1299,7 +1299,7 @@ index 56e1886b4cf63fd1f14cd8420ccdba1271cf2d6c..e65175696d4d99225e87d79cf3e59cf2
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2044,7 +2042,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2045,7 +2043,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
|
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
||||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e65175696d4d99225e87d79cf3e59cf2f29637e1..ea9a2b48d3d84fcf1ec263c920bacd80ae26cb27 100644
|
||||
index 357ff7f3ade2d59a7a2b3d93d7d35534565b6add..e27be8fb00360d546557bdbfec2907736145fa0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1947,6 +1947,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1948,6 +1948,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
if (!async && s.startsWith("/")) {
|
||||
|
@ -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 ea9a2b48d3d84fcf1ec263c920bacd80ae26cb27..8b971fa96e55f3c2f990fb58cfb772d504d48acc 100644
|
||||
index e27be8fb00360d546557bdbfec2907736145fa0f..d5cbeb088c95537fa63a489603a71307481ee455 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1686,8 +1686,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1687,8 +1687,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
|
||||
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
|
||||
}
|
||||
@ -23,7 +23,7 @@ index ea9a2b48d3d84fcf1ec263c920bacd80ae26cb27..8b971fa96e55f3c2f990fb58cfb772d5
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8fafbbf8556c295fd7bc21352c640101d15d3e7c..6b542ea548b078ca41f347614d25bcf00d30a87f 100644
|
||||
index ee95995da272630b78427812656ecdff65cb0343..f9cb4d38714bd65202e7737f581980002f1e7ca5 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 8b971fa96e55f3c2f990fb58cfb772d504d48acc..e7d9af82a11fb5c1250c76d32f21cc720c002da2 100644
|
||||
index d5cbeb088c95537fa63a489603a71307481ee455..3100b69930682ccb9f72ba15e00254d91ab79b4f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2410,8 +2410,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2411,8 +2411,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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 e7d9af82a11fb5c1250c76d32f21cc720c002da2..e4f3b2516372cb21e7b53f1df9ee484476179035 100644
|
||||
index 3100b69930682ccb9f72ba15e00254d91ab79b4f..0e85f5c0396f3931462f5daab10fce76ab28f414 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1534,13 +1534,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1535,13 +1535,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// 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 e4f3b2516372cb21e7b53f1df9ee484476179035..bfcbfc08fb329ebded5376c4a78d13e659323a64 100644
|
||||
index 0e85f5c0396f3931462f5daab10fce76ab28f414..af162828963571f87f7b530443fdf6c3fa22fd4d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -326,7 +326,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -327,7 +327,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 e4f3b2516372cb21e7b53f1df9ee484476179035..bfcbfc08fb329ebded5376c4a78d13e6
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -345,7 +345,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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());
|
||||
|
@ -28,10 +28,10 @@ index 2a7c82be934a965ba26dc7bf1f60689360bda487..33d1a6b31afec4dbeb00dcabf50c5840
|
||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
|
||||
entitywitch.setNoAi(this.isNoAi());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 147368eb3003b6a081389ab81bd5016db15ddba6..3f71cd6e8ba3e2c1ae978a4522665d7016dd570a 100644
|
||||
index 1f74088858aff5deb8aac7057ad07727234f817e..c5a6de1b37c78d0146224597d7008cadad723cea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1150,6 +1150,14 @@ public class CraftEventFactory {
|
||||
@@ -1152,6 +1152,14 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ index dba0bc7dc8fd1993f45716a398b1ccf52d3d868b..b3433ce9c722bdab81848a6c2d121ca5
|
||||
|
||||
--this.count;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 3f71cd6e8ba3e2c1ae978a4522665d7016dd570a..ed3014b2c8d3c182c0011a5d970216b6f4c6afa5 100644
|
||||
index c5a6de1b37c78d0146224597d7008cadad723cea..87a1f13c07a3cebb75155b7d8186befa63d147c9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1109,6 +1109,17 @@ public class CraftEventFactory {
|
||||
@@ -1111,6 +1111,17 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,10 @@ index 88181c59e604ba3b132b9e695cef5eaf5b836029..94d09b05737679b133ec462815b010b1
|
||||
|
||||
this.checkInsideBlocks();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ed3014b2c8d3c182c0011a5d970216b6f4c6afa5..fdf00487c7ff1fb1058a28e63e535165b26fc34a 100644
|
||||
index 87a1f13c07a3cebb75155b7d8186befa63d147c9..4de19058b61d4def69161f26bed6c43aa63a4403 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1253,6 +1253,16 @@ public class CraftEventFactory {
|
||||
@@ -1255,6 +1255,16 @@ public class CraftEventFactory {
|
||||
return CraftItemStack.asNMSCopy(bitem);
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,10 @@ index 73fe1f1047e39eeeb8a1444fa353f7d1a8e651b3..4b65dc12dc97e72b221d9fd15202a1a0
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index bfcbfc08fb329ebded5376c4a78d13e659323a64..3f1bda6c17fca41150bfaab2cd5a4e8849bd439d 100644
|
||||
index af162828963571f87f7b530443fdf6c3fa22fd4d..34f58fb835abaad145e2f1fa71cce193386a28fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3036,7 +3036,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3037,7 +3037,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
||||
|
@ -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 3f1bda6c17fca41150bfaab2cd5a4e8849bd439d..95b0c01d1eaf58ba8c93c896891dcfb1075d57da 100644
|
||||
index 34f58fb835abaad145e2f1fa71cce193386a28fb..8481e16454fbee019f0c8f3c9371576cbfc48d07 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2258,6 +2258,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2259,6 +2259,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
|
@ -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 95b0c01d1eaf58ba8c93c896891dcfb1075d57da..0ee7a16e0595118d0135cafbc2c96b17b9cf9c70 100644
|
||||
index 8481e16454fbee019f0c8f3c9371576cbfc48d07..c5ab3ee4525f8eb611f273ff35d1b91787bc95b8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1216,7 +1216,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1217,7 +1217,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 0ee7a16e0595118d0135cafbc2c96b17b9cf9c70..8e233f88d5bbd223c8d3dfc88d79eb03c17aa204 100644
|
||||
index c5ab3ee4525f8eb611f273ff35d1b91787bc95b8..32c59e612519323c8ee1956a1a893354913d1fda 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2995,14 +2995,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2996,14 +2996,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@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 8e233f88d5bbd223c8d3dfc88d79eb03c17aa204..35b973dbf30ea14dbb94d10cc16ebb4b86d24a99 100644
|
||||
index 32c59e612519323c8ee1956a1a893354913d1fda..71e52f71ac06f66696f5ae9b79ab490c7389927f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -239,7 +239,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -240,7 +240,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
public ServerPlayer player;
|
||||
private int tickCount;
|
||||
private int ackBlockChangesUpTo = -1;
|
||||
@ -29,7 +29,7 @@ index 8e233f88d5bbd223c8d3dfc88d79eb03c17aa204..35b973dbf30ea14dbb94d10cc16ebb4b
|
||||
private boolean keepAlivePending;
|
||||
private long keepAliveChallenge;
|
||||
// CraftBukkit start - multithreaded fields
|
||||
@@ -272,6 +272,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -273,6 +273,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private int knownMovePacketCount;
|
||||
private final ChatPreviewThrottler chatPreviewThrottler = new ChatPreviewThrottler();
|
||||
private final AtomicReference<Instant> lastChatTimeStamp;
|
||||
@ -37,7 +37,7 @@ index 8e233f88d5bbd223c8d3dfc88d79eb03c17aa204..35b973dbf30ea14dbb94d10cc16ebb4b
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -359,18 +360,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -360,18 +361,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
this.server.getProfiler().push("keepAlive");
|
||||
|
@ -14,10 +14,10 @@ completion, such as offline players.
|
||||
Also adds isCommand and getLocation to the sync TabCompleteEvent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 35b973dbf30ea14dbb94d10cc16ebb4b86d24a99..81ac95b9a174b25d47515fbd84c03d22c905454e 100644
|
||||
index 71e52f71ac06f66696f5ae9b79ab490c7389927f..cd9f1bea29833c0d263d43f4a8c76908c0c54b89 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -740,10 +740,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -741,10 +741,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
@ -30,7 +30,7 @@ index 35b973dbf30ea14dbb94d10cc16ebb4b86d24a99..81ac95b9a174b25d47515fbd84c03d22
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -753,12 +753,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -754,12 +754,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
stringreader.skip();
|
||||
}
|
||||
|
||||
|
@ -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 81ac95b9a174b25d47515fbd84c03d22c905454e..18f5bcda3747735d3fadd6186dc3afc4f6097946 100644
|
||||
index cd9f1bea29833c0d263d43f4a8c76908c0c54b89..2d6bb5e7dee7a0e7ddaf6e05a9a1f9df9f1d195d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3001,9 +3001,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3002,9 +3002,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
FilteredText<Component> filteredtext = (signText.get(i)).map(Component::literal); // CraftBukkit - decompile error
|
||||
|
||||
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 ef9bf1ec96a320ff16385ceb28d77315b56cfef0..584f93acc8192444e241e71d49f6351f691a019b 100644
|
||||
index e9f2672e7e6b4fa731343be0d34b0b13c01b1463..aa4fffbf334c925d1db66ae8da5d22f5ca4f6586 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1155,7 +1155,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -75,7 +75,7 @@ index 05b9595d4d308e5b4a551d26f3defbfa1d829ea9..0ef0b7fa2af5ac6608f9b8b37317434f
|
||||
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 18f5bcda3747735d3fadd6186dc3afc4f6097946..96e853da573736f436cc4885acde663e20877714 100644
|
||||
index 2d6bb5e7dee7a0e7ddaf6e05a9a1f9df9f1d195d..c91e8300fe0cb673567f0b0e725a6d460dcebf31 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -204,6 +204,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
@ -86,7 +86,7 @@ index 18f5bcda3747735d3fadd6186dc3afc4f6097946..96e853da573736f436cc4885acde663e
|
||||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.inventory.SmithItemEvent;
|
||||
@@ -2540,10 +2541,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2541,10 +2542,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
@ -174,7 +174,7 @@ index 6c708f65b3a3718c7b53e0c2cc12ee8ad62ff2b9..a6ac2fdcda24ec031d5d2ea9e4492614
|
||||
@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 68a6bb89a5946fba7d4baeb009895d7ca975cbe8..61aa7b0299bf29302f0ce2d7a9fe89d25d0a92e6 100644
|
||||
index 64f891db064ab1ad74479a5d7fb4d7828217afc7..d426534e7c16a307b93e9170c7eb9bcdbdac2ada 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1060,7 +1060,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -187,10 +187,10 @@ index 68a6bb89a5946fba7d4baeb009895d7ca975cbe8..61aa7b0299bf29302f0ce2d7a9fe89d2
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index fdf00487c7ff1fb1058a28e63e535165b26fc34a..63d6e3103ad7decc64c50b0f14b0049c7734b8e7 100644
|
||||
index 4de19058b61d4def69161f26bed6c43aa63a4403..0f2371490d7dda84366271187f7ed4deed6bb0f9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1222,7 +1222,7 @@ public class CraftEventFactory {
|
||||
@@ -1224,7 +1224,7 @@ public class CraftEventFactory {
|
||||
|
||||
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
|
||||
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
|
||||
@ -199,7 +199,7 @@ index fdf00487c7ff1fb1058a28e63e535165b26fc34a..63d6e3103ad7decc64c50b0f14b0049c
|
||||
}
|
||||
|
||||
CraftServer server = player.level.getCraftServer();
|
||||
@@ -1388,8 +1388,18 @@ public class CraftEventFactory {
|
||||
@@ -1390,8 +1390,18 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -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 96e853da573736f436cc4885acde663e20877714..6dc8b7fe2418ee893b5db5d2116fa8853d92f28b 100644
|
||||
index c91e8300fe0cb673567f0b0e725a6d460dcebf31..4b99de786be5fbefb94a5484868b897ab0f86a27 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2425,6 +2425,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2426,6 +2426,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
@ -38,7 +38,7 @@ index 0d7c4be0c4abefecab367334408594afa7998b5e..78cac63e5bd7c84f59b8e00ee40899be
|
||||
|
||||
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index ed29841c17a4d29ca05cbd307fa474d2208f5b3f..f8058e1f54d0281863cab81e866e0aa5400bb6bd 100644
|
||||
index 056531554bf6e8743111607237d942af13d47848..13fcd9d885043444d3a2c5a3d9bd1c906b4c4934 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -74,6 +74,10 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
|
||||
@ -99,10 +99,10 @@ index ed29841c17a4d29ca05cbd307fa474d2208f5b3f..f8058e1f54d0281863cab81e866e0aa5
|
||||
public boolean isClientSide() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 63d6e3103ad7decc64c50b0f14b0049c7734b8e7..8620c065e7709bf8a366760073d58f902215d1c0 100644
|
||||
index 0f2371490d7dda84366271187f7ed4deed6bb0f9..49ec76720dea8c756817ded7d02bfea02f86d428 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1258,6 +1258,14 @@ public class CraftEventFactory {
|
||||
@@ -1260,6 +1260,14 @@ public class CraftEventFactory {
|
||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||
|
@ -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 6dc8b7fe2418ee893b5db5d2116fa8853d92f28b..490b5565721e6a95fa58839450337690f9afed6a 100644
|
||||
index 4b99de786be5fbefb94a5484868b897ab0f86a27..e0215f34f5f82cbd3a67f58a8a177fc886ccc72c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -245,6 +245,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -246,6 +246,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private long keepAliveChallenge;
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
@ -33,7 +33,7 @@ index 6dc8b7fe2418ee893b5db5d2116fa8853d92f28b..490b5565721e6a95fa58839450337690
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -384,6 +385,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -385,6 +386,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 6dc8b7fe2418ee893b5db5d2116fa8853d92f28b..490b5565721e6a95fa58839450337690
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -743,7 +745,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -744,7 +746,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
|
@ -2819,10 +2819,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 490b5565721e6a95fa58839450337690f9afed6a..2d041220607e35b8adf00c6378336db0e137e79a 100644
|
||||
index e0215f34f5f82cbd3a67f58a8a177fc886ccc72c..8e68e7c068fc819438ec9e08ca412faf38c661d8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -749,6 +749,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -750,6 +750,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 2d041220607e35b8adf00c6378336db0e137e79a..3716906566e09617cb12cd4fd0f37cb48a35a7fd 100644
|
||||
index 8e68e7c068fc819438ec9e08ca412faf38c661d8..a3da4721452597f7b2c3a505921df59f2ec7113d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -525,9 +525,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -526,9 +526,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
double d0 = entity.getX();
|
||||
double d1 = entity.getY();
|
||||
double d2 = entity.getZ();
|
||||
@ -22,7 +22,7 @@ index 2d041220607e35b8adf00c6378336db0e137e79a..3716906566e09617cb12cd4fd0f37cb4
|
||||
float f = Mth.wrapDegrees(packet.getYRot());
|
||||
float f1 = Mth.wrapDegrees(packet.getXRot());
|
||||
double d6 = d3 - this.vehicleFirstGoodX;
|
||||
@@ -562,6 +562,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -563,6 +563,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||
|
||||
@ -39,7 +39,7 @@ index 2d041220607e35b8adf00c6378336db0e137e79a..3716906566e09617cb12cd4fd0f37cb4
|
||||
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});
|
||||
@@ -1179,9 +1189,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1180,9 +1190,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.allowedPlayerTicks = 20; // CraftBukkit
|
||||
} else {
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
@ -52,7 +52,7 @@ index 2d041220607e35b8adf00c6378336db0e137e79a..3716906566e09617cb12cd4fd0f37cb4
|
||||
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
|
||||
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
|
||||
|
||||
@@ -1237,6 +1247,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1238,6 +1248,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
} 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 3716906566e09617cb12cd4fd0f37cb48a35a7fd..56ae4b92aaca4ddaa6659a2b65ad69a1f532b0f1 100644
|
||||
index a3da4721452597f7b2c3a505921df59f2ec7113d..290ff4431817e18433b04e4d9523485f131cbc72 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1597,6 +1597,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1598,6 +1598,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 56ae4b92aaca4ddaa6659a2b65ad69a1f532b0f1..307c68c756cc46867605f83d7dd3b1ead79db32f 100644
|
||||
index 290ff4431817e18433b04e4d9523485f131cbc72..214b84ff959b7b658db887aafa36431fa6a6b488 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1048,6 +1048,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1049,6 +1049,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||
|
@ -10,7 +10,7 @@ Adds CommandRegisteredEvent
|
||||
- Allows manipulating the CommandNode to add more children/metadata for the client
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 078026236de2e0c8094a63bb261060e9f576bd06..55355f4efce9b3f50eae1f403d6e95dff48e4c54 100644
|
||||
index d226f391e596e0303d0f8f29f594e0ddbe47bcd0..47005e625ba323b93855934b447566246509eabf 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -8,6 +8,7 @@ plugins {
|
||||
@ -81,10 +81,10 @@ index 4c9773997c63f7b2c8465b19810068f11367466b..a8f3a84615a640d2949d268ef1ac81a0
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 307c68c756cc46867605f83d7dd3b1ead79db32f..80e3023545af22725c2d74124db5dabd8b7111d9 100644
|
||||
index 214b84ff959b7b658db887aafa36431fa6a6b488..c3d5fc95d4faa3dce9670d84c7057fa92170010d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -789,8 +789,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -790,8 +790,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
||||
|
||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||
@ -99,7 +99,7 @@ index 307c68c756cc46867605f83d7dd3b1ead79db32f..80e3023545af22725c2d74124db5dabd
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -799,7 +803,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -800,7 +804,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
builder = builder.createOffset(builder.getInput().lastIndexOf(' ') + 1);
|
||||
completions.forEach(builder::suggest);
|
||||
|
@ -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 80e3023545af22725c2d74124db5dabd8b7111d9..15498edc2b51777cb47941efea7e1a48f63b026c 100644
|
||||
index c3d5fc95d4faa3dce9670d84c7057fa92170010d..5384fe5c20141d1581ed31420b95d2b148e38d3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -275,6 +275,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -276,6 +276,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private final ChatPreviewThrottler chatPreviewThrottler = new ChatPreviewThrottler();
|
||||
private final AtomicReference<Instant> lastChatTimeStamp;
|
||||
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 80e3023545af22725c2d74124db5dabd8b7111d9..15498edc2b51777cb47941efea7e1a48
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -3046,7 +3047,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3047,7 +3048,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
||||
|
@ -22,10 +22,10 @@ index 232341fa41b1962d329cc17f3146e41c51d22164..2c43304fd7a189f399f0e7757dbd593f
|
||||
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 15498edc2b51777cb47941efea7e1a48f63b026c..d91d66084e97675a5fdc3069487e50e7e78d1c1b 100644
|
||||
index 5384fe5c20141d1581ed31420b95d2b148e38d3e..9f8f29f3908294738943e698badd002c80fa6569 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2500,7 +2500,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2501,7 +2501,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) {
|
||||
// Refresh the current entity metadata
|
||||
|
@ -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 d91d66084e97675a5fdc3069487e50e7e78d1c1b..8e8b68c67cb2d428c3c83cc4830c52041d75c350 100644
|
||||
index 9f8f29f3908294738943e698badd002c80fa6569..f4ced406329413e47d3d088d629cd799a57d9abb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -466,7 +466,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -467,7 +467,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
Objects.requireNonNull(this.connection);
|
||||
// CraftBukkit - Don't wait
|
||||
|
@ -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 8e8b68c67cb2d428c3c83cc4830c52041d75c350..a78989388f60effa7b0c498807ca648de21afa9d 100644
|
||||
index f4ced406329413e47d3d088d629cd799a57d9abb..891bf788ae5fe9a01399737f095b9d0adf06a5fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3091,6 +3091,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3092,6 +3092,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
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 a78989388f60effa7b0c498807ca648de21afa9d..da564c365a597d0cd92efdef7a4af99f4b9d2e97 100644
|
||||
index 891bf788ae5fe9a01399737f095b9d0adf06a5fe..912e98d589f7469c6ea000d28f87e3fbe1ef3aab 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1790,6 +1790,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1791,6 +1791,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
|
@ -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 da564c365a597d0cd92efdef7a4af99f4b9d2e97..65fcd9555c70337f65535d6742582ceed5dd4eb6 100644
|
||||
index 912e98d589f7469c6ea000d28f87e3fbe1ef3aab..766a5ce5d18aed80e37075f7cfc3b6cb9d33e63a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -237,6 +237,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -238,6 +238,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private static final int NO_BLOCK_UPDATES_TO_ACK = -1;
|
||||
public final Connection connection;
|
||||
private final MinecraftServer server;
|
||||
@ -48,7 +48,7 @@ index da564c365a597d0cd92efdef7a4af99f4b9d2e97..65fcd9555c70337f65535d6742582cee
|
||||
public ServerPlayer player;
|
||||
private int tickCount;
|
||||
private int ackBlockChangesUpTo = -1;
|
||||
@@ -314,6 +315,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -315,6 +316,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
public void tick() {
|
||||
@ -64,7 +64,7 @@ index da564c365a597d0cd92efdef7a4af99f4b9d2e97..65fcd9555c70337f65535d6742582cee
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -360,7 +370,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -361,7 +371,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 65fcd9555c70337f65535d6742582ceed5dd4eb6..f2d465cb9061ba9a9c23752fcad043a0bfac0370 100644
|
||||
index 766a5ce5d18aed80e37075f7cfc3b6cb9d33e63a..1bf72668a7fab7fc9a327c2403faf2260ccddb31 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -917,7 +917,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -918,7 +918,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@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 f2d465cb9061ba9a9c23752fcad043a0bfac0370..47666c0cf18a6d3bdde2c7ecc74b17bf225a3826 100644
|
||||
index 1bf72668a7fab7fc9a327c2403faf2260ccddb31..8c1800836497803cfcd8bca4ddd340003e4cc1d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1558,6 +1558,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1559,6 +1559,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
private 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 47666c0cf18a6d3bdde2c7ecc74b17bf225a3826..7a9eba48e261b36c1ea0def38bda02fbb46dcdf7 100644
|
||||
index 8c1800836497803cfcd8bca4ddd340003e4cc1d5..1049563602ead577f24bb4b698ffb2fb386cdf21 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1372,6 +1372,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1373,6 +1373,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
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 7a9eba48e261b36c1ea0def38bda02fbb46dcdf7..cebd8d590fa8ba823a3df9a5780a4398bab8ed38 100644
|
||||
index 1049563602ead577f24bb4b698ffb2fb386cdf21..656b8d83d5f78ab32f7980e6aa5eacd61f1bc598 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2996,9 +2996,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2997,9 +2997,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
this.player.resetLastActionTime();
|
||||
if (!this.player.isSpectator() && this.player.containerMenu.containerId == packet.getContainerId() && this.player.containerMenu instanceof RecipeBookMenu) {
|
||||
|
@ -18,10 +18,10 @@ index 312768054e02847bbc7d2ec7fa6198dad52b86d2..32a6b4d8e6c8f9c05cc7ca811c2188aa
|
||||
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 cebd8d590fa8ba823a3df9a5780a4398bab8ed38..6486be14c84660652b2ac8fd0b19b2e6e9220b28 100644
|
||||
index 656b8d83d5f78ab32f7980e6aa5eacd61f1bc598..32786e1c13ffda722aaabf518e2ace7f13e0bf96 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -828,7 +828,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -829,7 +829,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||
@ -30,7 +30,7 @@ index cebd8d590fa8ba823a3df9a5780a4398bab8ed38..6486be14c84660652b2ac8fd0b19b2e6
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
||||
} else {
|
||||
BaseCommandBlock commandblocklistenerabstract = null;
|
||||
@@ -895,7 +895,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -896,7 +896,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||
|
@ -89,10 +89,10 @@ index 9075ff5455422feacb6edb6f4fe424a2becf94ed..ea1f0477f416f9e852ea92083781d7eb
|
||||
|
||||
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 6486be14c84660652b2ac8fd0b19b2e6e9220b28..e257fbb337ea50f8e36e7e6015e231bd49751144 100644
|
||||
index 32786e1c13ffda722aaabf518e2ace7f13e0bf96..08d28184c7e90878b72a606c7800cfffba90472c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3257,7 +3257,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3258,7 +3258,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
|
@ -94,10 +94,10 @@ index cdebd0cdf6eb901464cf4c16089b10ea0147b54d..b47dc7671fab2117b989d647d7e8e36d
|
||||
|
||||
private void setupRecipeList(Container input, ItemStack stack) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 02d89f77d643bcfa52981cb9a8e93688e089dd83..396a66ccd90f8b5da42b585b50d2f0d5a80697b7 100644
|
||||
index 1507a172d10986f717cbdaae9890e28c917cf4b3..b0aec2a6174048f38dd85360a4dda883ecff7111 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1591,19 +1591,44 @@ public class CraftEventFactory {
|
||||
@@ -1593,19 +1593,44 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -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 e257fbb337ea50f8e36e7e6015e231bd49751144..0017be03b57b337b010f56019a03e4d243bf2447 100644
|
||||
index 08d28184c7e90878b72a606c7800cfffba90472c..84943c80d4a331b18652854f3ae75b509fde806b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -278,6 +278,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -279,6 +279,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 e257fbb337ea50f8e36e7e6015e231bd49751144..0017be03b57b337b010f56019a03e4d2
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
this.server = server;
|
||||
@@ -3212,6 +3214,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3213,6 +3215,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||
|
||||
@ -26,7 +26,7 @@ index e257fbb337ea50f8e36e7e6015e231bd49751144..0017be03b57b337b010f56019a03e4d2
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
@@ -3239,6 +3243,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3240,6 +3244,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
try {
|
||||
byte[] data = new byte[packet.data.readableBytes()];
|
||||
packet.data.readBytes(data);
|
||||
@ -42,7 +42,7 @@ index e257fbb337ea50f8e36e7e6015e231bd49751144..0017be03b57b337b010f56019a03e4d2
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -3248,6 +3261,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3249,6 +3262,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
}
|
||||
|
||||
|
@ -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 0017be03b57b337b010f56019a03e4d243bf2447..bbe8d9c7a221150206918977e9800c130d295a3e 100644
|
||||
index 84943c80d4a331b18652854f3ae75b509fde806b..2e6bb067197121c72d249fc31ce46b8b0b17263b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -720,7 +720,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -721,7 +721,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index 0017be03b57b337b010f56019a03e4d243bf2447..bbe8d9c7a221150206918977e9800c13
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1602,7 +1602,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1603,7 +1603,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
|
@ -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 bbe8d9c7a221150206918977e9800c130d295a3e..40dc34dc5a68645695b9e4467ac0b845e90ba99c 100644
|
||||
index 2e6bb067197121c72d249fc31ce46b8b0b17263b..979bdc8a7547e96d3a9dcf9597b58d6a8a4aeee7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -535,9 +535,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -536,9 +536,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
|
||||
ServerLevel worldserver = this.player.getLevel();
|
||||
@ -22,7 +22,7 @@ index bbe8d9c7a221150206918977e9800c130d295a3e..40dc34dc5a68645695b9e4467ac0b845
|
||||
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
|
||||
@@ -547,8 +547,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -548,8 +548,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
double d7 = d4 - this.vehicleFirstGoodY;
|
||||
double d8 = d5 - this.vehicleFirstGoodZ;
|
||||
double d9 = entity.getDeltaMovement().lengthSqr();
|
||||
@ -44,7 +44,7 @@ index bbe8d9c7a221150206918977e9800c130d295a3e..40dc34dc5a68645695b9e4467ac0b845
|
||||
|
||||
// CraftBukkit start - handle custom speeds and skipped ticks
|
||||
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
|
||||
@@ -594,9 +605,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -595,9 +606,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
|
||||
|
||||
@ -57,7 +57,7 @@ index bbe8d9c7a221150206918977e9800c130d295a3e..40dc34dc5a68645695b9e4467ac0b845
|
||||
boolean flag1 = entity.verticalCollisionBelow;
|
||||
|
||||
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
@@ -1282,7 +1293,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1283,7 +1294,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
double d8 = d1 - this.firstGoodY;
|
||||
double d9 = d2 - this.firstGoodZ;
|
||||
double d10 = this.player.getDeltaMovement().lengthSqr();
|
||||
@ -77,7 +77,7 @@ index bbe8d9c7a221150206918977e9800c130d295a3e..40dc34dc5a68645695b9e4467ac0b845
|
||||
|
||||
if (this.player.isSleeping()) {
|
||||
if (d11 > 1.0D) {
|
||||
@@ -1334,9 +1356,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1335,9 +1357,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
AABB axisalignedbb = this.player.getBoundingBox();
|
||||
|
||||
|
@ -37,10 +37,10 @@ index 315ada5d45e8681a8f0695410201758d8748b7ec..f0ef38377ae735800323c486d9e42cd0
|
||||
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 40dc34dc5a68645695b9e4467ac0b845e90ba99c..116fbaf688c96578a4ef6b50a1726729a5d19953 100644
|
||||
index 979bdc8a7547e96d3a9dcf9597b58d6a8a4aeee7..3c608f12c2500d11bd209c3c8797a9909165668c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -468,6 +468,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -469,6 +469,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 116fbaf688c96578a4ef6b50a1726729a5d19953..ce557881898a7daa5181d7d7861004ef8926c023 100644
|
||||
index 3c608f12c2500d11bd209c3c8797a9909165668c..517c036be37f7ecd51f3a417b3ae800fa2d1ba08 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -247,6 +247,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -248,6 +248,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// 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 116fbaf688c96578a4ef6b50a1726729a5d19953..ce557881898a7daa5181d7d7861004ef
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -399,6 +400,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -400,6 +401,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// 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 116fbaf688c96578a4ef6b50a1726729a5d19953..ce557881898a7daa5181d7d7861004ef
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -3018,6 +3020,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3019,6 +3021,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@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 ce557881898a7daa5181d7d7861004ef8926c023..0f3a9acf5bd0b17f561a7616d0720951cfc78c23 100644
|
||||
index 517c036be37f7ecd51f3a417b3ae800fa2d1ba08..937d5bb2f0686863447c612c9c786f8a412d704b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1778,7 +1778,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1779,7 +1779,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED);
|
||||
|
||||
this.player.sendSystemMessage(ichatmutablecomponent, ChatType.GAME_INFO);
|
||||
@ -18,7 +18,7 @@ index ce557881898a7daa5181d7d7861004ef8926c023..0f3a9acf5bd0b17f561a7616d0720951
|
||||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2411,7 +2411,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2412,7 +2412,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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));
|
||||
|
||||
|
@ -32,10 +32,10 @@ index 1415ad60163f6584619cc7caa61f1848d6ebaa93..801c4c120e98584bcf218a4ef9bd66d7
|
||||
} else {
|
||||
ItemStack itemstack = tileentitydispenser.getItem(i);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 04923ca78b5866162612c5bc82e03c4ccd024c7f..99ce890f6014b66f7fd699cf72089fd3224fe30b 100644
|
||||
index 46189c02e94af8520bf7e226f3924ba8952e72d6..f89228c0c38c4acc299248e7d9639442eedca08b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1865,4 +1865,12 @@ public class CraftEventFactory {
|
||||
@@ -1867,4 +1867,12 @@ public class CraftEventFactory {
|
||||
EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ index 85c5319837295bd2f85baebfe8d6660b267f1d5f..8f55d0753fa26924235c943595f0d1a0
|
||||
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index dadbb7d5295eea5097a2563775ae86b8a14d92f8..448dff5c789283f0c17373f3efed2660f16199d1 100644
|
||||
index a45ed570a7bf1becbc91c97c3890e99c0e5ebc0c..142a51d7ed13da93ecc3dc790d880b7c81365d78 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1883,5 +1883,11 @@ public class CraftEventFactory {
|
||||
@@ -1885,5 +1885,11 @@ public class CraftEventFactory {
|
||||
io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block);
|
||||
return event.callEvent();
|
||||
}
|
||||
|
@ -122,10 +122,10 @@ index 7eb315aac7737cf443c693147c2cfd871f201724..03de59302041b0bc13922ec129501417
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 448dff5c789283f0c17373f3efed2660f16199d1..ad0a12f5d1b2179b31a307c0c5ca8478fbf43fc1 100644
|
||||
index 142a51d7ed13da93ecc3dc790d880b7c81365d78..7893c10295abcd6ab2e3c4458c31f0b8914ba4c3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1524,8 +1524,10 @@ public class CraftEventFactory {
|
||||
@@ -1526,8 +1526,10 @@ public class CraftEventFactory {
|
||||
return itemInHand;
|
||||
}
|
||||
|
||||
|
@ -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 0f3a9acf5bd0b17f561a7616d0720951cfc78c23..972296f7584cb2dc0e96e0839eb245a7116d790f 100644
|
||||
index 937d5bb2f0686863447c612c9c786f8a412d704b..3d4e75e1a2aeb6776be464e3614b818af8d6b16d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1770,7 +1770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1771,7 +1771,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
int i = this.player.level.getMaxBuildHeight();
|
||||
|
||||
if (blockposition.getY() < i) {
|
||||
|
@ -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 972296f7584cb2dc0e96e0839eb245a7116d790f..19d00d89c2ebcf6c81ca55207ae3eaa38af97647 100644
|
||||
index 3d4e75e1a2aeb6776be464e3614b818af8d6b16d..dfeeaa4b5a8fc7cff043223291e56381857f38b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1220,7 +1220,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1221,7 +1221,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
itemstack.addTagElement("pages", nbttaglist);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow for Component suggestion tooltips in
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 19d00d89c2ebcf6c81ca55207ae3eaa38af97647..d2c951a0e9031af3621b58d02711e55f236168e0 100644
|
||||
index dfeeaa4b5a8fc7cff043223291e56381857f38b6..0cf314dcd57db6ea9b27fc008729df700fd97de1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -802,12 +802,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -803,12 +803,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
// Paper start - async tab completion
|
||||
com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event;
|
||||
@ -24,7 +24,7 @@ index 19d00d89c2ebcf6c81ca55207ae3eaa38af97647..d2c951a0e9031af3621b58d02711e55f
|
||||
// If the event isn't handled, we can assume that we have no completions, and so we'll ask the server
|
||||
if (!event.isHandled()) {
|
||||
if (!event.isCancelled()) {
|
||||
@@ -826,10 +825,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -827,10 +826,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
});
|
||||
}
|
||||
} else if (!completions.isEmpty()) {
|
||||
|
@ -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 d2c951a0e9031af3621b58d02711e55f236168e0..cea82a7cdbf50e9fb4ba705860c09bbbaca18167 100644
|
||||
index 0cf314dcd57db6ea9b27fc008729df700fd97de1..d9d0811cef7a5fcbc7f4fcb9de6a874268345b16 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1985,6 +1985,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1986,6 +1986,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 cea82a7cdbf50e9fb4ba705860c09bbbaca18167..648a21537673929dbd9d25ecd0f0f49ee28b03a8 100644
|
||||
index d9d0811cef7a5fcbc7f4fcb9de6a874268345b16..dde41b71132354eb52fe34408afcbade41da41f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2673,7 +2673,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2674,7 +2674,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
case PERFORM_RESPAWN:
|
||||
if (this.player.wonGame) {
|
||||
this.player.wonGame = false;
|
||||
|
@ -126,10 +126,10 @@ index 06e7a8b8227260c002a88119544b99a11eec8a09..4d907501dfe7f1a4641542291f4abdd0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 648a21537673929dbd9d25ecd0f0f49ee28b03a8..7777fad24d4d4e1ef623bbddf4657fa945a8b113 100644
|
||||
index dde41b71132354eb52fe34408afcbade41da41f3..e53f086238977320bdbb98547b5dda93a4e6581e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2682,7 +2682,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2683,7 +2683,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
this.player = this.server.getPlayerList().respawn(this.player, false);
|
||||
if (this.server.isHardcore()) {
|
||||
@ -139,7 +139,7 @@ index 648a21537673929dbd9d25ecd0f0f49ee28b03a8..7777fad24d4d4e1ef623bbddf4657fa9
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 482a6385d6d8072e2724054b91ea0347a648f8bc..708833d3389b822c08c107d513a79762b50dcec0 100644
|
||||
index fd6f948adb975f09b07ad7692c6a716616600ccc..2562907dd19c4027a5d9928506db8bfd7495c06f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1377,7 +1377,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 7777fad24d4d4e1ef623bbddf4657fa945a8b113..a2b77ca661205e14e6794533de3e66130f7be683 100644
|
||||
index e53f086238977320bdbb98547b5dda93a4e6581e..b5b130785cb0009f58b65b1cc4dba9f006ba1d7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1762,6 +1762,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1763,6 +1763,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
ItemStack itemstack = this.player.getItemInHand(enumhand);
|
||||
BlockHitResult movingobjectpositionblock = packet.getHitResult();
|
||||
Vec3 vec3d = movingobjectpositionblock.getLocation();
|
||||
|
@ -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 a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a83647830 100644
|
||||
index b5b130785cb0009f58b65b1cc4dba9f006ba1d7a..4e356271ba54d51c4778314c86495136bfbd8704 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -343,7 +343,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -344,7 +344,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -362,7 +362,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -363,7 +363,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -384,7 +384,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -385,7 +385,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
} else {
|
||||
if (elapsedTime >= 15000L) { // 15 seconds
|
||||
@@ -414,7 +414,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -415,7 +415,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
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 a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
|
||||
this.chatPreviewThrottler.tick();
|
||||
@@ -440,14 +440,22 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -441,14 +441,22 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
public void disconnect(String s) {
|
||||
// Paper start
|
||||
@ -122,7 +122,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
// Paper end
|
||||
// CraftBukkit start - fire PlayerKickEvent
|
||||
if (this.processedDisconnect) {
|
||||
@@ -455,7 +463,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -456,7 +464,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
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
|
||||
|
||||
@ -131,7 +131,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -532,7 +540,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -533,7 +541,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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())) {
|
||||
@ -140,7 +140,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
} else {
|
||||
Entity entity = this.player.getRootVehicle();
|
||||
|
||||
@@ -783,13 +791,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -784,13 +792,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // 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
|
||||
@ -156,7 +156,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -942,7 +950,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -943,7 +951,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// 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());
|
||||
@ -165,7 +165,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed
|
||||
@@ -1107,7 +1115,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1108,7 +1116,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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!");
|
||||
@ -174,7 +174,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
byteTotal += byteLength;
|
||||
@@ -1130,14 +1138,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1131,14 +1139,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
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());
|
||||
@ -191,7 +191,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
this.lastBookTick = MinecraftServer.currentTick;
|
||||
@@ -1259,7 +1267,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1260,7 +1268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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))) {
|
||||
@ -200,7 +200,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
} else {
|
||||
ServerLevel worldserver = this.player.getLevel();
|
||||
|
||||
@@ -1686,7 +1694,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1687,7 +1695,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.dropCount++;
|
||||
if (this.dropCount >= 20) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
|
||||
@ -209,7 +209,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1894,7 +1902,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1895,7 +1903,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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());
|
||||
@ -218,7 +218,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
// Paper start
|
||||
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()];
|
||||
@@ -2007,7 +2015,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2008,7 +2016,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.player.resetLastActionTime();
|
||||
} else {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
|
||||
@ -227,7 +227,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2020,7 +2028,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2021,7 +2029,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.getMessage())) {
|
||||
@ -236,7 +236,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
} else {
|
||||
if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) {
|
||||
// CraftBukkit start
|
||||
@@ -2303,7 +2311,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2304,7 +2312,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
Waitable waitable = new Waitable() {
|
||||
@Override
|
||||
protected Object evaluate() {
|
||||
@ -245,7 +245,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -2318,7 +2326,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2319,7 +2327,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} else {
|
||||
@ -254,7 +254,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -2536,7 +2544,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2537,7 +2545,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Spigot Start
|
||||
if ( entity == this.player && !this.player.isSpectator() )
|
||||
{
|
||||
@ -263,7 +263,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
// Spigot End
|
||||
@@ -2629,7 +2637,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2630,7 +2638,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
// CraftBukkit end
|
||||
} else {
|
||||
@ -272,7 +272,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
|
||||
}
|
||||
}
|
||||
@@ -3035,7 +3043,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3036,7 +3044,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// 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) {
|
||||
@ -281,7 +281,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3226,7 +3234,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3227,7 +3235,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
} else if (!this.isSingleplayerOwner()) {
|
||||
// Paper start - This needs to be handled on the main thread for plugins
|
||||
server.submit(() -> {
|
||||
@ -290,7 +290,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
});
|
||||
// Paper end
|
||||
}
|
||||
@@ -3272,7 +3280,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3273,7 +3281,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
|
||||
@ -299,7 +299,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
} else if (packet.identifier.equals(CUSTOM_UNREGISTER)) {
|
||||
try {
|
||||
@@ -3282,7 +3290,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3283,7 +3291,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
|
||||
@ -308,7 +308,7 @@ index a2b77ca661205e14e6794533de3e66130f7be683..805b3e88dce0518fd55c3b6f45a70e5a
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
@@ -3300,7 +3308,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3301,7 +3309,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@ -342,7 +342,7 @@ index a4278a4ca0b41813b8f88d01dcc8d75b4f458908..be163c1cc4c8982b89be86c004299cdc
|
||||
// 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 708833d3389b822c08c107d513a79762b50dcec0..294b7c0ad1e0088307baecbab5ad33f897be5bcd 100644
|
||||
index 2562907dd19c4027a5d9928506db8bfd7495c06f..dc0c689864fb312ebdbc742561d73837229947cc 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 805b3e88dce0518fd55c3b6f45a70e5a83647830..143d364db73114cba2601ee117a1a80d19a922c5 100644
|
||||
index 4e356271ba54d51c4778314c86495136bfbd8704..3ebd5dc1df6fc637fe3350caa2cb069c15405737 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1145,7 +1145,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1146,7 +1146,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Paper end
|
||||
// CraftBukkit start
|
||||
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
|
||||
|
@ -5,14 +5,14 @@ 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 143d364db73114cba2601ee117a1a80d19a922c5..692108b8edb33775687e5cdee3478b5e53da4cf9 100644
|
||||
index 3ebd5dc1df6fc637fe3350caa2cb069c15405737..0e5d424c5af7429a95a5906572b5ff0fbb221dd4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2436,7 +2436,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2437,7 +2437,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
// Arm swing animation
|
||||
- PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer());
|
||||
- PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer(), (packet.getHand() == InteractionHand.MAIN_HAND) ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING);
|
||||
+ io.papermc.paper.event.player.PlayerArmSwingEvent event = new io.papermc.paper.event.player.PlayerArmSwingEvent(this.getCraftPlayer(), packet.getHand() == InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND); // Paper
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
|
@ -17,10 +17,10 @@ index f5b37334d21c3c3812b4f343e5af17234dd9f907..5db3349f4e366caef84b0d1e811c031e
|
||||
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 692108b8edb33775687e5cdee3478b5e53da4cf9..5e8e36711eac7b471f1b4fbd8920eaad0a6f46b4 100644
|
||||
index 0e5d424c5af7429a95a5906572b5ff0fbb221dd4..853e7edbb977394d2860ce3f63e4712c921bc741 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -473,7 +473,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -474,7 +474,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Do not kick the player
|
||||
return;
|
||||
}
|
||||
@ -28,7 +28,7 @@ index 692108b8edb33775687e5cdee3478b5e53da4cf9..5e8e36711eac7b471f1b4fbd8920eaad
|
||||
// Send the possibly modified leave message
|
||||
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
|
||||
// CraftBukkit end
|
||||
@@ -482,7 +481,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -483,7 +482,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> {
|
||||
this.connection.disconnect(ichatbasecomponent);
|
||||
});
|
||||
@ -37,7 +37,7 @@ index 692108b8edb33775687e5cdee3478b5e53da4cf9..5e8e36711eac7b471f1b4fbd8920eaad
|
||||
this.connection.setReadOnly();
|
||||
MinecraftServer minecraftserver = this.server;
|
||||
Connection networkmanager = this.connection;
|
||||
@@ -1927,6 +1926,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1928,6 +1927,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void onDisconnect(Component reason) {
|
||||
@ -49,7 +49,7 @@ index 692108b8edb33775687e5cdee3478b5e53da4cf9..5e8e36711eac7b471f1b4fbd8920eaad
|
||||
// CraftBukkit start - Rarely it would send a disconnect line twice
|
||||
if (this.processedDisconnect) {
|
||||
return;
|
||||
@@ -1943,7 +1947,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1944,7 +1948,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
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 5e8e36711eac7b471f1b4fbd8920eaad0a6f46b4..f77926fa842d681be3c6a0bcfa3d4fbaf42dc85a 100644
|
||||
index 853e7edbb977394d2860ce3f63e4712c921bc741..b23e649f3833ef323643ba4c2b209a7ceca44e6f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -412,7 +412,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -413,7 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
--this.dropSpamTickCount;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ index f02fb03c63975e5c1ccdd848f5727559929cce00..8564ecd20578d907bcfa1b9c149da22e
|
||||
int k = entity.getRemainingFireTicks();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 090c0cd38877ec06faa1e0ac43389a68c7153dac..389bf0d695dccb1d2547d61d62be97376e2505f9 100644
|
||||
index 7570d5254b5807e967e7ab2560f091a9d601a876..1d8ec0f85ec42f2dcd9405df83b526ae1c59de6f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -978,7 +978,7 @@ public class CraftEventFactory {
|
||||
@ -84,8 +84,8 @@ index 090c0cd38877ec06faa1e0ac43389a68c7153dac..389bf0d695dccb1d2547d61d62be9737
|
||||
}
|
||||
event.setCancelled(cancelled);
|
||||
|
||||
@@ -1005,7 +1005,7 @@ public class CraftEventFactory {
|
||||
cause = DamageCause.THORNS;
|
||||
@@ -1007,7 +1007,7 @@ public class CraftEventFactory {
|
||||
cause = DamageCause.SONIC_BOOM;
|
||||
}
|
||||
|
||||
- return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled);
|
||||
@ -93,7 +93,7 @@ index 090c0cd38877ec06faa1e0ac43389a68c7153dac..389bf0d695dccb1d2547d61d62be9737
|
||||
} else if (source == DamageSource.OUT_OF_WORLD) {
|
||||
EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, modifiers, modifierFunctions);
|
||||
event.setCancelled(cancelled);
|
||||
@@ -1075,7 +1075,7 @@ public class CraftEventFactory {
|
||||
@@ -1077,7 +1077,7 @@ public class CraftEventFactory {
|
||||
} else {
|
||||
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager.getHandle(), source.msgId));
|
||||
}
|
||||
@ -102,7 +102,7 @@ index 090c0cd38877ec06faa1e0ac43389a68c7153dac..389bf0d695dccb1d2547d61d62be9737
|
||||
event.setCancelled(cancelled);
|
||||
CraftEventFactory.callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@@ -1120,20 +1120,28 @@ public class CraftEventFactory {
|
||||
@@ -1122,20 +1122,28 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
if (cause != null) {
|
||||
|
@ -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 f77926fa842d681be3c6a0bcfa3d4fbaf42dc85a..522d6e59038db276238720d828e8949bbeba88d2 100644
|
||||
index b23e649f3833ef323643ba4c2b209a7ceca44e6f..8668da69741354a4908179935ec5fb164d8fce0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -801,6 +801,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -802,6 +802,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
|
@ -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 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf462510218a 100644
|
||||
index 8668da69741354a4908179935ec5fb164d8fce0f..5927035f616f341f1d28b569efaf7812e4aa6880 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -613,7 +613,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -614,7 +614,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return;
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
|
||||
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
|
||||
@@ -621,6 +621,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -622,6 +622,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
boolean flag1 = entity.verticalCollisionBelow;
|
||||
|
||||
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
@ -26,7 +26,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
double d11 = d7;
|
||||
|
||||
d6 = d3 - entity.getX();
|
||||
@@ -634,16 +635,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -635,16 +636,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
boolean flag2 = false;
|
||||
|
||||
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
|
||||
@ -54,7 +54,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
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));
|
||||
@@ -729,7 +738,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -730,7 +739,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
private boolean noBlocksAround(Entity entity) {
|
||||
@ -88,7 +88,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1281,7 +1315,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1282,7 +1316,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
@ -97,7 +97,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
||||
}
|
||||
@@ -1375,7 +1409,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1376,7 +1410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
|
||||
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
|
||||
@@ -1416,6 +1450,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1417,6 +1451,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
boolean flag1 = this.player.verticalCollisionBelow;
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
|
||||
@ -114,7 +114,7 @@ index 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
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) {
|
||||
@@ -1435,12 +1470,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1436,12 +1471,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 522d6e59038db276238720d828e8949bbeba88d2..b93e6c14141f3ed3bc74c786eb56cf46
|
||||
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
|
||||
@@ -1526,6 +1572,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1527,6 +1573,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Kick on main for illegal chars
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b93e6c14141f3ed3bc74c786eb56cf462510218a..fa4a5dc33887e403330933c2d00adb0220e5cc2d 100644
|
||||
index 5927035f616f341f1d28b569efaf7812e4aa6880..6a83e098ebbf9ccde9c0726981393a376d99ab34 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2104,7 +2104,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2105,7 +2105,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.getMessage())) {
|
||||
@ -18,7 +18,7 @@ index b93e6c14141f3ed3bc74c786eb56cf462510218a..fa4a5dc33887e403330933c2d00adb02
|
||||
} else {
|
||||
if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) {
|
||||
// CraftBukkit start
|
||||
@@ -2120,7 +2122,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2121,7 +2123,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@Override
|
||||
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
||||
|
@ -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 fa4a5dc33887e403330933c2d00adb0220e5cc2d..017af52a19803868fb271de96dadae3c3052b30a 100644
|
||||
index 6a83e098ebbf9ccde9c0726981393a376d99ab34..3c3b2530faa3f4b1da21d2e1f383706a64db1d01 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -543,6 +543,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -544,6 +544,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
} 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 017af52a19803868fb271de96dadae3c3052b30a..6ead29b444ede7fef2b58443b32b2046f250363e 100644
|
||||
index 3c3b2530faa3f4b1da21d2e1f383706a64db1d01..01d634fc6ec59e97b7a35b243044f0e7a677dc8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3173,7 +3173,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3174,7 +3174,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
if (!itemstack.isEmpty() && nbttagcompound != null && nbttagcompound.contains("x") && nbttagcompound.contains("y") && nbttagcompound.contains("z") && this.player.getBukkitEntity().hasPermission("minecraft.nbt.copy")) { // Spigot
|
||||
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
|
||||
|
@ -18,10 +18,10 @@ index c96bc85b8de905c1f8112a26dca644775c619a64..afc16bd5a2056d1ee8ce290ec1a6f67c
|
||||
|
||||
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 6ead29b444ede7fef2b58443b32b2046f250363e..567a553fa34936659d2c90208e0d015c8c44a541 100644
|
||||
index 01d634fc6ec59e97b7a35b243044f0e7a677dc8c..0b74c52a2b138862335013846277064e6ad00047 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2782,7 +2782,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2783,7 +2783,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
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 567a553fa34936659d2c90208e0d015c8c44a541..ae1e15c92e67e64978cbf92be9b9f19b5d803286 100644
|
||||
index 0b74c52a2b138862335013846277064e6ad00047..a9193fcd719e403e4b821a2a0cf22fe2a8490943 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3351,6 +3351,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3352,6 +3352,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@Override
|
||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Add support for Proxy Protocol
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 16998a864e1c82bf4c1e1e08c0ebeb820ff33e59..91fa33c642547e84b7af9046938f30aed0e0c16a 100644
|
||||
index 16998a864e1c82bf4c1e1e08c0ebeb820ff33e59..eefbd0a742b5875e0e9826b87c6bd4da66b2d7f7 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -22,6 +22,7 @@ dependencies {
|
||||
*/
|
||||
implementation("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - implementation
|
||||
annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - Needed to generate meta for our Log4j plugins
|
||||
+ implementation("io.netty:netty-codec-haproxy:4.1.76.Final")
|
||||
+ implementation("io.netty:netty-codec-haproxy:4.1.77.Final")
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||
implementation("org.apache.logging.log4j:log4j-slf4j18-impl:2.17.1") // Paper
|
||||
|
@ -47,10 +47,10 @@ index 3825aa2c381a3ee77e05bea520ff5fb828733857..4e9832d5753b98621e68246ffc5d80c8
|
||||
|
||||
public String getMessage() {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ae1e15c92e67e64978cbf92be9b9f19b5d803286..92defe9bcaff461c41fabf7db706141011c1141d 100644
|
||||
index a9193fcd719e403e4b821a2a0cf22fe2a8490943..03507b5ac5908962e9ebc4b98f53f23110573baa 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2103,11 +2103,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2104,11 +2104,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleChat(ServerboundChatPacket packet) {
|
||||
@ -62,7 +62,7 @@ index ae1e15c92e67e64978cbf92be9b9f19b5d803286..92defe9bcaff461c41fabf7db7061410
|
||||
// CraftBukkit end
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.getMessage())) {
|
||||
this.server.scheduleOnMain(() -> { // Paper - push to main for event firing
|
||||
@@ -2117,8 +2112,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2118,8 +2113,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) {
|
||||
// CraftBukkit start
|
||||
// this.filterTextPacket(packetplayinchat.getMessage(), (filteredtext) -> {
|
||||
@ -78,7 +78,7 @@ index ae1e15c92e67e64978cbf92be9b9f19b5d803286..92defe9bcaff461c41fabf7db7061410
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -2132,8 +2134,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2133,8 +2135,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"));
|
||||
}); // Paper - push to main for event firing
|
||||
} else {
|
||||
@ -89,7 +89,7 @@ index ae1e15c92e67e64978cbf92be9b9f19b5d803286..92defe9bcaff461c41fabf7db7061410
|
||||
// CraftBukkit start
|
||||
// CommandListenerWrapper commandlistenerwrapper = this.player.createCommandSourceStack().withSigningContext(serverboundchatcommandpacket.signingContext(this.player.getUUID()));
|
||||
|
||||
@@ -2146,6 +2149,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2147,6 +2150,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
this.detectRateSpam(true, "/" + packet.command()); // Spigot
|
||||
// CraftBukkit end
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 4b08dbc5ce3ddb031df2cff7be350842670f1929
|
||||
Subproject commit 0a4b84d68e478de6751678238f1d18200ba51bf9
|
@ -1 +1 @@
|
||||
Subproject commit 50ef122ef8f56e7e36860e94e6e0d986165fb30e
|
||||
Subproject commit 576a0370445b9c1344b337c02d955142d9004162
|
Loading…
Reference in New Issue
Block a user