Skip to content

Conditions and Executors

Draww edited this page Mar 16, 2019 · 9 revisions

With conditions and executors you will be able to completely control the rank jump process. How much money the player has, how much item has. you'il be able to run conditions like that and you can do things you want to do after rank has been raised, like sending messages, giving items.


Conditions:

  • Money It is used to check how much money is in the player.
conditions:
  example_cond:
    queue: 1
    type: MONEY
    message: "&cYou don't have enough money [&e%value%&c]" #<--- the value "%value%" comes from below.
    data:
      value: 1500.00
  • Exp It is used to check the amount of the player's exp.
conditions:
  example_cond:
    queue: 1
    type: EXP
    message: "&cYou don't have enough exp [&e%value%&c]" #<--- the value "%value%" comes from below.
    data:
      value: 5
  • Has Item It is used to check the player's items
conditions:
  example_cond:
    queue: 1
    type: HAS_ITEM
    message: "&cYou don't have %item.amount% %item.material%" #<--- the values "%item.amount%" and "%item.material%" comes from below.
    data:
      item:
        material: APPLE
        amount: 3

Executors:

  • Message Sends a message to the player who jumps to the rank
executors:
  example_exec:
    queue: 1
    type: MESSAGE
    data:
      value: "&aRank Up! &6%rank_group%" #<--- Rank placeholders: "%rank%", "%rank_group%"
  • ActionBar Message Sends a actionbar message to the player who jumps to the rank
executors:
  example_exec:
    queue: 1
    type: ACTIONBAR_MESSAGE
    data:
      value: "&aRank Up! &6%rank_group%" #<--- Rank placeholders: "%rank%", "%rank_group%"
  • Broadcast Message Sends messages to all players on the server
executors:
  example_exec:
    queue: 1
    type: BROADCAST_MESSAGE
    data:
      value: "&aRank Up! &6%player_name% &8(&e%rank_group%&8)" #<--- Rank placeholders: "%rank%", "%rank_group%"
  • Broadcast ActionBar Message Sends actionbar messages to all players on the server
executors:
  example_exec:
    queue: 1
    type: BROADCAST_ACTIONBAR_MESSAGE
    data:
      value: "&aRank Up! &6%player_name% &8(&e%rank_group%&8)" #<--- Rank placeholders: "%rank%", "%rank_group%"
  • Withdraw Money withdraws from the player who jumps to the rank.
executors:
  example_exec:
    queue: 1
    type: WITHDRAW_MONEY
    data:
      value: 500.00
  • Deposit Money deposits from the player who jumps to the rank.
executors:
  example_exec:
    queue: 1
    type: DEPOSIT_MONEY
    data:
      value: 500.00
  • Console Command Runs the command from the console.
executors:
  example_exec:
    queue: 1
    type: CONSOLE_COMMAND
    data:
      value: "say rankup"
  • Player Command Runs the command from the player.
executors:
  example_exec:
    queue: 1
    type: PLAYER_COMMAND
    data:
      value: "examplecmd"
  • Sound Plays Minecraft Sounds

sounds list

executors:
  example_exec:
    queue: 1
    type: SOUND
    data:
      value: BLOCK_ANVIL_BREAK
  • Teleport Sends the player to coordinates.
executors:
  example_exec:
    queue: 1
    type: TELEPORT
    data:
      value: World;165;25;237
  • Give Item Gives the item to the player's inventory
executors:
  example_exec:
    queue: 1
    type: GIVE_ITEM
    data:
      item:
        material: DIAMOND_BLOCK
        amount: 3
  • Remove Item Removes the item to the player's inventory
executors:
  example_exec:
    queue: 1
    type: REMOVE_ITEM
    data:
      item:
        material: APPLE
        amount: 3

A complete example:

example_rank1:
  group: example_group
  queue: 1
  icon:
    low:
      template: custom_low
    jump:
      material: DIAMOND_BLOCK:0
      amount: 1
      name: '&b%rank%'
      lores:
        - "&aYou need $1500 to raise your rank."
    high:
      template: custom_high
    equal:
      template: custom_equal
  conditions:
    cond_1:
      queue: 1
      type: MONEY
      message: "&cYou don't have enough money [&e%value%&c]"
      data:
        value: 1500.00
    cond_2:
      queue: 2
      type: HAS_ITEM
      message: "&cYou don't have %item.amount% %item.material%."
      data:
        item:
          material: APPLE
          amount: 3
  executors:
    exec_1:
      queue: 1
      type: MESSAGE
      data:
        value: "&aRank Up! &6%rank_group%"
    exec_2:
      queue: 2
      type: REMOVE_ITEM
      data:
        item:
          material: APPLE
          amount: 3
    exec_3:
      queue: 3
      type: GIVE_ITEM
      data:
        item:
          material: DIAMOND_BLOCK
          amount: 3
          name: "&b%rank_group% Gift 1"
Clone this wiki locally