Modules1 min read
Suspect tools
Freeze screen, screenshot and mod-list requests on the suspect's client.
suspect:1Tier D · Shares dataGood for
- Screensharing without third-party tools
- A freeze screen players cannot miss
- Checking for banned mods with the player's consent
Try it in game, no code
/tehoapi freeze NotchSuspect tools act on the client of the player you are investigating, not the moderator's. Freezing needs no consent. Screenshots and mod lists share data, so the suspect is asked every time and can decline; a decline comes back as granted() == false.
Freeze
teho.suspect().freeze("You are frozen", "Do not log out. A moderator will speak to you.");
teho.suspect().unfreeze();The client shows a full-screen overlay with your text. Movement itself is frozen on the server by the Bukkit staff kit, so freeze the player server-side too if you call this from your own code. frozen() tells you whether the overlay is up.
Screenshot
teho.suspect().screenshot("Screenshare for reach report", 1280).thenAccept(shot -> {
if (!shot.granted()) {
staff.sendMessage(name + " declined the screenshot");
return;
}
Files.write(folder.resolve(name + "-" + System.currentTimeMillis() + ".png"), shot.png());
});The second argument caps the width in pixels. The reply has png(), width() and height(). The Bukkit kit saves its own requests under plugins/TehoAPI/screenshots/.
Mod list
teho.suspect().modList("Mod check").thenAccept(result -> {
if (result.granted()) {
result.mods().forEach(mod -> staff.sendMessage(mod.name() + " " + mod.version()));
staff.sendMessage("Teho modules on: " + result.tehoModules());
}
});To check against a deny list without seeing the full list, use the third-party mod policy instead.