ConditionalEvents
  • ConditionalEvents Wiki
  • How to Start
  • Events Tutorial
  • Event Types
    • Player Events
    • Block Events
    • Item Events
    • Other Events
    • Plugin Events
  • Conditions
  • Actions
    • "To" Actions
    • Event Actions
    • Plugin Actions
  • Variables
  • Custom Events
  • Commands and Permissions
  • Config.yml
  • PlaceholderAPI Variables
  • API
  • Videos
  • Addons
Powered by GitBook
On this page

Was this helpful?

ConditionalEvents Wiki

Here you will learn how to properly use my plugin: https://www.spigotmc.org/resources/82271/

Description

This plugin allows you to add different conditions to certain events. If these conditions are acomplished, then custom actions will be executed. The possibilities of what you can do with the plugin are endless. To understand the plugin in a simpler way here some examples:

If a player press a button (or any block) in certain coordinates, you can execute some actions for the player, like executing a command, sending him a message, applying some potion effects, and many other actions.

example1:
    type: block_interact
    conditions:
    - '%block_x% == 20'
    - '%block_y% == 60'
    - '%block_z% == 20'
    - '%block_world% == lobby'
    - '%block% == STONE_BUTTON'
    - '%action_type% == RIGHT_CLICK'
    actions:
      default:
      - "message: &aYou''ve received $500!"
      - "console_command: eco give %player% 500"
      - "playsound: ENTITY_PLAYER_LEVELUP;10;2"

If a player damages another player with a certain item, there is a small chance of giving the victim a poison potion effect.

example2:
    type: player_attack
    conditions:
    - '%victim% == PLAYER'
    - '%item% == DIAMOND_SWORD'
    - '%item_name% == VIP Sword'
    - '%random_1_10% >= 8'
    actions:
      default:
      - 'message: &aYour diamond sword poison effect was activated!'
      - 'to_target: give_potion_effect: POISON;120;1'
      - 'to_target: message: &cYou were poisoned by &e%player%&c!'

With ConditionalEvents you can block commands, kick the players who use them or play them a sound.

example3:
    type: player_command
    conditions:
    - '%command% startsWith //calc or %command% startsWith //solve or %command% startsWith
      //eval'
    actions:
      default:
      - 'cancel_event: true'
      - 'kick: &cWhat are you trying to do?'
    ignore_with_permission: conditionalevents.ignore.example3

You can cancel events like breaking or placing blocks in certain worlds.

example4:
    type: block_break
    conditions:
    - '%block_world% == spawn'
    actions:
      default:
      - "cancel_event: true"
      - "message: &cYou can''t break blocks on this world."
      - "playsound: BLOCK_NOTE_BLOCK_PLING;10;0.1"
    ignore_with_permission: conditionalevents.ignore.event4

You can teleport the player to different places after they die depending on which world they are.

example5:
    type: player_respawn
    conditions:
    - '%player_world% equals pvp1 or %player_world% equals pvp2'
    actions:
      default:
      - "teleport: lobby;0;60;0;90;0"
      - "message: &cYou died. Teleporting you back to the PvP Lobby..."

You can constantly check if a player enters an area and execute some actions for him.

example6:
    type: repetitive
    repetitive_time: 10
    conditions:
    - '%player_world% equals spawn'
    - '%worldguard_region_name% equals survival_entrance'
    actions:
      default:
      - "console_command: warp %player% Survival"

You can give money to the player who kills another player, depending on its rank.

example7:
    type: player_kill
    conditions:
    - '%victim% == PLAYER'
    - '%target:vault_rank% == vip execute actions1'
    - '%target:vault_rank% == admin execute actions2'
    actions:
      default:
      - "message: &6You've killed &e%target:player%"
      - "message: &7You receive: &a$100"
      - "console_command: eco give %player% 100"
      actions1:
      - "message: &6You've killed &e%target:player%"
      - "message: &7Since it's a &bVIP &7player you get: &a$500"
      - "console_command: eco give %player% 500"
      actions2:
      - "message: &6You've killed &e%target:player%"
      - "message: &7Since it's an &4Admin &7player you get: &a$1000"
      - "console_command: eco give %player% 1000"

You can create a command to check another player level.

example8:
    type: player_command
    conditions:
    - "%main_command% == /checklevel"
    - "%args_length% < 1 execute error1"
    - "%parseother_{arg_1}_{player_online}% == no execute error2"
    actions:
      default:
      - "cancel_event: true"
      - "message: &aLevel of &e%arg_1% &ais: &e%otherplayer_level_{arg_1}%"
      error1:
      - "cancel_event: true"
      - "message: &cYou must use &7/checklevel <player>"
      error2:
      - "cancel_event: true"
      - "message: &cThat player is not online."
NextHow to Start

Last updated 1 year ago

Was this helpful?