Skip to content
ExtantApePublic

About

Chat circles for family and community Paper servers: players hear their own world plus anyone in a shared circle, with blocked commands, a kind word filter and /circles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Posse

Chat rules for family and community Paper servers. Players hear people in the same world, plus anyone who shares a "circle" with them, so groups such as families or age groups keep their own conversations across every world.

Status: pre-release. Version 0.11.3 closes gaps where home worlds and a paused start failed open, makes the lobby the only place home worlds sends anyone, and adds a circles-only check for other plugins. It passed the unit tests and, on throwaway Paper 26.1.2 and 26.2, every bot suite, apart from the sign, anvil and graves checks, which are skipped. On 26.3 build 272, no leave line was logged in any run, so the checks that expect one fail (the released 0.11.2 does the same there) and the checks that expect none prove nothing. Everything else passed. Walking and damage while a player is held have no bot check. Version 0.11.2 (death and advancement lines, Tab, /list and the server list follow circles) passed the unit tests and every bot suite on throwaway Paper 26.1.2, 26.2 and 26.3, including a new one for those leaks, which 0.11.1 fails. Before that, it passed its acceptance tests on throwaway Paper 26.2 and 26.3 servers, using protocol bots with LuckPerms: chat and private messages for every pair of players, who sees whom in the player list and join messages (presence: reach), home worlds on rejoin, respawn and teleport, replies, blocked commands, the word filter and its bypass, masking adults' words for kids, books, /circles, reloads, a broken config, and 20 bots chatting at once. BlueMapMini's share was tested with a stand-in plugin here; the real BlueMapMini 0.3.0 and Posse 0.5.0 haven't been run together yet. Signs and anvil renames weren't tested. It hasn't been seen in a real game client yet, so the wording and colours haven't been checked by a person. See the live tests and the test audit.

  • Requires Paper 26.1 or newer and Java 25. Paper 1.21.11 and older aren't supported.
  • With no circles set up it changes nothing about who hears whom, so it's safe to install first and configure after.

What it does

Circles. A circle is a permission, posse.circle.<name>, and the circle names are listed in config.yml. A player can be in several. Two players can hear each other if:

  1. they're in the same world group, unless it's a circle-only world, or
  2. they share a circle.

Otherwise they can't. A world group is a world with its Nether and End (survival, survival_nether, survival_the_end), or any set of worlds you list under world-groups.

Circle-only worlds. In these worlds, such as a lobby where new players wait to be approved, being in the same world doesn't count. A player with no circle can't chat, message or write there, and is told why.

What follows the rules:

  • Public chat goes only to the players who can hear you.
  • Private messages (/msg, /tell, /w and the others in private-message-commands) to someone out of reach aren't sent, and you're told who you can talk to instead.
  • /r and /reply are checked again when you reply, because the other player may have moved.
  • Commands that would reach the whole server, /me and /teammsg by default, are off while circles are in use.
  • BlueMapMini's /hud share, if BlueMapMini is installed, goes only to players who could hear you in chat. BlueMapMini keeps sharing off until Posse is 0.5.0 or newer.

Who's online (optional). With presence: reach in config.yml, the player list (Tab) and join and leave messages follow the same rule: you only see players you could chat with. A kid and an adult who share no circle don't see each other online. It's checked on join, leave and world change, and every two seconds for circle changes, so no relog is needed. If the config can't be read at startup, nobody is shown to anyone until it's fixed. The default, presence: everyone, leaves these as in vanilla. With presence: reach:

  • A player's game is told nothing about a player they may not see who is in another world. The game offers every name it has been told when you press Tab, in chat or after a command, so taking a player off the list isn't enough. Two players in the same world who may not see each other, such as strangers in a circle-only lobby, still see each other walk by, name above the head included. They only leave each other's list.
  • /list, in any form, answers like /circles: the players who can hear you. Players with posse.bypass get the server's own list. Other plugins' list commands under other names, such as /who or /online, aren't covered. Add those to blocked-commands.
  • The server list shows the player count and no names, because Posse can't tell who is looking.
  • A returning player whom home worlds has to move is announced once the move is done, for where they end up. If the move fails and they're disconnected, nobody is told they joined or left.

Death and advancement lines. While circles are in use, whatever presence says, a line the server would send to everyone about a player goes only to the players who may reach them, and to the console and log. A death line that names whoever dealt the last blow needs both players in reach. If the config can't be read at startup, only the player themself and players with posse.bypass get the line. The player who died still sees the cause on the death screen. Posse acts on the line as other plugins left it, so a plugin that removes or replaces death lines keeps doing so. A team's death message setting and the show_death_messages game rule still apply.

Names on Tab. While circles are in use, pressing Tab in any command offers only the names of players you may reach. That covers /msg, /tell, /w and their namespaced forms such as minecraft:msg, and every plugin command that offers online players. It's checked on the finished list the server is about to send, so it doesn't matter which plugin made it. A suggestion that isn't a player but is spelled like the name of one out of reach, such as a warp, is left out too. A game also offers the names it already knows without asking the server, which is what presence: reach above closes. With presence: everyone every game knows every name, as in vanilla.

Home worlds (optional). For a server where a kids' group must never end up in an adults' world. Players rejoin where they logged out, and a world plugin often checks access only when you teleport, not when you join. With a home-worlds section in config.yml, Posse keeps players out of worlds their circle doesn't allow:

  • Upgrading: a circle with no entry is now restricted. Before this version, players in such a circle, usually your adults, were left alone. Your adults stay restricted until their circle gets unlimited: true. Add it before you upgrade.

  • Give every circle its own entry, with one of two lines. worlds: [first_world, second_world] limits its players to those worlds. unlimited: true means no limits, so its players are never moved. To change a circle, edit its entry and run /posse reload.

    home-worlds:
      kids:
        worlds: [kids_world, kids_world_nether, lobby_world]
      adults:
        unlimited: true
      no-circle:
        worlds: [station, lobby_world]
  • A player in any unlimited circle has no limits, even if they're in a limited one too. Anyone else may be in every world listed by any of their circles. A kid who logged out in one of them stays where they were.

  • A circle with no entry adds no worlds and lifts no limits. So does an entry with both lines, neither line, or unlimited set to anything but true, and a circle written twice. A new circle you add to a kid therefore can't free them. A player whose circles all add nothing is treated like a player in no circle. The log names each such circle at startup and on reload, and /posse status shows what every circle has.

  • A player in no circle may be in the worlds of the no-circle entry, such as a circle-only station. With no no-circle entry they may be only in the lobby, and with no lobby they are disconnected. That includes a player whose groups your permissions plugin doesn't report. Posse warns at startup when the entry is missing. If staff or adults are in no circle, add no-circle with the worlds they need before you upgrade.

  • Refused at the door. A teleport or portal that would take a player somewhere they may not be is cancelled. So is moving a boat, minecart or mount that carries them, where the server tells plugins about it. If Posse can't work out the answer, it's refused. Posse sends no message of its own for this. If another plugin takes the refusal back or changes the destination afterwards, Posse looks again after the other plugins and refuses it again.

  • Everyone is checked again after /posse reload, so a tighter list applies to people already online. Joins and respawns are checked too, and so is every world change, in case something got past the refusal.

  • Out of the game while a move is pending. From the moment Posse finds a player somewhere they may not be, or holds a new player for the first-join check, until they're somewhere they may be: nobody sees their character, name tag or Tab entry, and they see no other player's. They can't move, chat, run commands, use or change anything, take or deal damage, drop or pick up items, or use inventories. They're taken off whatever they ride and their open inventory is closed. A move that hasn't finished after ten seconds disconnects them.

  • One lobby. Name your server's lobby with lobby-world. A player found anywhere they may not be goes to the lobby's spawn only if the lobby is loaded and in the worlds their group may be in (their circles' lists, or the no-circle list). Put the lobby in each list. Posse never sends anyone to any other world. The main world is used only if it is that lobby. A kid with no bed who dies in their own world usually respawns in the main world, so they go to the lobby too.

  • Otherwise they are disconnected with "Sorry, we couldn't get you to your world. Please join again." That includes the default, lobby-world: "", which names no lobby. Nobody is told they joined or left, and they are never left where they are. The log says why, and /posse status names any world that doesn't exist before anyone needs it. A move that doesn't go through disconnects the player too.

  • Upgrading. Each entry's fallback line from earlier versions does nothing now. The config still loads and Posse warns until you remove it. That entry's message isn't shown while the line is there, because it was written for the old move. A no-circle entry that has only a fallback still allows that one world until you write it under worlds. Set lobby-world and add it to each list, or anyone outside their worlds is disconnected.

  • If another plugin cancels that disconnect, Posse tries again twice a second until the player has gone. Until then they are held: hidden from everyone, with everyone hidden from them, and unable to move, teleport, chat, send messages or commands, write, use or change blocks, take or deal damage through the usual events, drop or pick up items, or use inventories. They reach nobody.

  • Only the moved player gets a short line, such as "Welcome! You're in the lobby." (set per entry with message). Nobody else is told.

It is off unless the home-worlds section is there with something in it, and it needs at least one circle. A section whose only entries can't be used stays on. A mistake in a circle's own entry makes that entry add nothing, with a warning. A circle name that isn't in circles, a section or no-circle entry that can't be read, and a bad lobby-world are config errors, so nothing half-applies. no-circle always needs worlds. unlimited there is ignored with a warning. Not covered: a pending player's screen still shows the world around them, with its signs, builds and animals. The hold works through the server's events, so anything another plugin does for a player without those events isn't stopped. A plugin that also gets in after Posse's last look at a teleport can let it through; the check after the world change then catches it, just after it happens. If Posse is disabled or removed while the server runs, none of these rules apply. Posse also can't see a world that another plugin loads after the player joins. A respawn can't be cancelled. If a player has to be disconnected while respawning, Posse points the respawn back at the world they died in when their group may be there. If neither world is allowed, the server may save them where it respawned them. They're held until they leave and checked again when they next join. If the config can't be read at startup, Posse can't tell who is in which circle, so it refuses joins (see below).

Book authors. A written book shows its author only to the author, players who share a circle with them, and players with posse.bypass. Everyone else sees "Unknown" (book-authors.shown-as), and a title that holds the author's name shows **** for it. That includes the BetonQuest quest journal, which carries its owner's name. Same world doesn't count, only circles, so a kid and an adult standing together still don't see each other's names. It is on by default; set book-authors.hide: false to turn it off. With no circles set up nothing is hidden.

  • The true author is kept on the book, so nothing is lost. Whoever may see it gets it back, and a circle granted or removed follows within two seconds.
  • Paper can't change an item for one viewer without packet tricks, so the book itself is swapped as it moves: masked unless a player who may see the author holds it. A player's inventory is set on join, on pickup, after clicks and every two seconds. Dropped, hopper, item frame and unopened chest books are masked, and a chest or lectern shows the author only while everyone looking at it may see it.
  • Fails closed: a real player Posse has never seen is hidden, and while the config can't be read, only the author sees their name. A name that matches no player, such as a generated lore book, is left alone.
  • Not covered: names inside a book's pages, and books inside shulker boxes or bundles.

Blocked commands. Any command can be turned off, each with its own message. sort also blocks anyplugin:sort, in any letter case.

Word filter. filter.yml lists words and phrases to keep out of chat, private messages, signs, books and item names. It matches whole words, so "class" and "Scunthorpe" are fine, and it sees through sh1t, $ for s and stretched letters. Spaced-out spellings get through. Blocked text is never logged or stored: the player is told kindly and can try again. Players with posse.filter.bypass, such as an adults group, aren't filtered anywhere.

Masking for kids. Where adults and kids play together, set mask-for-viewers: true in filter.yml. Adults (players with posse.filter.bypass) write freely, and everyone else sees each blocked word in their chat and private messages as ****, while other adults see it as written. A player without the bypass counts as filtered, so a new account is masked until someone adds it to the adults group. Signs, books and item names are stored once for everyone, so an adult's blocked words in them are saved as ****.

Nobody heard you. If you chat and nobody online can hear you, you get a light-hearted note, such as "A squid nods politely. It didn't understand a word." There are 75 in quips.yml, and you see them all before any comes round again. At most one every 3 minutes.

Every message players read is in config.yml, in MiniMessage. The defaults are short and kind, say what to do instead, and never rely on colour alone.

Install

  1. Put Posse-<version>.jar in plugins/ and start the server.
  2. List your circles in plugins/Posse/config.yml, and any circle-only worlds.
  3. Give each player their circle permission with your permission plugin, for example with LuckPerms: /lp group family permission set posse.circle.family.
  4. Run /posse reload.

Permission changes take effect straight away, with no relog.

If the config can't be read when the server starts, there are no rules to follow, so chat and private messages are paused and nobody can join without posse.bypass. This applies whether or not you use home worlds, and there is no setting to turn it off. Operators don't have posse.bypass unless you give it to them. A refused player reads "The server's safety rules didn't load, so joining is paused. Please try again later.", and the log says so at most once a minute. Fix the file and run posse reload from the console. Admins who can join are told about the pause. Join messages are checked a second time: if another plugin lets a refused login through, the player is held and disconnected, and nobody is told they joined or left. A reload with mistakes keeps the rules that were working, and says what's wrong.

The same join check goes in before anything else at startup. If a later startup step fails, Posse stays enabled with joins paused, and you need to fix the cause and restart the server. Don't count on its other rules, including the ones for players with posse.bypass, after such a failure. If the join check itself can't be set up, Posse shuts the server down. A failure that stops Java loading the plugin at all happens before any of Posse's code runs, so it can't guard against that.

Up to 0.11.2 your config.yml has its own copy of the admin-paused and admin-reload-failed-paused messages, which don't mention joining. Posse keeps your wording.

Commands

Command What it does
/circles Shows your circles and who online can hear you right now.
/posse reload Reads config.yml, filter.yml and quips.yml again.
/posse status Shows the circles, whether the filter is on, and any config warnings.
/posse check <player> <player> Says whether the first can reach the second, and why.
/posse describe Lists these admin commands.

Every /posse command also takes --json <id> at the end, for scripts and the Leaf Juice app. It then answers with one ea-result <id> {...} line in the shared Signalbox format: status gives the circles, the filter and any problems; reload whether the new rules were applied; check both players with their UUIDs, reaches and a reason code such as shared-circle; describe the commands. Players are named or given by UUID; selectors like @p aren't accepted.

Permissions

Permission Default Allows
posse.circle.<name> nobody Being in that circle.
posse.circles everyone /circles.
posse.circles.names everyone Names in /circles. Without it, only a count.
posse.bypass nobody, ops included Reaching and being reached by everyone, for moderators. It doesn't show anyone else's chat.
posse.filter.bypass nobody, ops included Skipping the word filter everywhere it applies, for adult groups. It doesn't change who hears whom. With mask-for-viewers on, it's also what lets a player read other adults' words as written.
posse.admin ops /posse, and config warnings on joining.

For other plugins

Posse registers a ReachService with Bukkit's services manager:

ReachService rules = Bukkit.getServicesManager().load(ReachService.class);
if (rules == null || rules.mayReach(from, to)) { /* send it */ }

mayReach(from, to) and maySpeak(player) follow exactly the same rules as chat, and are safe from any thread.

inSharedCircle(viewer, to) is the circles-only check, added in 0.11.3, for things such as map dots. It's true for yourself, when the two share a circle, or when either has posse.bypass. Being in the same world doesn't count. With no circles set up it's true. It's false while Posse is paused and when it can't be worked out. While circles are in use, it's also false between two different players if either is still being placed or is being disconnected. It doesn't change chat.

sharesCircle(viewerHas, to) is for a viewer who isn't in game, such as someone on a web map. It's true only when they share a circle with to. World, world group and bypass don't count, and with no circles set up it's always false. The caller passes the viewer's permissions, read while they're offline, and anything it can't check should answer false.

mayKnow(viewer, owner, world) says whether a player may know who left something in a world, such as a grave's name. It's stricter than chat, so it fails closed: the owner, either side's posse.bypass, a shared circle, or both players standing in that world's group right now (unless it's circle-only). An offline owner counts only through a circle or bypass, from what Posse last saw of them. With no circles set up, nobody but the owner may, and it answers false for anyone Posse has never seen. Call it from the main thread. For that, Posse keeps known-players.yml: each player's ID with the circle names they held and whether they had posse.bypass, updated when they join and leave and on /posse reload. Nothing else about them is stored. If you take someone out of a circle while they're offline, Posse still uses their old circles until they next join; delete their line from the file (with the server stopped) to make it take effect at once.

Limits

  • A plugin that sends its own line to every player, without going through the server's join, quit, death or advancement events, isn't covered. EssentialsX's welcome for new players (newbies.announce-format) is one: turn it off there.
  • Admins and ops without posse.bypass aren't offered the names of players out of their reach on Tab either, in any command. They can still type a name in full.
  • A pet's death line goes to its owner as in vanilla, and can name the player who killed it.
  • Book pages aren't checked for names, and a book moved into a chest shows its author to anyone else looking at that chest for one tick.
  • Signs are readable by anyone who walks past, and a book or named item can be carried to another world. Posse only checks them when they're written.
  • Chat plugins that send messages their own way, rather than through Paper's chat event, aren't covered. Add their message commands to private-message-commands.
  • Only the commands listed in private-message-commands and reply-commands are checked. /r is checked against the last conversation Posse saw.

Building

./gradlew build

The jar is build/libs/Posse-<version>.jar. Live tests with bots are in test/live.

License

MIT. See LICENSE.

About

Chat circles for family and community Paper servers: players hear their own world plus anyone in a shared circle, with blocked commands, a kind word filter and /circles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages