Ajneb97 / ConditionalEvents

MIT License
22 stars 12 forks source link

Removing non-existent effect from player causes error #50

Closed KhrysAK47 closed 7 months ago

KhrysAK47 commented 7 months ago

We have an Event that removes specific potion effects from player upon death just to ensure they don't have it, and it seems that if they die without the effect the following error is sent: https://pastebin.com/w1Z0dbwY

  WORLDGUARD_DEATH:
    type: player_death
    conditions:
    - '%worldguard_region_name% contains floor'
    actions:
      default:
      - 'console_command: svar reset %worldguard_region_name% silent:true'
      - 'wait_ticks: 5'
      - 'console_command: espawn %player_name%'
      - 'wait_ticks: 20'
      - 'remove_potion_effect: BLINDNESS'
      - 'remove_potion_effect: SLOWNESS'
    enabled: true
Ajneb97 commented 7 months ago

SLOWNESS is not a correct potion effect type, it's SLOW: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html