Skip to main content

Creating Treasure Chests

webapp_banner.jpg

Treasure Chests are a feature allows admins to make chests that can either drop loot or spawn a mimic (hostile) boss.

Values

isEnabled

Sets if a treasure chest is enabled.

KeyValuesDefault
isEnabledBooleantrue
Example
isEnabled: true

chestType

Sets the type of chest material.

KeyValuesDefault
chestTypeMaterialCHEST
Example
chestType: CHEST

This needs to be a valid chest material such as CHEST or BARREL.

create_chest_material.jpg


facing

Sets the facing direction of the chest.

KeyValuesDefault
facingSpecial [1]NORTH
Example
facing: NORTH

This sets the direction the chest faces. Valid values are NORTH, SOUTH, EAST, or WEST.

Special [1]

Expand Table
Facing
NORTH
SOUTH
WEST
EAST

dropStyle

Sets if the chest is meant to be dropped for one player or multiple players.

SINGLE chests disappear after being opened and reappear when restocked. GROUP chests remain visible and track cooldowns per-player. Each player can loot the chest once per restock period. The chest uses the restockTimers field to track individual player cooldowns.

KeyValuesDefault
dropStyleSINGLE / GROUPSINGLE
Example
dropStyle: SINGLE

lootList

Lists the loot that the treasure chest should drop when opened.

KeyValuesDefault
lootListEM Loot Tablenone
Example
lootList:
- filename=elite_scrap_tiny.yml:chance=0.90
- magmaguys_toothpick.yml

mimicChance

Sets the chance of spawning a hostile boss instead of dropping loot.

KeyValuesDefault
mimicChanceDouble0
Example
mimicChance: 0.5

mimicCustomBossesList

Specifies the list of hostile bosses available for spawning. A single boss will be randomly selected from this list for spawning.

The list also supports a weight system that you can implement to ensure some bosses are picked more often that the others.

KeyValuesDefault
mimicCustomBossesListString Listnone
Example
mimicCustomBossesList:
- my_cool_mimic_boss.yml
- weak_mimic_boss.yml

If you wish to assign weights to the bosses, the list should be formatted as follows:

mimicCustomBossesList:
- my_cool_mimic_boss.yml:60
- weak_mimic_boss.yml:40

In this configuration, my_cool_mimic_boss.yml is more likely to be chosen for spawning than weak_mimic_boss.yml.


restockTimer

Sets the time, in minutes, before the chest refills with loot.

KeyValuesDefault
restockTimerInteger0
Example
restockTimer: 30

effects

Sets the particle effects that the chest will do.

KeyValuesDefault
effectsParticlenone
Example
effects:
- DRIP_LAVA
- SMOKE_NORMAL

create_chest_effects.jpg


locations

Sets the locations where the treasure chest will spawn.

Locations can be added using /em addTreasureChest <treasurechestfilename.yml> while standing at the desired location. This command automatically adds your current position to the chest's locations list and updates the configuration file.

KeyValuesDefault
locationsString Listnone
Example
locations:
- my_world,10,50,10,0,0
- my_nether_world,12,58,12,0,0

chestTier

Sets the minimum guild rank required to open the chest.

KeyValuesDefault
chestTierIntegernone
Example
chestTier: 3

Note: The actual tier requirement has a slight variance for gameplay variety. The plugin applies randomization to the tier check.


instanced

Sets if the chest should be instanced (for use in instanced dungeons). All restock timers are disabled when chests are placed in dungeons.

DO NOT SET THIS VALUE MANUALLY.

KeyValuesDefault
instancedBooleanfalse
Example
instanced: true

restockTime

After a chest has been looted, the plugin will write this key to track restock time.

DO NOT SET THIS VALUE MANUALLY.

KeyValuesDefault
restockTimeUnix Timestampnone
Example
restockTime: 1707394380

restockTimers

Stores per-player cooldown data for GROUP mode chests. The plugin writes this automatically.

DO NOT SET THIS VALUE MANUALLY.

KeyValuesDefault
restockTimersString Listnone
Example
restockTimers:
- '1234567890-abcd-efgh-ijkl-123456789012:1707394380'
- '0987654321-zyxw-vutr-sqpo-098765432109:1707395000'

Each entry contains a player UUID and Unix timestamp separated by a colon.


Treasure Chest Config Example
isEnabled: true
chestType: CHEST
facing: NORTH
dropStyle: GROUP
lootList:
- filename=elite_scrap_tiny.yml:chance=0.90
- magmaguys_toothpick.yml:chance=0.95
mimicChance: 0.50
mimicCustomBossesList:
- balrog.yml
- killer_rabbit_of_caerbannog.yml
restockTimer: 1
effects: SMOKE_NORMAL
locations:
- world,0.0,-60.0,-14.0,0.0,0.0

create_chest_chest.jpg