Moderation

Server moderation in Nodecraft Studio is simple and easy. We provide tools and endpoints to kick and ban players, add moderators to servers, and make sure rules are read and followed before joining.

Player Endpoints

We provide a few endpoints for getting various players. You can easily get server owner, moderators, online players, recent players, and banned players under a few endpoints. These are all useful and should be used to drive different lists in your UI elements. An example of the UI from the official SDK:

Untitled

Banning and Kicking

After you’ve got a list of players to do actions on them. For kicks you’ll just need to include a list of player IDs, a server ID, a reason ID (this is used for public displaying), and a reason (internal reason only shown to moderators). Then that player is removed from the server and issued a kick. For banning it’s just as simple, though you need to include a date_expires field if you want the ban to be temporary. If you also include a community ID then you can issue a community ban.

For a list of moderation reasons, you’ll want to get the reputation/reasons endpoint and display that list to a user for selecting a reason.

Managing Moderators

Adding or removing moderators is just as easy. You simply make a POST request with a list of player IDs you either want to make or remove as moderator. The assign endpoint will return a list back while the revoke endpoint just returns a success or failure. We recommend just having buttons on the user that you want to modify, much like this:

Untitled