Closed justin-eckenweber closed 5 years ago
Send me your crates.yml
crates:
# HUGE THANKS TO @DaPigGuy and his PiggyCrates plugin for making multiple crates possible.
#
# Disclaimer: Some part of this code has been taken from @DaPigGuy's plugin,
# I have asked his permission to use his code as a reference before hand as to avoid
# unnecessary complains and/or contradictions.
#
# To reward the player with a command make sure that the meta of the reward is same as
# commandMeta set in config.yml or else the command won't work.
#
# Example on how to set the config.
# Note: Please use tabs instead of spaces.
#-------------------------------------------------------------------------------------------------------------------------------
# example: | Set the name of the crate.
# drops: | List the items that can be received from the crate.
# - name: "G-Helmet" | Custom name for the item. Use "§" for adding colors.
# id: 1 | ID of the reward.
# meta: 0 | Meta or Damage value of the Item.
# amount: 1 | The amount of Item that player receives.
# enchantments: | Set enchants for items here. Both VanillaEnchantments and PiggyCustomEnchants are supported.
# protection: | Name of enchant you wish to apply.
# level: 3 | The level for enchant.
# unbreaking: | You can set multiple enchants as long as they are registered.
# level: 2 | NOTE: If you donot want enchants simply remove the enchantments heading.
# lore: "USE ME" | Add a custom lore to the reward. Use "\n" for next line.
# commands: | Add commands to execute when player wins a reward. Multiple commands supported.
# - "say hi" | Use \"%PLAYER%\" to insert player name (with the quotes and slash).
# - "say test" | Don't forget to mention the maxCommands in config.yml.
# block: "911:0" | Set the block ID you want the crate to represent. Placing a chest on it will activate the crate.
# ------------------------------------------------------------------------------------------------------------------------------
common:
drops:
- name: "§a§lG Sword§r"
id: 276
meta: 0
amount: 1
enchantments:
protection:
level: 3
lore: "OP Sword\nFire Blade"
- name: "Cooked Chicken"
id: 366
meta: 0
amount: 16
block: "173:0"
uncommon:
drops:
- name: "Money Drop"
id: 339
meta: 50
amount: 1
commands:
- "givemoney \"%PLAYER%\" 100000"
- "say \"%PLAYER%\" won $100,000."
- name: "Iron Ingot"
id: 265
meta: 0
amount: 10
block: "42:0"
vote:
drops:
- name: "Eisenbarren"
id: 265
meta: 0
amount: 6
- name: "Goldbarren"
id: 266
meta: 0
amount: 6
- name: "Eichenholz"
id: 17
meta: 0
amount: 64
- name: "1000$"
id: 371
meta: 50
amount: 1
lore: "1000$ Gewinn von der VoteChest."
commands:
- "givemoney \"%PLAYER%\" 1000"
- name: "10.000$"
id: 41
meta: 50
amount: 1
lore: "10.000$ Gewinn von der VoteChest."
commands:
- "givemoney \"%PLAYER%\" 10000"
- "broadcast \%PLAYER%\ has won 10k!" // here is that bug
- name: "Eichenholz (x32)"
id: 17
meta: 0
amount: 32
- name: "Fichtenholz"
id: 17
meta: 1
amount: 64
- name: "Diamant"
id: 264
meta: 0
amount: 3
- name: "Smaragd"
id: 388
meta: 0
amount: 1
- name: "Smaragderz"
id: 129
meta: 0
amount: 3
block: "41:0"
mythic:
drops:
- name: "Diamond"
id: 264
meta: 0
amount: 16
- name: "Emerald"
id: 388
meta: 0
amount: 16
- name: "Golden Apple"
id: 322
meta: 0
amount: 16
block: "57:0"
legendary:
drops:
- name: "Golden Apple"
id: 322
meta: 0
amount: 16
- name: "Emerald"
id: 388
meta: 0
amount: 16
block: "133:0"
...
You didn't read the example on how to set up crates did you...? Yes you didn't.
If you had read it then you would know that to add players name you put it in the config like this \"%PLAYER%\"
.
Example
- "givemoney \"%PLAYER%\" 10000"
OR
- "say \"%PLAYER%\" opened a crate."
On side note this
- "broadcast \%PLAYER%\ has won 10k!"
should be replaced with this
- "broadcast \"%PLAYER%\" has won 10k!"
I've added some commands to the reward... And they won't work they do nothing.