Skip to main content

Player bug reports and suggestions

Your mod decides where players report from, like a command or a button in your config screen. Each report becomes its own issue in your dashboard, with the same game details and breadcrumbs as an error.

ExampleMod.NITEA.reportBug(textFromPlayer);
ExampleMod.NITEA.reportSuggestion(textFromPlayer);
note

Player reports need the player to have allowed Nitea reports. Unlike errors, they're never held back until the player chooses: if reporting isn't allowed, nothing is sent, the method returns null and the log says so. Check NITEA.isEnabled() first to tell the player.

Completing the report​

If your project has a public page, Nitea gets back a one-time link where the player adds a description, steps to reproduce and screenshots. Once they publish it, the report appears on your roadmap. Reports the player doesn't complete stay private in your dashboard.

On the client, Nitea opens the link in the player's browser. Turn it off with .openReportLinks(false) if you'd rather show the link yourself.

The link expires after a while, so show it right away.

Example: a /examplemod bug command​

On NeoForge (Forge and Fabric register commands through their own event and callback, the command itself is the same):

@SubscribeEvent
public static void onRegisterCommands(RegisterCommandsEvent event) {
event.getDispatcher().register(Commands.literal("examplemod")
.then(Commands.literal("bug")
.then(Commands.argument("text", StringArgumentType.greedyString())
.executes(ctx -> {
ServerPlayer player = ctx.getSource().getPlayerOrException();
String text = StringArgumentType.getString(ctx, "text");
if (!ExampleMod.NITEA.isEnabled()) {
player.sendSystemMessage(Component.literal("Allow Nitea reports on the title screen to send bug reports."));
return 0;
}
ExampleMod.NITEA.reportBug(text, link -> ctx.getSource().getServer().execute(() ->
player.sendSystemMessage(Component.literal("Finish your report: " + link))));
return 1;
}))));
}

Turning reports off​

Stop accepting player reports with Accept player reports in the project's settings.