V-BlockRewards | Gives rewards for breaking blocks (Abandoned) [1.8-1.19] icon

V-BlockRewards | Gives rewards for breaking blocks (Abandoned) [1.8-1.19] -----

Block-breaking rewards with item, permission and location conditions.



[​IMG]

V-BlockRewards is a plugin that allows you to give rewards to players when they are breaking a certain block, or also have a specific item with which they broke the block. Among other things.


[​IMG]
Code (YAML):
Config:
  Messages
:
    no-permission
: '&8 [&bV-BlockRewards&8 ] &cYou don''t have permissions.'
  BlockRewards
:
    Example1
:
      ignore-block
: false
      ignore-item
: false
      Blocks
:
        Obsidian
:
          id
: OBSIDIAN
          data
: 0
          drop-break-block
: true
      Items
:
        OnsePickaxe
:
          item-type
: custom
          id
: DIAMOND_PICKAXE
          data
: 0
          name-conditional
: equals
          lore-conditional
: contains
          enchants-conditional
: ignore
          name
: '&a&lOnse Pickaxe'
          lore
:
          - ''
          - '&eA hard pickaxe to break'
          - '&eobsidian and receive special'
          - '&erewards.'
          - ''
          enchants
:
          - DIG_SPEED;;5
          - LOOT_BONUS_BLOCKS;;3
          - DURABILITY;;3
        IronPickaxe
:
          item-type
: vanilla
          id
: IRON_PICKAXE
          data
: 0
      Rewards
:
        Reward1
:
          chance
: 5
          locations
: true
          location-list
:
         - ' [region ] Spawn'
          permission-required
: true
          permission
: VBReward.vip
          commands
:
          - ' [console_command ] eco give %player_name% 10000'
          - ' [message ] &b&lRewards &8&m*&r &7You received &a$&710000'
          - ' [title ] &e&lVIP;;&2+&a$&710000'
        Reward2
:
          chance
: 2
          locations
: true
          location-list
:
         - ' [world ] world'
          permission-required
: false
          commands
:
          - ' [console_command ] eco give %player_name% 500'
          - ' [message ] &b&lRewards &8&m*&r &7You received &a$&7500'
    Example2
:
      ignore-block
: false
      ignore-item
: false
      Blocks
:
        Acacia
:
          id
: ACACIA_LOG
          data
: 0
          drop-break-block
: true
        Birch
:
          id
: BIRCH_LOG
          data
: 0
          drop-break-block
: true
        DarkOak
:
          id
: DARK_OAK_LOG
          data
: 0
          drop-break-block
: true
        Jungle
:
          id
: JUNGLE_LOG
          data
: 0
          drop-break-block
: true
        Oak
:
          id
: OAK_LOG
          data
: 0
          drop-break-block
: true
        Spruce
:
          id
: SPRUCE_LOG
          data
: 0
          drop-break-block
: true
      Items
:
        HerdAxe
:
          item-type
: custom
          id
: IRON_AXE
          data
: 0
          name-conditional
: equals
          lore-conditional
: contains
          enchants-conditional
: contains
          name
: '&c&lHerd &7&lAxe'
          lore
:
          - ''
          - '&7By breaking wood you have'
          - '&7a chance of getting &a&lEnot &7Keys.'
          - ''
          enchants
:
          - DIG_SPEED;;5
          - DURABILITY;;3
      Rewards
:
        Reward1
:
          chance
: 3
          locations
: false
          permission-required
: false
          commands
:
         - ' [console_command ] crazycrates give physical Enot 1 %player_name%'
        Reward2
:
          chance
: 1.5
          locations
: false
          permission-required
: false
          commands
:
         - ' [console_command ] crazycrates give physical Enot 2 %player_name%'
        Reward3
:
          chance
: 0.1
          locations
: false
          permission-required
: false
          commands
:
         - ' [console_command ] crazycrates give physical Enot 7 %player_name%'
          - ' [title ] &c&lSPECIAL;;&7You received 7 &a&lEnot Keys&7.'


[​IMG]
[1] Blocks: You can put a list of the blocks that when breaking them the players receive the rewards and with the option of drop-break-block, that when having it in false the broken block will not be dropped or given to the player.
Code (YAML):
     Blocks:
        Acacia
:
          id
: ACACIA_LOG
          data
: 0
          drop-break-block
: true
        Birch
:
          id
: BIRCH_LOG
          data
: 0
          drop-break-block
: true
        DarkOak
:
          id
: DARK_OAK_LOG
          data
: 0
          drop-break-block
: true
        Jungle
:
          id
: JUNGLE_LOG
          data
: 0
          drop-break-block
: true
        Oak
:
          id
: OAK_LOG
          data
: 0
          drop-break-block
: true
        Spruce
:
          id
: SPRUCE_LOG
          data
: 0
          drop-break-block
: true
[2] Items: You have the option to be able to give the rewards to players if they also broke the block with a certain item.
They can also have a list of items that you want the rewards to be given.
There are two types of items (item-type), custom and vanilla.

Custom: The custom item allows you to detect the Name, Lore and Enchantments, and if you don't want any of these options to be ignored you can set the item's conditional to ignore.
Code (YAML):
       HerdAxe:
          item-type
: custom
          id
: IRON_AXE
          data
: 0
          name-conditional
: equals
          lore-conditional
: contains
          enchants-conditional
: contains
          name
: '&c&lHerd &7&lAxe'
          lore
:
          - ''
          - '&7By breaking wood you have'
          - '&7a chance of getting &a&lEnot &7Keys.'
          - ''
          enchants
:
          - DIG_SPEED;;5
          - DURABILITY;;3
equals: Detects that the lore of the item is exactly the lore registered in the Config.
Code (YAML):

       lore-conditional
: equals
       lore
:
        - '&r'
       - '&7Get &eX2 &7diamonds when mining'
       - '&7using this pickaxe and a chance'
       - '&7to get money.'
       - '&r'
       - '&eMoney Chance
: &71%'
       - ''
 
[​IMG]


contains: Checks that the lore of the item contains the lines that are in the Config, in the same order as it is found, ignoring the other lines of the item.
Code (YAML):

       lore-conditional
: contains
       lore
:
        - '&7Get &eX2 &7diamonds when mining'
       - '&7using this pickaxe and a chance'
       - '&7to get money.'
       
[​IMG]


contains-lines: This conditional checks each line in lore in the Config separately. Here it does not matter the order of lore in Config. It is not necessary that the lore in Config has all the words of the line of the item. (Ex. If the item has a line of its lore like "This pickaxe give you X2 diamonds" and in the Config you registered that it detects "This pickaxe give" the item will not be dropped because it contains some words of the lore of the item).
Code (YAML):

       lore-conditional
: contains-lines
       lore
:
       - '&7Get &eX2 &7diamonds when mining'
       - '&7to get money.'
     
[​IMG]
Code (YAML):

       lore-conditional
: contains-lines
       lore
:
       - '&7Get &eX2 &7diamonds'
       - '&7get money.'
       
[​IMG]
Vanilla: The vanilla items will only detect the material of the item, no matter if the item has a name, lore or enchantments, the reward will still be given.
Code (YAML):
       IronPickaxe:
          item-type
: vanilla
          id
: IRON_PICKAXE
          data
: 0

[3] Rewards: The rewards section allows you to perform actions for the player or the players.
  • You can set a probability for those actions to be executed.
  • You can place where you want these actions to be executed.
If you want the actions section to be given in a world or region of WorldGuard, this option will allow you to do so by setting the locations option to true and in location-list place the places where you want the rewards to be given.
Requirements:
Region:
- Plugins WorldGuard and PlaceholderAPI (Not required for the plugin to work)
- Have WorldGuard extension in PlaceholderAPI for the regions option to work.
> How can I add it? With the command /papi ecloud download WorldGuard.​
World:
No requirements.​
  • You can set a permission for a section of actions to be executed.
Code (YAML):
       Reward1:
          chance
: 5
          locations
: true
          location-list
:
          - ' [region ] Spawn'
          - ' [world ] world'
          permission-required
: true
          permission
: VBReward.vip
          commands
:
          - ' [console_command ] eco give %player_name% 10000'
          - ' [message ] &b&lRewards &8&m*&r &7You received &a$&710000'
          - ' [title ] &e&lVIP;;&2+&a$&710000'
        Reward2
:
          chance
: 2.5
          locations
: false
          permission-required
: false
          commands
:
          - ' [console_command ] eco give %player_name% 500'
          - ' [message ] &b&lRewards &8&m*&r &7You received &a$&7500'

List of Actions you can execute:
- [console_command] | Execute commands from the console
- [player_command] | Executes a command as the player.
- [message] | Send a message to the player.
- [broadcast_message] | Send a message to all players
- [title] | Sends an on-screen message to the player
The title and subtitle are separated by a semicolon ( ;; ).
Example: [title] You received;;five diamonds.​
- [broadcast_title] | Sends an on-screen message to all players.
The title and subtitle are separated by a semicolon ( ;; ).
Example: [broadcast_title] You received ;;five diamonds.​
- [sound] | Make the player hear a sound.
- [json] Send a chat message to the player. These messages allow you to add click and hover events. You can create JSON messages from this link: https://www.minecraftjson.com/
- [json_broadcast] | Send a chat message to all players. These messages allow you to add click and hover events. You can create JSON messages from this link: https://www.minecraftjson.com/
When either of these options is set to true, either the block or item will be ignored; for example, if ignore-block is set to true, any block that breaks with the item will execute the actions, and vice versa, if ignore-item is set to true, any item that breaks the block will execute the actions. And if both are set to true, any block that breaks with any item will execute the actions.



[​IMG]
  • /vbr reload | vbr.admin
Resource Information
Author:
----------
Total Downloads: 129
First Release: Oct 1, 2022
Last Update: Nov 8, 2022
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings