Are you sick of players turning your awesome server into a NSFW gallery? Do you wish to bring back your logic displays without the fear of seing anime girls in questionable positions? Well, worry no more, xpdustry cooked another plugin just for this situation.
Introducing nohorny, the successor of BMI. This project consists of a Mindustry plugin client that automatically tracks logic displays and canvases, and a standalone classification server that processes them, for automatic NSFW moderation.
Enjoy this family friendly factory building game as the cat intended it to be.
This plugin requires at least:
- Mindustry 157
- Java 25
- SLF4MD latest (optional)
Put nohorny-client.jar (and slf4md.jar if needed) in your config/mods directory and start your mindustry server.
Now, players placing unsafe buildings will be automatically banned. Then the buildings will be deleted and refunded to the player's team.
You can configure nohorny using the Mindustry built-in config command, with config key value.
| Key | Description | Default |
|---|---|---|
nohorny-api-endpoint |
Base URL used by the plugin. The client resolves status and classify relative to it. |
https://nohorny.xpdustry.com/api |
nohorny-api-auth-type |
HTTP auth mode for the API. Valid values: DISABLED, BASIC, BEARER. |
DISABLED |
nohorny-api-auth-value |
Auth payload. For BASIC, use username:password. For BEARER, use the raw token. |
empty |
nohorny-automod-policy |
The policy to apply when a group of buildings is classified. | BAN_NSFW |
nohorny-discord-webhook |
Discord webhook used to report unsafe buildings. | empty |
nohorny-discord-webhook-name |
Username used for messages sent through the Discord webhook. | NoHorny |
nohorny-debug-tap |
Enables admin double-tap debugging for tracked displays and canvases. | false |
| Policy | Behavior |
|---|---|
DISABLED |
No action taken. |
DELETE_NSFW |
Delete buildings rated NSFW. |
DELETE_WARN |
Delete buildings rated WARN or NSFW. |
BAN_NSFW |
Ban the author and delete buildings rated WARN or NSFW. |
Set nohorny-discord-webhook to a discord webhook url, such as https://discord.com/api/webhooks/999999/abcdefgh.
Nohorny will automatically try to validate it.
If all goes well, you will see a success message in your webhook channel.
Set nohorny-debug-tap to true to enable admin-only debugging. When enabled, double-tapping a tracked display or
canvas group labels the detected group in-game, then creates a PNG render and binary dump in config/mods/nohorny/debug/.
You can integrate your plugin with the nohorny client by just adding the following to your build.gradle:
repositories {
maven { url = uri("https://maven.xpdustry.com/releases") }
}
dependencies {
compileOnly("com.xpdustry:nohorny-common:VERSION")
compileOnly("com.xpdustry:nohorny-client:VERSION")
}You will then be able to:
- Subscribe to classifications events to handle unsafe buildings with your own logic:
import arc.Events;
import mindustry.mod.Plugin;
public final class MyPlugin extends Plugin {
@Override
public void init() {
Events.on(ClassificationEvent.class, event -> {
System.out.println(
"The group at " + event.group().x() + ", " + event.group().y() + " has been classified");
});
}
}- Programmatically configure nohorny using its setting system:
import com.xpdustry.nohorny.client.AutoModeratorPolicy;
import com.xpdustry.nohorny.client.NoHornyClientAuthType;
import com.xpdustry.nohorny.client.NoHornySetting;
import java.net.URI;
import mindustry.mod.Plugin;
public final class MyPlugin extends Plugin {
@Override
public void init() {
NoHornySetting.API_AUTH_TYPE.set(NoHornyClientAuthType.BEARER);
NoHornySetting.API_AUTH_VALUE.set("my-token");
NoHornySetting.API_ENDPOINT.set(URI.create("https://localhost:8080"));
NoHornySetting.AUTOMOD_POLICY.set(AutoModeratorPolicy.DELETE_WARN);
}
}This is a standalone Java application requiring:
- Java 25
Then, you can simply run java -jar nohorny-server.jar.
See nohorny-server/src/main/resources/application.yaml.
Then, you can configure the server using:
- An
application.yamlfile
# application.yaml
server:
port: 9090- Env variables
SERVER_PORT=9090 java -jar nohorny-server.jar
- Or jvm properties
java -jar nohorny-server.jar --server.port=9090
-
./gradlew shadowJarto compile all modules into jars atnohorny-client/build/libs/nohorny-client.jarandnohorny-server/build/libs/nohorny-server.jar. -
./gradlew runMindustryServerto run the client plugin in a local Mindustry server. -
./gradlew spotlessApplyto apply the code formatting and the license header.
Need a helping hand ? You can talk to the maintainers in the Chaotic Neutral discord in
the #support channel.