Placeholders
The Motels plugin integrates with PlaceholderAPI to offer various placeholders related to motel management in the game. These placeholders provide dynamic information about motels and can be used in various contexts.
General Placeholder Syntax
Placeholder format:
%almotel_<identifier>%
The
<identifier>
is replaced with specific placeholders as outlined below.
Motel-Specific Placeholders
These placeholders provide information about specific motels.
Status Placeholder
Syntax:
%almotel_<motel_id>_status%
or%almotel_<motel_id>_state%
Description: Retrieves the current status (available or occupied) of a specified motel.
Example:
%almotel_123_status%
returns the status of the motel with ID 123.Possible values:
Available (configurable in
messages.yml
asmotel_status_available
)Occupied (configurable in
messages.yml
asmotel_status_occupied
)
Price Placeholder
Syntax:
%almotel_<motel_id>_price%
Description: Returns the price of the selected motel.
Example:
%almotel_456_price%
shows the price for motel ID 456.
Expiration Date Placeholder
Syntax:
%almotel_<motel_id>_expireDate%
Description: Provides the expiration date of the motel's listing or service.
Example:
%almotel_789_expireDate%
will display the expiration date for motel ID 789.Note: If there's no expiration date set, it will return a configurable message (set in
messages.yml
asmotel_no_expire_date
).
Owner Placeholder
Syntax:
%almotel_<motel_id>_owner%
Description: Retrieves the name of the owner of a specified motel.
Example:
%almotel_101_owner%
would return the owner of the motel with ID 101.Note: If there's no owner, it will return a configurable message (set in
messages.yml
asmotel_no_owner
).
Display Name Placeholder
Syntax:
%almotel_<motel_id>_displayname%
Description: Retrieves the display name of a specific motel.
Example:
%almotel_123_displayname%
would return the display name of the motel with ID 123.Default: If no display name is set, it returns "Not set".
Player-Specific Placeholders
These placeholders provide information about motels owned by a specific player.
Motel Amount
Syntax:
%almotel_amount%
Description: Returns the number of motels owned by a player.
Example:
%almotel_amount%
might return "3" if the player owns three motels.
Player's Motel Expiration Date
Syntax:
%almotel_expiredate_<index>%
Description: Shows the expiration date of the player's motel at the specified index.
Example:
%almotel_expiredate_0%
returns the expiration date of the first motel owned by the player.Note: Index starts at 0. If the index is invalid, it returns "Invalid index".
Player's Motel Display Name
Syntax:
%almotel_displayname_<index>%
Description: Retrieves the display name of the player's motel at the given index.
Example:
%almotel_displayname_1%
returns the display name of the second motel owned by the player.Note: If no display name is set, it returns "No displayname".
Player's Motel Price
Syntax:
%almotel_price_<index>%
Description: Provides the price of the player's motel at the specified index.
Example:
%almotel_price_2%
returns the price of the third motel owned by the player.
Note: For player-specific placeholders, <index>
represents the index number of the motel in the player's list of motels, starting from 0. If a player has no motels, these placeholders will return "No motels".
Last updated