Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Effect Command API Enhancement & Skript Event Support

Open NotSoDelayed opened this issue 1 year ago • 0 comments

Description

This PR provides enhancements on how Effect Commands are handled, and adds Skript event support for users to listen to.

API Change: EffectCommandEvent Currently, this event is only called whenever the parsed effect is valid. With this PR, the event is now called whenever an effect command attempt is done. The said event class now has a nullable Effect field to determine whether the parsed effect is valid. Due to this change, EffectCommandEvent#setCommand(String) has been removed due to unavailable better alternative to retain this method whilst returning the parsed effect.

Skript Event Support With this PR, users are able to listen to EffectCommandEvent.

Event values:

  • event-sender -- returns the effect command executor (player/console)
  • [the] command -- from ExprCommand, returns the string command

Syntaxes:

  • Condition: [the] effect [command] is [not:(not |in)]valid -- checks whether the parsed effect command in EffectCommandEvent is valid

Target Minecraft Versions: any Requirements: none Related Issues: none

NotSoDelayed avatar Apr 19 '24 06:04 NotSoDelayed