Get Support at: https://discord.gg/cftU47UjyP Mortis Supply Crates Mortis Supply Crates allows you to spawn crates in your world with in a range from which a player can get virtual crates which can give items from the loot table which can be configured.
Dependencies: - DecentHolograms
Commands /crates spawn <crate-id>
Spawns the specified crate to the location in the configured range.
/crates give <player_name> <crate-id>
Gives the specified player the specified virtual crate.
/crates stop <crate-id>
Stops the interval between spawning supply crates.
Permissions "crates.spawn"
Allows the player to use spawn command
"crates.give"
Allows the player to use give command
"crates.stop"
Allows the player to use stop command
Code (YAML):
supply-crates:
EXAMPLE_SUPPLY_CRATE:
messages:
crate-spawning: "&eA loot crate spawned at %crate_location%"#Message that is going to be broadcast when this supply crate spawns hologram: #This is going to be displayed above the supply crate -
"&bSupply Crate" -
"&7Click to loot" world: world
#The name of the world where this supply crate is going to spawn location1: "10, -101"#Range of location where the supply crate is going to spawn location2: "-519, 31" interval: 10m
#The interval for spawning #Use m for minutes, s for seconds and h for hours despawn-after: 30m
#The delay for the despawning of the supply crate crates: #Crates From crates.yml - EXAMPLE_CRATE
- BEST_CRATE
AWESOME_CRATE:
messages:
crate-spawning: "&eA loot crate spawned at %crate_location%" hologram: -
"&bAwesome Crate" -
"&7Click to loot" world: world
location1: "103, -1301" location2: "-5119, 331" interval: 10m
despawn-after: 30m
crates: - BEST_CRATE
Code (YAML):
crates:
EXAMPLE_CRATE:
items-rolls: 1
#The number of items it will give player upon opening this crate commands-rolls: 1
#The number of commands it will run upon opening this crate re-roll: false
#Wheather a loot can have multiple of the same items crate-item: #The virtual crate item material: CHEST
amount: 1
name: "&eExample Crate" lore: -
"&7Right-Click to open the crate" -
"&7Left-Click to view the crate" items: #Items in the crate EXAMPLE_SWORD:
material: DIAMOND_SWORD
amount: 1
name: "&fDiamond Sword" lore: -
"&7Greatest Sword" enchants: - PROTECTION_ENVIRONMENTAL:4
flags: - HIDE_ENCHANTS
chance: 50
TEST_ITEM:
material: DIAMOND
amount: 1
name: "&cSpecial Diamond" chance: 50
commands: #Commands in the crate EXAMPLE_COMMAND:
command: "give %player_name% cooked_beef 10"#Use %player_name% for the player chance: 10
commands-on-open: #Commands to run upon opening this crate -
"give %player_name% cooked_mutton 10" BEST_CRATE:
items-rolls: 3
commands-rolls: 3
re-roll: false
crate-item:
material: CHEST
amount: 1
name: "&eAwesome Crate" lore: -
"&7Right-Click to open the crate" -
"&7Left-Click to view the crate" items:
EXAMPLE_SWORD:
material: DIAMOND_SWORD
amount: 1
name: "&fDiamond Sword" chance: 50
APPLES:
material: GOLDEN_APPLE
amount: 3
name: "&fGolden Apple" chance: 10
DIAMOND:
material: DIAMOND
amount: 1
name: "Diamond" chance: 70
TEST:
material: DIAMOND_AXE
amount: 1
name: "Diamond AXe" chance: 50
TEST_ITEM:
material: PAPER
amount: 1
name: "&cYou got Unlucky" chance: 20
commands:
EXAMPLE_COMMAND:
command: "give %player_name% cooked_beef 10" chance: 10
commands-on-open: -
"give %player_name% cooked_mutton 10"