Templates
Templates control how a purchase is broadcasted to players.
They define the layout, sounds, titles, chat messages, buttons and optional events such as reward events or Discord webhooks.
Main configuration file:
config.ymlCustom Arguments
Section titled “Custom Arguments”Custom arguments define placeholders usable inside templates.
These values are passed when executing the command.
customs-args: - player - package - priceExample console usage:
/tebexmessage one player(Senkex) package(VIP Rank) price($10)Usage inside messages:
{player}{package}{price}Reload configuration:
/tebexmessage reloadSeparator Symbol
Section titled “Separator Symbol”Used when multiple packages are included in a single purchase.
separator-symbol: "&7•"Example input:
package(VIP;Legend;Key)Output:
VIP • Legend • KeyTemplates
Section titled “Templates”Templates define how the purchase announcement is displayed.
You can create unlimited templates.
The template name is used in the command.
Example:
/tebexmessage one player(Senkex) package(VIP) price($10)Template used:
oneTemplate Types
Section titled “Template Types”Two default templates are commonly used.
- one → single package purchase
- multiple → multiple packages separated with
;
Example:
package(VIP;Legend;Key)This will use the multiple template layout.
You can create any number of templates and customize them with your own events and layouts.
Single Purchase Template
Section titled “Single Purchase Template”Used when a player purchases one package.
broadcast: templates: one: events: player-head: true reward-event: true discord-webhook: true
title: enabled: true type: GLOBAL up: "&#FFD700{player}" down: "&fPurchased &FF35{package} &7({price})"
sound: enabled: true type: GLOBAL id: ENTITY_PLAYER_LEVELUP
actionbar: enabled: true message: "CFF5A{player} &fpurchased �FFAA{package}"
bossbar: enabled: false text: "&fPurchased &FF35{package} &7({price})" color: GREEN style: SOLID duration: 5 animated: false
message: - " BFF20&lGG IN THE CHAT! 🛒" - "<empty>" - " BFF3D@{player} &fhas purchased �FFAA{package}&f!" - " &fVisit our store &#FCFF1Bstore.server.com" - "<empty>" - "&7&o (( Thank you for supporting the server ))"Multiple Purchase Template
Section titled “Multiple Purchase Template”Used when several packages are purchased at once.
Example:
package(VIP;Legend;Key)broadcast: templates: multiple: events: player-head: false reward-event: false discord-webhook: true
title: enabled: true type: GLOBAL up: "&#FFD700{player}" down: "&fPurchased &7({price})"
sound: enabled: true type: GLOBAL id: ENTITY_PLAYER_LEVELUP
actionbar: enabled: true message: "CFF5A{player} &fpurchased �FFAA{package}"
bossbar: enabled: true text: "�FFAA✨ NEW STORE PURCHASE ✨" color: GREEN style: SOLID duration: 5 animated: false
message: - "<center>BFF3D&lNew purchase 🎉</center>" - "<empty>" - "<center>&#E9FF1B{player} &fjust purchased!</center>" - "<center>&7(List of all purchases)</center>" - "<empty>" - "<center>{package}</center>" - "<empty>" - "%buttons%"Message Tags
Section titled “Message Tags”Supported tags inside messages:
<empty>Adds a blank line.
<center>text</center>Centers text in chat.
%buttons%Displays all configured buttons.
%button_id%Displays a specific button.
Example:
%button_shop%Events
Section titled “Events”Templates can trigger optional features.
events: player-head: true reward-event: true discord-webhook: trueAvailable events:
- player-head → shows the buyer head next to the message
- reward-event → starts the reward event
- discord-webhook → sends purchase info to Discord
Displays a title on screen.
title: enabled: true type: GLOBAL up: "&#FFD700{player}" down: "&fPurchased &FF35{package} &7({price})"Types:
GLOBALVisible to all players.
PLAYERVisible only to the buyer.
Plays a sound when the purchase is announced.
sound: enabled: true type: GLOBAL id: ENTITY_PLAYER_LEVELUPid must be a valid Bukkit sound.
ActionBar
Section titled “ActionBar”Displays a message above the hotbar.
actionbar: enabled: true message: "CFF5A{player} &fpurchased �FFAA{package}"Actionbars do not support multiple lines.
BossBar
Section titled “BossBar”Displays a bossbar at the top of the screen.
bossbar: enabled: true text: "&fPurchased &FF35{package} &7({price})" color: GREEN style: SOLID duration: 5 animated: falseDuration is defined in seconds.
Creating Custom Templates
Section titled “Creating Custom Templates”You can create your own templates.
Example:
broadcast: templates: legendary: events: reward-event: true discord-webhook: true
message: - "<center>&6Legendary Purchase!</center>" - "<center>{player} bought {package}</center>"Command usage:
/tebexmessage legendary player(Senkex) package(ASTRO) price($20)