Skip to content

Integrations

Pavel Erokhin edited this page Nov 9, 2026 · 6 revisions

Mo’Afks works alone. Each plugin on this page adds something when it’s installed, and nothing breaks without it.

PlaceholderAPI

With PlaceholderAPI installed, Mo’Afks adds:

Placeholder Shows
%moafks_afk% Whether the player is AFK, as PlaceholderAPI’s true or false
%moafks_afk_time% Seconds in the current AFK spell, 0 when not AFK
%moafks_afk_total% Seconds AFK across all sessions, so you can leave it out of play time
%moafks_reason% The reason given to /afk, or nothing
%moafks_tag% The effects.nickname.mark while AFK, otherwise nothing

The other way round, write <papi:name> in any message to show %name% for the player it’s about: <papi:luckperms_prefix><player>. Mo’Afks doesn’t look for %…% in your text, so a percent sign stays a percent sign. Without PlaceholderAPI the tags show nothing.

TAB

TAB formats the player list and overwrites Mo’Afks’ [AFK] mark. To show the mark through TAB:

  1. Install PlaceholderAPI.

  2. Set effects.nickname.enabled: false in Mo’Afks’ config.yml.

  3. Put %moafks_tag% into TAB’s prefix, in groups.yml:

    _DEFAULT_:
      tabprefix: "%moafks_tag%"
  4. Run /moafks reload and /tab reload.

TAB also runs the players’ teams. Mo’Afks turns collision off for AFK players through TAB’s API, so other players walk through them.

MiniPlaceholders

MiniPlaceholders does for MiniMessage what PlaceholderAPI does for %…% text. With it installed, Mo’Afks adds <moafks_afk>, <moafks_afk_time>, <moafks_afk_total>, <moafks_reason>, and <moafks_tag>: the same values as the PlaceholderAPI ones, for the player they’re shown for.

The other way round, any MiniPlaceholders tag works in Mo’Afks’ messages and fills in for the player the message is about, like <player_name>.

Plan

With Plan installed, Mo’Afks shows up on its pages:

  • Plugins Overview on the server page: how many players are AFK now, and a table of them with how long and why.
  • Plugins Overview also adds the server’s totals: time AFK, times AFK, and how many of those were with /afk and by idling.
  • A player’s Plugins tab: AFK now and why, the time AFK across all sessions, how many times they went AFK, and how many of those were with /afk and by idling.
  • The players table: two columns, AFK now and time AFK.

Plan counts AFK time as play time. Subtract Mo’Afks’ number to see time really played. Plan reads these values when a player joins or leaves, every few minutes, and whenever someone goes AFK or comes back. The count of times AFK starts with 2.1.0, the split into /afk and idling with 2.3.0. The time AFK goes back as far as Mo’Afks has counted it. Since 2.3.0 Plan knows these numbers for offline players too: Mo’Afks keeps them in plugins/MoAfks/stats.yml.

WorldAPI

With WorldAPI 4.5.0 or newer installed, Mo’Afks shares its numbers under /api/v1/extensions/moafks. Every resource is public, unless you list moafks in WorldAPI’s extensions.private. An older WorldAPI gets nothing from Mo’Afks 2.4.0, and the log says so in one line. GET /api/v1/extensions describes each resource: its parameters and the fields it answers with.

Path What it returns
stats The server’s totals: afkNow, players, entries (times AFK), manual and auto (with /afk and by idling, since 2.3.0), seconds and minutes AFK
afk Players AFK now: uuid, name, since, seconds, kind (manual or auto), and reason
players/{player} One player by UUID or name: afk, kind, reason, entries, manual, auto, seconds, minutes, and rank by time AFK
leaderboards/time, leaderboards/entries Players by time AFK in seconds, or by times AFK, shaped like WorldAPI’s own leaderboards. ?limit=1..500, 10 by default. Another board answers 400

Vanished players stay out of everything about now. Their spell counts once it ends.

With WorldAPI 4.6.0 or newer, a client with players:moderate, like the MCP server, can also put a player into AFK and take them out. Both answer with player, afk, changed, reason, since, and seconds, and WorldAPI’s audit log keeps every call:

Action What it does
POST players/{player}/afk Puts an online player into AFK, as /afk [reason] does. The body may carry reason, cut to manual.reason_length. Anti-abuse still applies: a refusal answers 400 with why. A player already AFK stays as they are, with changed: false
DELETE players/{player}/afk Takes an online player out of AFK, as acting does: they hear they’re back, and a spot that hurts moves them. A player who isn’t AFK gets changed: false

A player who isn’t online answers 404. On WorldAPI 4.5 the resources above work, these two don’t exist, and the log asks for 4.6.0 in one line.

Grafana

Each release carries moafks.json, a Grafana dashboard over WorldAPI’s moafks resources: AFK now, times AFK and how, time AFK, and the two boards. It needs the Infinity data source with your WorldAPI’s /api/v1 as its URL. Import the file and pick that data source in the worldapi variable. minecraft-grafana shows how to set one up.

Allay

With Allay 6.33 or newer installed, players can ask the AI helper about AFK, and Allay reads this server’s own settings instead of guessing. It gets three tools and a few lines on how Mo’Afks works:

Tool Who may use it What it does
afk Everyone, in /askall too Who is AFK now, since when, and whether by /afk or by idling. The reason comes as the player’s own words, and never in /askall, where everyone reads the answer
afk_rules Everyone, in /askall too This server’s rules: seconds until auto-AFK, the kick limit and its warnings, the protections, when going AFK is refused, whether AFK players pick up items, whether they count for sleeping, and what brings a player back
go_afk The asker, with moafks.afk, never in /askx Puts the asker into AFK, as /afk [reason] does, with a reason of up to 64 characters if they gave one

Asking is activity: the chat line or /ask ends AFK. So go_afk starts AFK on the next tick, after the question, and the question doesn’t undo it. Anything the player does afterwards, another question included, brings them back. Anti-abuse still applies: in a fight, while falling, or with a mob after them, Allay says why not and when to try again. Vanished players never show, and Allay names other players only as its own privacy rules allow.

With an older Allay, Mo’Afks runs as before and logs one warning. To leave Mo’Afks out of Allay, list moafks in Allay’s expansions.disabled.

Vanish plugins

SuperVanish, PremiumVanish, Essentials, and any vanish plugin that marks hidden players the usual way work without setup. How AFK works explains what stays hidden.

Next: FAQ

Clone this wiki locally