Skip to content

Features

Ranks and permissions

How sofyCore ranks, grants, inheritance, authority, conditional rules, expiration and permission resolution work across a network.

The ranks module manages rank definitions, the ranks each player holds (grants), individual permission exceptions and conditional rules. Rank definitions are shared by the whole network; grants can be global or limited to a server, world, game mode or WorldGuard region, with an optional expiration.

Rank types

TypePurpose
NORMALRegular ranks. Weight is any 32-bit integer
DONATORPurchasable or donor ranks. Weight 0–999999
STAFFStaff ranks with STAFF or ADMIN authority. Weight 0–999999
HIDDENOnly provide permissions: no prefix, suffix, color or authority

default is unique and always applies. owner has the reserved maximum weight (1000000). Rank IDs have 1–32 lowercase characters and start with a letter.

Authority and hierarchy

Authority is separate from the visible rank: console > OWNER > ADMIN > STAFF > USER, and within each level the weight decides. Authority is never inherited; it comes from the type and authority of the player's active grants.

  • An administrator only grants ranks strictly lower than their own and only edits players with lower authority.
  • Nobody can modify themselves or an equal or higher player.
  • OP and * never replace these checks. A HIDDEN rank with administrative permissions does not create authority either.
  • Restrictions are checked again in storage when the change is committed, not only when the command was typed.

Visible rank

When a player holds several ranks, the visible one (prefix, suffix, color, chat and nametags) is chosen like this: STAFF beats USER; within the same scale the higher weight wins, then the most recent grant, then the rank ID. HIDDEN ranks never participate.

Players can choose between their global rank and the local rank of the current server with /rankdisplay (a grant with server=<this server>).

Permission resolution

All active grants combine their permissions, and default always applies. For a given node:

  1. Conditions and expirations are filtered first.
  2. More specific conditions take priority; between ranks, weight is considered next.
  3. A temporary rule beats an equivalent permanent one; between temporary ones, the one that expires first wins.
  4. If still tied, false wins.
  5. Exact nodes beat wildcards, and more specific wildcards beat general ones.

Individual rules (/access user <player> permission ...) override the result of ranks. remove returns to the inherited result; it is not a denial.

Conditional rules

Text
/access rank rule vip add essentials.fly permanent world=parcelas
/access rank rule vip deny essentials.fly permanent world=minas
/access rank rule vip parent base 7d server=survival
/access user Steve grantat vip 30d server=survival,world=parcelas Purchase

Contexts are refreshed on block moves, teleports, world and game mode changes, and up to eight players per tick are re-checked for region changes. No Redis or database query is made per movement or permission check.

WorldGuard

WorldGuard is optional. Region conditions use its public API (families 6 and 7) without NMS: worldguard:region=<id>, worldguard:in-region=<true|false> and worldguard:flag-<flag>=<value>. The ExtraContexts keys and the old wg-region alias are recognized.

Name colors

Players with sofycore.ranks.color choose a personal color with /color (0–f with sofycore.ranks.color.<code>, or #rrggbb with sofycore.ranks.color.rgb). Rank colors accept &a or &#55aaff.

Network synchronization

Changes are saved first and then announced through Redis Pub/Sub. A change to one player's grants reloads only that player; catalog changes invalidate every view. Each server also checks the policy revision every two seconds to recover lost notices. Propagation is fast but not instantaneous: during an invalidation, placeholders return empty values and rank_ready=false instead of mixing revisions.

Limits

Up to 128 ranks, 64 parents per rank, 1024 rules per rank, 512 historic grants and 512 exceptions per user. Reasons are limited to 256 characters.