InteractiveBoard Docs
  • GETTING STARTED
    • Installing InteractiveBoard
    • Commands & Permissions
    • Integrations
    • Creating a board
  • Objects
    • General Information
      • Enabled
      • Properties & Placeholders
      • Conditions
      • Layout
      • Click and Hover
      • Children
      • Cache Behavior
    • Background
    • Button
    • Gif
    • Image
    • Scroll Pane
    • Skin Objects
    • Text Objects
    • Static
      • Action Listener
      • Music Player
      • Delayed Function Timer
      • Repeat Function Timer
  • Functions
    • General Information
      • Conditions
      • Delay
      • Price
    • Switch Scene
    • Game
      • Command
      • Open Crafting Table
      • Play Sound
      • Send Message
      • Switch Server
    • State
      • Scroll Change
      • Enabled
        • Set Enabled State
        • Switch Enabled State
      • Playback
        • Set Playback State
        • Switch Playback State
    • Shop
  • Conditions
    • Has money
    • Permission
  • BOARD SETTINGS
    • General
    • Displays
    • View Grouping & Default Scenes
Powered by GitBook
On this page
  1. Functions
  2. General Information

Conditions

Conditions can be used to only have a function execute if conditions are met.

Information on various types of conditions can be found here: Conditions

## Players with 'example.diamond' permission
## can get a diamond by clicking the button

diamond_button:
  type: button
  size: 256 128
  color: green
   
  on-click:
    give_function:
      type: command
      execute-from-console: true
      command: 'minecraft:give %player_name% diamond 1'
      conditions:
        perm1:
          type: permission
          permission: example.diamond
    no_perm:
      type: send_message
      message: 'You do not have the permission to get a diamond'
      conditions:
        noperm1:
          ## Negated check, it is met when player doesn't have the permission
          type: '!permission'
          permission: example.diamond      
          

Last updated 9 months ago