Commands & Placeholders
Full reference guide to in-game admin commands, internal message place holders, and external PlaceholderAPI integration.
Commands & Placeholders
Configure in-game administration, adapt message text using dynamic variables, and integrate external scoreboards or menus using our custom PlaceholderAPI expansion.
In-Game Commands
All administration commands require the primary permission node.
- Base Command :
/nbcontest(Alias:/nbc) - Required Permission :
nbcontest.admin(Default:op)
| Subcommand | Parameters | Description | Example |
|---|---|---|---|
start | <event> | Instantly launches a contest. | /nbc start farming |
stop | None | Force-stops the active contest. | /nbc stop |
reload | None | Reloads configs, messages, and restarts schedules. | /nbc reload |
Supported Event Types
When using the /nbc start command, you must specify one of these four valid keys:
farming: Starts a crop harvesting competition (picks a crop randomly from your configured list).fishing: Starts a fishing tournament.hostiles_mobs: Starts a hostile monster hunting event.passive_mobs: Starts a passive livestock harvesting event.
Message Placeholders
These placeholders are processed internally by the plugin. You can insert them into translations inside messages.yml or console commands in the rewards section of your config.yml.
| Placeholder | Description | Applicable Events | Example Output |
|---|---|---|---|
%event% | The localized name of the active contest | All | Harvesting |
%player% | The player's username (used in chat and rewards) | All | Notch |
%score% | The active score of a player | All | 27 |
%unit% | Localized points unit (e.g., mobs killed) | All | fish caught |
%time% | Remaining contest duration in seconds | All | 180 |
%minutes% | Formatted minutes remaining | All | 3 |
%seconds% | Formatted seconds remaining (two digits) | All | 00 |
%rank% | Ranking position numbers (1 to 5) | All | 1 |
%material% | Localized name of the target crop | farming only | potatoes |
%amount% | The targeted objective count | farming only | 100 |
%remaining% | Crops left to harvest to finish the contest | farming only | 43 |
PlaceholderAPI Integration
If you have PlaceholderAPI installed on your server, NBContest will automatically hook into it on startup. No extra downloads or extensions are required!
- Placeholder Identifier:
%nbcontest_...%
Global Context Placeholders
These variables provide overall information about the running contest. They can be placed in any hologram, scoreboard, or tablist plugin.
| Placeholder | Description | Example Output |
|---|---|---|
%nbcontest_is_running% | Returns true if a contest is active, false otherwise. | true |
%nbcontest_event_type% | The raw event identifier key (farming, fishing, etc.). | farming |
%nbcontest_event_name% | The translated name of the event from messages.yml. | Harvesting |
%nbcontest_has_objective% | Returns true if the event is a farming contest with a target goal. | true |
%nbcontest_time_left% | Total remaining time in seconds. | 240 |
%nbcontest_time_left_formatted% | Remaining time formatted as minutes:seconds. | 04:00 |
%nbcontest_material% | The translated name of the targeted crop (farming only). | potatoes |
%nbcontest_amount% | The objective score target (farming only). | 150 |
%nbcontest_progress% | The cumulative points harvested by all players (farming only). | 82 |
Player-Specific Placeholders
These placeholders retrieve scores and ranks relative to the player looking at the text.
| Placeholder | Description | Example Output |
|---|---|---|
%nbcontest_my_score% | The current points scored by the viewing player. | 15 |
%nbcontest_my_rank% | The current leaderboard rank of the player. | 2 (or N/A if not ranked) |
Leaderboard Placeholders
Create live leaderboards or highscore listings on holograms or scoreboard sidebars. Replace X with a rank number from 1 to 5.
| Placeholder | Description | Example Output |
|---|---|---|
%nbcontest_leaderboard_name_X% | The name of the player holding the X rank. | Notch (or --- if empty) |
%nbcontest_leaderboard_score_X% | The total score of the player holding the X rank. | 45 (or 0 if empty) |
Concrete Integration Examples
Here are some real-world configurations showing how you can integrate these placeholders into popular server plugins:
DecentHolograms / HolographicDisplays
Display the Top 3 podium live at your server spawn:
&6&lš ACTIVE CONTEST LEADERBOARD š
&7Event: &f%nbcontest_event_name% &7- &a%nbcontest_time_left_formatted% remaining
&7Target: &b%nbcontest_amount% %nbcontest_material%
š„ &e1st Place: &f%nbcontest_leaderboard_name_1% &7(&a%nbcontest_leaderboard_score_1%&7)
š„ &72nd Place: &f%nbcontest_leaderboard_name_2% &7(&a%nbcontest_leaderboard_score_2%&7)
š„ &c3rd Place: &f%nbcontest_leaderboard_name_3% &7(&a%nbcontest_leaderboard_score_3%&7)TAB Header & Footer
Inject active event timers directly into your tablist:
# Inside TAB config.yml
header:
- "&d&lYourMCServer &7- &eWelcome %player%!"
- "&aActive Event: &e%nbcontest_event_name% &7(&c%nbcontest_time_left_formatted% left&7)"
footer:
- "&7Your active score: &e%nbcontest_my_score% points &7| Rank: &e#%nbcontest_my_rank%"