DaPigGuy / PiggyCrates

A crate plugin for PocketMine-MP supporting unlimited crate types
https://piggydocs.aericio.net/PiggyCrates.html
Apache License 2.0
31 stars 41 forks source link

Feature Request - Re-Add Per-Item commands for crate drops. #54

Closed 95CivicSi closed 4 years ago

95CivicSi commented 4 years ago

General

Per-Item commands are no longer available for crate drops as of version 2.0.0. This option was previously supported and made it possible to add non-item rewards such as money or additional keys to the loot pool.

Version:

Extra Information

It should be noted that this is not supplemented by the "commands" option that runs anytime a player uses the crate:

  legendary:
    amount: 1
    commands: []  #<--- This does not provide the same support as the previous option
    floating-text: "Legendary Crate"

Leaving the crate specific command would be ok, but item specific commands should be available This is how the previous version worked:

drops:
  - name: "§aMoney Cookie!"
    id: 357
    meta: 0
    amount: 10
    chance: 20
    lore: "§5This cookie came with a money reward"
    commands:
      - givemoney %PLAYER% 1000000
      - broadcast §6§l§k||§r§a§l%PLAYER% just got $1,000,000 from a Legendary key§6§l§k

It may be useful to modify this behavior so that command rewards do not require an item

For example:

drops:
  - type: item
    name: "Legendary Sword"
    id: 276
    meta: 0
    amount: 1
    chance: 15
    enchantments:
      - name: Deathbringer
        level: 3

  - type: command
    name: "Just Money"
    chance: 20
    commands:
      - givemoney %PLAYER% 1000000
      - broadcast §6§l§k||§r§a§l%PLAYER% just got $1,000,000 from a Legendary key§6§l§k

  - type: mixed
    name: "§aMoney Cookie!"
    id: 357
    meta: 0
    amount: 10
    chance: 20
    lore: "§5This cookie came with a money reward"
    commands:
      - givemoney %PLAYER% 1000000
      - broadcast §6§l§k||§r§a§l%PLAYER% just got $1,000,000 from a Legendary key§6§l§k
DaPigGuy commented 4 years ago

This still exists.