Conditional Effects Documentation

Conditional Effects

Apply potion effects to players based on pre-defined conditions. Give everyone speed and jump boost in your hub world, night vision below Y=0, or resistance to players holding a rank permission — all from one config file, with no commands for players to remember.

Download Conditional Effects on SpigotMC

Installation

  1. Add the Conditional Effects jar to your plugins folder.
  2. Restart your server.
  3. Edit effects.yml to your liking.
  4. Type /conditionaleffects reload.

Commands

  • /conditionaleffects help — Show the help message.
  • /conditionaleffects reload — Reload the plugin.
  • /conditionaleffects give <player> <effectId> — Give a conditional effect to a player.
  • /conditionaleffects check <player> <effectId> — Manually check a conditional effect on a player.

Permissions

  • conditionaleffects.reload — Allows the user to reload the plugin.
  • conditionaleffects.give — Allows the user to give conditional effects to players.
  • conditionaleffects.check — Allows the user to manually check conditional effects on players.

Effects

Effects are defined in effects.yml. Each entry is a named group of potion effects plus the conditions that must be met for them to apply.

hub-effects:
  conditions-check-interval-ticks: 20
  effects:
  - SPEED, 1
  - JUMP_BOOST, 1
  conditions:
    worlds:
    - hub

This example effect will provide speed and jump boost effects in the hub world.

Settings

  • conditions-check-interval-ticks — The number of ticks between each condition check.
  • effects — The potion effects that will be applied when the conditions are met. In the format <EffectType>, [Amplifier], [Duration], [HideParticles], [ShowIcon].
  • conditions — The conditions that must be met in order for the effects to be applied. All conditions must be met. See the Conditions section below.

Conditions

Every condition listed on an effect must pass before the effects are applied. Omit a condition entirely to ignore it.

Location

  • worlds — Worlds that the effects will be applied in.
  • environments — Environments that the effects will be applied in (e.g. NETHER, OVERWORLD).
  • biomes — Biomes that the effects will be applied in.
  • min-x — Minimum X coordinate where the effects will be applied.
  • max-x — Maximum X coordinate where the effects will be applied.
  • min-y — Minimum Y coordinate where the effects will be applied.
  • max-y — Maximum Y coordinate where the effects will be applied.
  • min-z — Minimum Z coordinate where the effects will be applied.
  • max-z — Maximum Z coordinate where the effects will be applied.

Player

  • gamemodes — Game modes that the effects will be applied in.
  • has-permission — Effects will only be applied to players with all of these permissions.
  • missing-permission — Effects will only be applied to players who don't have any of these permissions.

State

Each of these is a tri-state. Set it to true to require the state, false to require its absence, or leave it out entirely to apply the effects regardless.

  • in-water — Whether the player is in water.
  • sneaking — Whether the player is sneaking.
  • blocking — Whether the player is blocking.
  • climbing — Whether the player is climbing.
  • gliding — Whether the player is gliding.
  • glowing — Whether the player is glowing.
  • riptiding — Whether the player is riptiding.
  • in-vehicle — Whether the player is in a vehicle.
  • sprinting — Whether the player is sprinting.
  • flying — Whether the player is flying.
  • on-fire — Whether the player is on fire.
  • frozen — Whether the player is frozen.