fix recipe packet limiter (#9841)

This commit is contained in:
caramel 2023-10-15 23:11:15 +09:00
parent 6dea0a9f7c
commit ee307c382a

View file

@ -28,7 +28,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
+ PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
+ // Paper start
+ if (!org.bukkit.Bukkit.isPrimaryThread()) {
+ if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {