1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-17 10:41:41 +01:00

ratelimited packet is logged to console on kick ()

This commit is contained in:
Samir 2023-06-21 09:36:14 -04:00
parent 03bf77cebd
commit 97487ac8bb

View file

@ -85,6 +85,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ case DROP:
+ return;
+ case KICK:
+ String deobfedPacketName = io.papermc.paper.util.ObfHelper.INSTANCE.deobfClassName(check.getName());
+ String playerName = this.getPlayer() == null ? "Player (null)" : this.getPlayer().getName().getString();
+ Connection.LOGGER.warn("{} kicked for packet spamming: {}", playerName, deobfedPacketName.substring(deobfedPacketName.lastIndexOf(".") + 1));
+ this.killForPacketSpam();
+ return;
+ }