Features In-Depth 🔎 ​
This page details some of the core functionalities of Tub's Status Plugin.
1. Setting and Displaying Statuses ​
- Player Commands:
/status <your message>: Sets a custom status (ifgroupModeis off, or if player is admin)./status <groupname>: Sets a predefined group status (ifgroupModeis on)./status remove: Removes the player's current status.
- Admin Commands:
/status <player> <message|groupname>or/tsp setstatus <player> <message|groupname>: Sets another player's status (custom or group)./status remove <player>or/tsp remove <player>: Removes another player's status.
- Formatting:
- Players can use standard Minecraft color codes (e.g.,
&cfor red,&lfor bold) in their status messages if they have the correspondingStatusPlugin.formatting.<type>permissions. - The plugin uses
StatusManager.translateColorsAndFormattingto process these codes and check permissions. - Spaces can be included by typing
&_where a space is desired.
- Players can use standard Minecraft color codes (e.g.,
- Length Limit: The
maxStatusLengthinconfig.ymldefines the maximum number of displayable characters. Color codes and PlaceholderAPI placeholders do not count towards this limit. Can be changed live by admins using/tsp setmaxlengthand/tsp resetmaxlength. - Display Locations:
- Tab List: If
changeTablistNames: trueinconfig.yml, the status appears before the player's name. - Chat: If
chatFormatter: trueinconfig.yml, chat messages are prefixed with the player's status.
- Tab List: If
- Formatting Characters: The
openingCharacterandclosingCharacterfromconfig.yml(default[and]) are used to wrap the status text.
2. Group Mode ​
- Activation: Set
groupMode: trueinconfig.yml. - Functionality: When enabled, non-admin players cannot set arbitrary custom statuses with
/status <message>. Instead, they must choose from a list of predefined groups using/status <groupname>. - Defining Groups: Status groups are defined in
config.ymlunder thestatusGroupssection. Each group has astatusstring and an optionalpermissionslist.yamlstatusGroups: afk: status: "&eAFK" permissions: ['my.server.afkaccess'] # Player needs 'my.server.afkaccess' newbie: status: "&aNew Player" # No 'permissions' list: access controlled by 'StatusPlugin.group.set' - Permissions for Groups:
- A player needs the base
StatusPlugin.group.setpermission to use the/status <groupname>command. - For a specific group:
- If the group has a non-empty
permissionslist inconfig.yml, the player needs one of those permissions. - If the group's
permissionslist is empty or absent,StatusPlugin.group.setis sufficient.
- If the group has a non-empty
- A player needs the base
- Admin Override: Administrators with
StatusPlugin.admin.setStatuscan set any custom or group status for any player, bypassing group mode restrictions and target player permission checks for groups.
3. PlaceholderAPI Integration ​
- Detection: The plugin automatically detects if PlaceholderAPI (PAPI) is installed.
- Registration: If PAPI is found, Tub's Status Plugin registers its own expansion:
tubsstatusplugin. - Provided Placeholders (for use in other plugins):
%tubsstatusplugin_status%: Displays the status of the player viewing the placeholder.%tubsstatusplugin_status_<playerName>%: Displays the status of the specified<playerName>.
- Usage of External Placeholders in Statuses: If PAPI is present and a player has the
StatusPlugin.placeholderspermission, they can use other PAPI placeholders within their own status message.- Example status:
/status Playing on %server_name%
- Example status:
- Automatic Refresh: The plugin periodically (every 30 seconds by default if
changeTablistNames: true) updates player display names in the tab list, which helps refresh any PAPI placeholders used within statuses.
4. LuckPerms Integration ​
- Detection: The plugin checks if LuckPerms is installed.
- Functionality: If LuckPerms is present and a player has the
StatusPlugin.placeholderspermission, the plugin can incorporate the player's LuckPerms prefix and suffix into their displayed status. - Placeholders for Statuses (specific to this plugin):
%LP_prefix%: Will be replaced by the player's LuckPerms prefix.%LP_suffix%: Will be replaced by the player's LuckPerms suffix.
- Example Status:
/status %LP_prefix%&7MyRole&f%LP_suffix%
5. Status Persistence ​
- Storage: Player statuses are saved in the
plugins/TubsStatusPlugin/statuses.ymlfile. - Format: The file stores player UUIDs mapped to their raw status string (including
&color codes). - Saving: Statuses are saved whenever a player sets or removes their status, and on plugin disable.
- Loading: When the plugin enables, it loads all statuses from this file.
- Reloading: The
/tsp reloadcommand reloads bothconfig.ymlandstatuses.yml.
6. Update Checking ​
- If
checkUpdate: trueinconfig.yml, the plugin contacts the Modrinth API on server startup to check for new versions. - Notifications are logged to the console.
- For updates marked as
CRITICALorHIGHurgency, players with theStatusPlugin.adminpermission will receive an in-game notification upon joining.
7. Configurable Logging ​
- The
loggerLevelinconfig.ymlallows administrators to control the amount of detail the plugin logs to the console, ranging fromDEBUG(10) for detailed troubleshooting toERROR(40) for only critical issues.
