Skip to content

➤ Custom conditions

Ssomar edited this page Jan 10, 2021 · 6 revisions

How to add custom Conditions ? (exemple)

activators:
  activator1:
    activator: RIGHT_CLICK
    commands:
    - my command here
    conditions:
      customConditions:
        ifNeedPlayerConfirmation: true

All custom conditions

ifNeedPlayerConfirmation

  • example:
ifNeedPlayerConfirmation: true
  • description: The player must double click to active the activator ?
  • required: No (default false)

Placeholder conditions (require PlaceholderAPI)

ifPlaceholder

  • exemple if placeholder > TEXT:
conditions:
      customConditions:
        ifPlaceholder: "%player_name%='Ssomar'"
        ifPlaceholderMsg: "You don't have the correct name"
  • exemple if placeholder > NUMBER:
  • available symbol: < > <= >= ==
conditions:
      customConditions:
        ifPlaceholder: "%player_empty_slot%=8"
        ifPlaceholderMsg: "You need more empty slot"
  • and you can add multiple conditions like that: (max 3)
conditions:
      customConditions:
        ifPlaceholder: "%player_name%='Ssomar'"
        ifPlaceholderMsg: "You don't have the correct pseudo" 
        ifPlaceholder2: "%player_empty_slot%=8"
        ifPlaceholder2Msg: "You need more empty slot"