Skip to content

Permissions

aokod edited this page Dec 27, 2025 · 2 revisions

TotalFreedomMod uses a rank-based permissions system, as opposed to traditional Bukkit permission nodes. Commands check the player's rank against a minimum required rank.

The plugin discerns between three types of rank: Player, Admin (a player added to /saconfig) and Console (an admin using the console). Player ranks are determined automatically when a player joins the server (or after a player is manually opped) whereas Admin ranks are assigned manually through the admin list and verified by IP address.

Rank hierarchy (lowest to highest)

Rank Type Tag Description
IMPOSTOR Player [Imp] An Impostor is a Player impersonating an Admin.
NON_OP Player - A Player who has not been opped.
OP Player [OP] A Player who has been opped (regular state).
SUPER_ADMIN Admin [SA] Super Admin
TELNET_ADMIN Admin [STA] Telnet Admin
SENIOR_ADMIN Admin [SrA] Senior Admin
TELNET_CONSOLE Console [Console] A Telnet Admin using the console.
SENIOR_CONSOLE Console [Console] A Senior Admin using the console.

The IMPOSTOR rank is a special case because it is applied by the plugin to any player who joins using an admin's username from an unregistered IP (and only if the server is operating in cracked mode).

There are two "titles," which appear as ranks: Developer ([Dev]), which applies to the list of plugin developers that is hardcoded in the plugin, and Owner ([Owner]), which applies to players listed as owners in the config.yml.

Admin list

Admins are stored in admins.yml. Each admin entry contains:

prozza:
  username: Prozza
  active: true
  rank: SENIOR_ADMIN
  ips:
    - 192.168.1.100
    - 10.0.0.50
  last_login: Wed, 2 Apr 2016 16:08:39 +0200
  login_message: 'the &5Lead Developer&b!'

Fields should be self-explanatory. The ips is a list of IP addresses this admin can login from, and last_login is used to remember when an admin last logged in. Admins can use /myadmin setlogin <message> to update the login_message (supports & color coding).

Rank determination

When a player joins the server or runs a command, the plugin checks for their rank in the following order:

  1. If the server is cracked, a player is using an admin's username and without a registered IP, the player is marked as an Impostor and frozen.
  2. If the player's name or IP address matches an entry in admins.yml, the player is assigned their Admin rank.
  3. If the player is opped, they are given the OP rank. If not, they are given the NON_OP rank.

Players may use the command /status to check their rank at any given time after joining the server. If an admin is incorrectly marked as an Impostor, the admin may verify themselves either by logging in from a registered IP address or by requesting another admin to add them to the admin list using /saconfig add <player>.

Blocked commands

Upon plugin load, TotalFreedomMod will use the list of blocked_commands in config.yml to determine which commands should be blocked according to which level of rank.

blocked_commands:
- n:b:/mail sendall:&4You can't send mails to everyone!
- s:a:/stop
- n:b:/ban:_

Commands are case-insensitive and should pertain to the main command name, not an alias. (Blocking the main command name should block any aliases thereof.)

The blocked commands syntax is divided into four sections. The first section is a letter which indicates which rank may use the command.

Letter Indication
n Nobody (completely disabled)
c Senior Admins (Console)
t Telnet Admins (Console)
s Super Admins (any in-game Admin)
o Ops (Non-Ops won't be able to use it)

The second section is a letter which indicates what to do when a player executes that command

Letter Indication
b Block the command
a Block the command and auto-eject that player (for ops and below)
u Block the command and return an "Unknown command" message (used to hide commands)

The third section is the command to be blocked, prefixed with a slash (e.g. /ban). If your command includes parameters (e.g. /mail sendall) then the command with those exact parameters will be blocked, not the whole command (e.g. /mail).

The fourth section is the message to send to the player when executing that command (e.g. &4You can't send mails to everyone!). This should be omitted if unwanted. ChatColors are supported with the & key. By default, the starting ChatColor is set to gray. You may assume the default "That command is blocked" message by using a single underscore (_).

Clone this wiki locally