Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
6b395bde17
Commit
072833f503
@ -2,6 +2,7 @@ package de.steamwar.bausystem.features.script.variables;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.features.loader.Loader;
|
import de.steamwar.bausystem.features.loader.Loader;
|
||||||
|
import de.steamwar.bausystem.features.tpslimit.FreezeUtils;
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSLimitUtils;
|
import de.steamwar.bausystem.features.tpslimit.TPSLimitUtils;
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
||||||
import de.steamwar.bausystem.features.tracer.record.ActiveTracer;
|
import de.steamwar.bausystem.features.tracer.record.ActiveTracer;
|
||||||
@ -275,7 +276,10 @@ public class Constants {
|
|||||||
});
|
});
|
||||||
|
|
||||||
CONSTANTS.put("tps", player -> {
|
CONSTANTS.put("tps", player -> {
|
||||||
return new ConstantDoubleValue(TPSWatcher::getTPS);
|
return new ConstantDoubleValue(() -> {
|
||||||
|
if (FreezeUtils.isFrozen()) return 0.0;
|
||||||
|
return TPSWatcher.getTPS();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
CONSTANTS.put("tps_limit", player -> {
|
CONSTANTS.put("tps_limit", player -> {
|
||||||
return new ConstantDoubleValue(TPSLimitUtils::getCurrentTPSLimit);
|
return new ConstantDoubleValue(TPSLimitUtils::getCurrentTPSLimit);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren