Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Small PPS change to allow %pps to be used as a placeholder.
Dieser Commit ist enthalten in:
Ursprung
32c43e6023
Commit
808a9a7d82
@ -464,7 +464,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
|
|||||||
// Max PPS Checker
|
// Max PPS Checker
|
||||||
if (conf.getMaxPPS() > 0) {
|
if (conf.getMaxPPS() > 0) {
|
||||||
if (info.getPacketsPerSecond() >= conf.getMaxPPS()) {
|
if (info.getPacketsPerSecond() >= conf.getMaxPPS()) {
|
||||||
info.disconnect(conf.getMaxPPSKickMessage());
|
info.disconnect(conf.getMaxPPSKickMessage().replace("%pps", ((Long) info.getPacketsPerSecond()).intValue() + ""));
|
||||||
return true; // don't send current packet
|
return true; // don't send current packet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -482,7 +482,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (info.getWarnings() >= conf.getMaxWarnings()) {
|
if (info.getWarnings() >= conf.getMaxWarnings()) {
|
||||||
info.disconnect(conf.getMaxWarningsKickMessage());
|
info.disconnect(conf.getMaxWarningsKickMessage().replace("%pps", ((Long) info.getPacketsPerSecond()).intValue() + ""));
|
||||||
return true; // don't send current packet
|
return true; // don't send current packet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,9 @@ send-supported-versions: false
|
|||||||
# Anti-Cheat, Packets Per Second (PPS) limiter
|
# Anti-Cheat, Packets Per Second (PPS) limiter
|
||||||
# Clients by default send around 20-90 packets per second.
|
# Clients by default send around 20-90 packets per second.
|
||||||
|
|
||||||
# What is the maximum per second a client can send
|
# What is the maximum per second a client can send (Use %pps to display their pps)
|
||||||
# Use -1 to disable.
|
# Use -1 to disable.
|
||||||
max-pps: 400
|
max-pps: 600
|
||||||
max-pps-kick-msg: "You are sending too many packets!"
|
max-pps-kick-msg: "You are sending too many packets!"
|
||||||
|
|
||||||
# We can also kick them if over a period they send over a threshold a certain amount of times.
|
# We can also kick them if over a period they send over a threshold a certain amount of times.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren