Services
Inter-plugin services and the built-in service contracts (economy, bans, placeholders, player meta).
| Type | Kind | Description |
|---|---|---|
Affix |
class | One prefix or suffix of a player: its text, its weight (the highest weight comes first) and the group or plugin that supplied it. |
AffixKind |
enum | Whether an affix goes before the player’s name (a prefix) or after it (a suffix). |
BanEntry |
class | One ban: a player (uuid and the name it was banned under) or an address. |
Currency |
class | A currency. |
EconomyResult |
enum | The outcome of a money operation. |
IBanList |
interface | The server’s ban lists: the vanilla files banned-players.json and banned-ips.json. |
IEconomy |
interface | An economy: balances of players (online or offline, by uuid), the transfers between them, and the currency. |
IPlaceholders |
interface | The placeholder registry: text templates such as “Online: %server_online%” are rendered through it, and any plugin can add its own placeholders (the chat format, the tab list, nametags, kits, the messages of other plugins). |
IPlayerMeta |
interface | Player meta and affixes: the prefix, suffix and typed values that a permission provider (or any plugin) supplies for a player, read by the chat, tab and nametag plugins. |
MetaKey<T> |
class | A typed key of player meta, declared by the plugin that owns the value (new MetaKey<int>("charter:level")). |
PlaceholderScope |
enum | Whether a placeholder has one value for everybody (PlaceholderScope.Global) or one value per player. |
PlaceholderValue |
delegate | Computes a placeholder’s value for a subject from the arguments written after its name: “%id:arg1:arg2%” passes [“arg1”, “arg2”]. |
PlayerMetaExtensions |
class | Helpers over IPlayerMeta for the plugins that only need text. |
ServiceManager |
class | Plugin-to-plugin services: a plugin registers an implementation of an interface (an economy, a chat formatter, a region lookup) and other plugins look it up without referencing the provider’s code. |
ServicePriority |
enum | How a provider ranks when several plugins register the same service type (the highest wins). |
ServiceRegistration<T> |
class | One registered service: the implementation, who provided it and how it ranks. |
ServiceUnavailableException |
class | A plugin-to-plugin service that was registered is no longer available (its provider unloaded). |