Nucleus is no longer updated and this site is frozen in time. Some links may be broken.
Welcome to the new docs site for Nucleus v2! Still on Nucleus v1? Visit the old site here.

Links & Placeholder Tokens

Learn how to define links and use placeholders in Nucleus.

In several places in Nucleus, there is the option for links and chat placeholders to be used. The most obvious places that they can be used is in the motd.txt and various info files, but other modules accept them, including broadcasts.

Modules will include a link to this page where the functionality is supported.

Links can be included in various text locations using limited markdown syntax.

  • http://nucleuspowered.org - creates a link automatically
  • [Hello](http://nucleuspowered.org) - creates a link titled Hello to http://nucleuspowered.org
  • [Rules](/rules) - creates a link titled Rules that will run /rules when clicked.

Placeholder Tokens

Nucleus 2 does not support PlaceholderAPI, nor does it support Nucleus Gluon which enabled this bridge. This is because Nucleus supports the new Sponge placeholder system introduced in Sponge API 7.3, we encourage other plugins to use Sponge’s system too.

The following tokens can be used in both the motd and info files, and will be replaced at runtime.

  • {{afk}} - Displays “[AFK]” if a player is vanished.
  • {{currentworld}} - The current world of the player, if a player is accessing this.
  • {{displayname}} - The display name, or nickname, of the player.
  • {{flying}} - Displays “[Flying]” if a player is flying.
  • {{frozen}} - Displays “[Frozen]” if a player is vanished.
  • {{ipaddress}} - The IP address of the user.
  • {{jail}} - Displays the name of the jail the player is in, if jailed.
  • {{jailed}} - Displays “[Jailed]” if a player is jailed.
  • {{maxplayers}} - The maximum number of players your server can support.
  • {{muted}} - Displays “[Muted]” if a player is jailed.
  • {{name}} - The in-game name of the player.
  • {{onlineplayers}} - The number of players online on your server.
  • {{option}} - When given the name of a subject option/meta, retrieves the value associated with the permission option from the target playerand displays it.
  • {{player}} - The in-game name of the player.
  • {{playerdisplayname}} - The in-game name of the player.
  • {{playername}} - The in-game name of the player.
  • {{prefix}} - The player’s prefix, as defined by the “prefix” option in your permissions plugin.
  • {{subject}} - Used to display the message of the reciever of a message, rather than the sender.
  • {{suffix}} - The player’s suffix, as defined by the “suffix” option in your permissions plugin.
  • {{time}} - The current time in the world of the player, if a player is accessing this.
  • {{uniquevisitor}} - The estimated unique visitor count for the server.
  • {{vanished}} - Displays “[Vanished]” if a player is vanished.

Using Tokens in Other Plugins

These tokens can be used in other plugins that supports Sponge API 7.3’s placeholder system, however, these tokens must be prepended with nucleus: (so, displayname becomes nucleus:displayname). Consult the docs for other plugins for how to specify these tokens in their plugin.

Token Modifiers

Tokens support modifiers that control whether a space should be appended or prepended to the token output if the token exists.

The modifiers are:

  • p to prepend a space
  • s to append a space

To add a modifier to the end of a token, simply add “:[modifier]” at the end of the token (before }}). So, if you want your token (say, name) to have a space after it if it exists, the token would be {{name:s}}. Similarly, if you wanted a space before and after, specify {{name:sp}}.

Search

Downloading search database, this won't take long...