Creating a custom template
Last updated
Last updated
Below is an example for you!
A template consists of the following main sections:
settings
→ General settings for the loot chest.
buttons
→ Buttons for interaction and animations.
rewards-location
→ Locations where rewards will appear.
settings
)player-location
→ The player's position when interacting with the loot chest. (This will be the main position of this template for this lootchest type)
location
→ The main location of the loot chest.
rotations
→ Defines how the chest rotates at specific positions
decoration
→ Additional objects of this chest. (built-in objects)
click-to-open
→ Determines if the chest opens when clicked.
buttons
)location
→ The button’s position.
icon
→ Defines the material and texture for the button (e.g., PLAYER_HEAD).
click-sound
/ hover-sound
→ Sounds when clicking or hovering over the button.
name
→ Defines the button's display name, with options for visibility, dynamic colors, and refresh interval.
delay
→ Delay before the button would be spawned after the session start.
permission
→ Required permission to interact with this button.
holding-icon
→ Set this to false to hide the icon of this button
rotate-on-spawn
→ Determines if the button rotates when it spawns. (if this option enable, the yaw above will be the initial yaw, and it will spin to the final yaw)
actions
→ Defines what happens when the button is clicked .
rewards-location
)Defines where rewards will appear when a player opens a loot chest.
Each entry consists of a world
, x, y, z
coordinates, and optional rotation (yaw, pitch
).
Child Elements add some visual effects to the button, it has no execution and always rely on its parent. Here is some available options for a sub-button:
Location
Name
Icon
Rotations
Example:
location-offset
→ Defines the position relative to the parent button.
display-name
→ The name of this child.
This is just the overview, if you want further information please go to next part!
HLootChest provides 2 location modes: location
and location-offset
You can set the exactly location using this mode.
Example:
location: world, 182.5, 73.2, 193.5
With this option, you can determine the rotation of the Armorstand.
There are different rotation modes:
HEAD
BODY
RIGHT_ARM
LEFT_ARM
RIGHT_LEG
LEFT_LEG
You can set the rotation for almost all elements (box, buttons, sub-buttons) Example:
HLootChest provides two icon displaying mode: static
and dynamic
Use this option for performance purpose! Example:
Same with Icon, HLootChest provides two name displaying mode: static
and dynamic
Use this option for performance purpose! Note: If you use this mode, it is necessary to put name in a line (not a list!) Example:
With this option, you can set the actions will be called on button click
There are some action tags:
[player]: execute player's command (PlaceholderAPI Support!).
[console]: execute console command.
[message]: send message to player.
[close]: leave lootchest opening.
Every button has 2 requirements: spawn-requirements and click-requirements
Example:
There is 8 requirement types:
has-permission
string-equals
>=
>
==
<
<=
!=