3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Small PPS change to allow %pps to be used as a placeholder.

Dieser Commit ist enthalten in:
Myles 2016-06-22 21:31:27 +01:00
Ursprung 32c43e6023
Commit 808a9a7d82
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -464,7 +464,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
// Max PPS Checker
if (conf.getMaxPPS() > 0) {
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
}
}
@ -482,7 +482,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
}
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
}
}

Datei anzeigen

@ -20,9 +20,9 @@ send-supported-versions: false
# Anti-Cheat, Packets Per Second (PPS) limiter
# 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.
max-pps: 400
max-pps: 600
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.