mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Name anti-bot feature explicitly for own rate limiting
This commit is contained in:
@ -81,7 +81,7 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
PacketType packetType = packetEvent.getPacketType();
|
PacketType packetType = packetEvent.getPacketType();
|
||||||
if (packetType == START) {
|
if (packetType == START) {
|
||||||
if (!rateLimiter.tryAcquire()) {
|
if (!rateLimiter.tryAcquire()) {
|
||||||
plugin.getLog().warn("Join limit hit - Ignoring player {}", sender);
|
plugin.getLog().warn("Simple Anti-Bot join limit - Ignoring {}", sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public class ProtocolSupportListener extends JoinManagement<Player, CommandSende
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!rateLimiter.tryAcquire()) {
|
if (!rateLimiter.tryAcquire()) {
|
||||||
plugin.getLog().warn("Join limit hit - Ignoring player {}", loginStartEvent.getConnection());
|
plugin.getLog().warn("Simple Anti-Bot join limit - Ignoring {}", loginStartEvent.getConnection());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class ConnectListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!rateLimiter.tryAcquire()) {
|
if (!rateLimiter.tryAcquire()) {
|
||||||
plugin.getLog().warn("Join limit hit - Ignoring player {}", connection);
|
plugin.getLog().warn("Simple Anti-Bot join limit - Ignoring {}", connection);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user