Minecraft
Integration Guide

Perspective API for Minecraft: replace it before December 31

Some Minecraft chat plugins send every message to Google's Perspective API to score toxicity. Perspective shuts down after December 31, 2026, so on January 1 that AI check stops returning scores and your server is back to word lists.

Paxmod is a chat moderation API built for game chat. It already runs on custom Minecraft servers and Roblox games. This page shows which Minecraft plugins use Perspective and how to move your server chat to Paxmod with a small chat listener.

Looking for the camera mod?

"Perspective API" is also the name of a client-side Minecraft camera mod by Leawind on Modrinth. This page is about Google's Perspective API, the toxicity scoring service for chat. Perspective API camera mod

Minecraft plugins that use Perspective API

  • ChatProtect (SpigotMC, by TheTigerPython). Its toxicity check can call Perspective through the usePerspectiveAPI setting in config.yml, with a maxScore threshold. Supports 1.8 to 26.1. View on SpigotMC
  • AutoMod (by NextDevv, on Hangar and Modrinth). Uses Perspective to detect and censor harmful messages, configured with a Perspective API key. View on Hangar
  • Custom server plugins. Plenty of networks wrote their own chat listener against commentanalyzer.googleapis.com. Search your plugins and config for that host or for PERSPECTIVE to find them.

After December 31 these Perspective calls fail. Word-list filters in the same plugins keep working, but the AI toxicity scoring stops.

What changes on January 1

  • Requests to commentanalyzer.googleapis.com stop returning scores.
  • Toxicity checks that relied on Perspective stop flagging. Blacklists, anti-spam and anti-advertising checks that run locally keep working.
  • Google offers no migration path, so you need a new scoring API before the end of the year.

Switch your server chat to Paxmod

  1. 1

    Start a Paxmod trial at paxmod.com (14-day free trial, 10,000 messages, every feature) and create a project. Copy the API key.

  2. 2

    Pick the Gaming chat preset in the console. It includes personal information detection. Check the categories match what your Perspective check covered (see the mapping below).

  3. 3

    Add the chat listener below to your plugin (or a small companion plugin), and put your API key in its config.

  4. 4

    If you use ChatProtect, set usePerspectiveAPI: false so it stops calling Perspective, and keep its blacklist, spam and advertising checks running alongside Paxmod.

  5. 5

    Test on a staging server, then tune category thresholds in the Paxmod console.

Paper / Spigot chat listener

Java 17, Paper or Spigot 1.17+; uses the JDK HttpClient and the Gson bundled with the server

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;

public final class PaxmodChatListener implements Listener {
    private static final HttpClient HTTP = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(2))
            .build();
    private final String apiKey;

    public PaxmodChatListener(String apiKey) {
        this.apiKey = apiKey;
    }

    @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
    public void onChat(AsyncPlayerChatEvent event) {
        if (!event.isAsynchronous()) return;

        JsonObject payload = new JsonObject();
        payload.addProperty("message", event.getMessage());
        payload.addProperty("user_id", event.getPlayer().getUniqueId().toString());
        payload.addProperty("context_id", event.getPlayer().getWorld().getName());

        HttpRequest request = HttpRequest.newBuilder(URI.create("https://www.paxmod.com/api/v1/text"))
                .timeout(Duration.ofSeconds(3))
                .header("Authorization", "Bearer " + apiKey)
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(payload.toString()))
                .build();

        try {
            HttpResponse<String> response = HTTP.send(request, HttpResponse.BodyHandlers.ofString());
            JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
            if (json.has("result") && "flagged".equals(json.get("result").getAsString())) {
                event.setCancelled(true);
                event.getPlayer().sendMessage("Your message was blocked by chat moderation.");
            }
        } catch (Exception e) {
            // Fail open: if Paxmod is unreachable, let the message through.
        }
    }
}

Register it in onEnable() with getServer().getPluginManager().registerEvents(new PaxmodChatListener(getConfig().getString("paxmod-api-key")), this);. On Paper you can use AsyncChatEvent instead; the request is the same.

Perspective attribute to Paxmod category

PerspectivePaxmod
TOXICITYHarassment, Hate and Discrimination, Profanities
SEVERE_TOXICITYThreatening, Violence, Hate and Discrimination
IDENTITY_ATTACKHate and Discrimination
INSULTHarassment
THREATThreatening, Violence
PROFANITYProfanities
SEXUALLY_EXPLICITSexual

If your plugin used a Perspective maxScore such as 0.7, do not copy it across. Start with Paxmod's default thresholds and tune on real chat. Full mapping and code in curl, Node and Python: Perspective API migration guide

Why Paxmod for Minecraft chat

  • Catches what Perspective never looked for. Personal information requests like "where do you live" are flagged, which matters on servers full of kids.
  • Player-aware. Each message carries the player's UUID as user_id, and context_id can be the world, server or channel. Studio adds conversation context, which checks a message against the player's recent history.
  • Built for chat dodgers. Text is normalised before scoring, including Unicode lookalike characters and hidden zero-width characters.
  • Your server rules in plain English. Advanced mode checks messages against a policy you write, for example "no advertising other servers" or "no asking players to move to Discord DMs".
  • One API across games. The same API powers Paxmod's Roblox module and Unity integration. Roblox, Unity
  • COPPA-oriented setup on Enterprise for networks with younger players. COPPA

Pricing

Indie is $29/month with 50,000 message credits, then $0.40 per 1,000, and is built for small games, Roblox and Minecraft servers, and Discord communities. Studio is $149/month with 500,000 credits, then $0.25 per 1,000. Every plan starts with a 14-day free trial: 10,000 messages and every feature.

Frequently Asked Questions

Does Perspective API still work for Minecraft chat plugins?

Until December 31, 2026. Google is sunsetting Perspective API and it stops working after that date, so plugins that call it for toxicity scoring will stop flagging toxic chat.

Which Minecraft plugins use Perspective API?

ChatProtect on SpigotMC can use it through its usePerspectiveAPI setting, and AutoMod by NextDevv on Hangar and Modrinth uses it for AI moderation. Many networks also run custom plugins that call Perspective directly.

Is Paxmod a Minecraft plugin?

Paxmod is an API, not a plugin jar. You call it from a small chat listener in your own plugin, like the example on this page. It already runs on custom Minecraft servers this way.

Is this the Perspective API camera mod?

No. That is a client-side camera mod by Leawind with the same name. This page is about Google's Perspective API, which scores chat messages for toxicity.

Will moderation lag my server?

It will not lag the server. Spigot and Paper fire chat events off the main thread, so the API call does not block ticks. Each chat message waits for the API response before it shows, and the example fails open if the API cannot be reached.

How much does Paxmod cost for a Minecraft server?

The Indie plan is $29/month with 50,000 message credits and is built for small games and Minecraft servers. Every plan starts with a 14-day free trial with 10,000 messages.

Keep your server chat moderated after December 31