1.8.8 getting the $ value of an item with vault

Discussion in 'Spigot Plugin Development' started by M4tt_H4wk, Mar 7, 2020.

  1. I am trying to make it so when a block is placed in creative, the value of the block is taken from the player.

    I can't find a way to get the value of the placed block

    e.getblock().getprice kind of this is what I want

    Is there any way to do this?
     
  2. Choco

    Moderator

    An item's value is not defined by Vault. It's defined by individual economy plugins (if they even have an item value system)
     
  3. You can use an hashmap.

    i.e Material.STONE_BLOCK as the key, 10.0 as the value.

    So when a user break a block, check if hashmap contains the material of the block and if so remove the price from the player wallet