Skip to main content

PlaceholderAPI (PAPI) Integration

GWorld v2 offers native support for PlaceholderAPI. This means you do not need to download an additional expansion via the PAPI-eCloud. Once PlaceholderAPI is installed on your server, GWorld registers its placeholders automatically.

Available Placeholders

All GWorld placeholders use the prefix %gworld_.

Placeholder

Description

Example Output

%gworld_alias%

The formatted display name (alias) of the world the player is currently in.

§6Survival

%gworld_alias_<worldname>%

The formatted display name of a specifically named world.

%gworld_alias_world_the_end%

§5The End

%gworld_name%

The technical folder name of the world the player is currently in.

world_survival_v2

%gworld_name_<worldname>%

Returns the technical name of the requested world. Useful for scripts or validations.

%gworld_name_lobby%

lobby

Fallback Info: If a world has no alias set, the technical world name is returned automatically. If the player is offline or the placeholder is called incorrectly, an empty string ("") is output so it doesn't break the layout of your tab list or scoreboard.

Warning: If the world is not managed by GWorld, an empty string ("") is also output!


Examples

Here are some examples of how you can use the placeholders in other plugins:

1. In the Tab List / Scoreboard

You want to show your players where they currently are. Use the alias placeholder for this, as it supports color codes (e.g. &a):

Current world: %gworld_alias%

2. In Chat Formats

Insert the placeholder into your chat format to display the world as a prefix before the player's name:

chat-format: "[%gworld_alias%] %player_name%: %message%"

3. In GUI Menus

If you are building a worlds menu, you can use the nice alias for the item icon, but you must use the technical name for the teleport command in the background:

items:
  survival_world:
    material: GRASS_BLOCK
    display_name: 'Teleport to: %gworld_alias_farmworld%'
    left_click_commands:
      - '[player] gtp %gworld_name_farmworld%'