@bdsx/tps
Version:
Adds a simple command to check server TPS! Using a Rust hooking DLL to handle the calculation for the smallest overhead
14 lines (11 loc) • 396 B
text/typescript
import {command} from "bdsx/command";
import {getTps} from "./NativeModule";
import {events} from "bdsx/event";
events.serverOpen.on(() => {
command
.register('tps', 'Shows you the current TPS!')
.overload((_p, _o, output) => {
const tps = getTps();
output.success(`The server is currently running at ${tps}/20 tps!`);
}, {})
})