Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework EffectLib Integration #384

Merged
merged 1 commit into from Aug 27, 2022

Conversation

tal5
Copy link
Member

@tal5 tal5 commented Aug 25, 2022

Additions

  • effectlib command:
  • target:<entity>/<location> argument - sets the effects target, used by effects such as the Line effect.
  • for:<player> argument - makes the effect visible to the specified player only.
  • effect_data:<map> argument - used to set EffectLib options, I.e. [particle=flame] to make an effect use flame particles.
  • getEffectLibLocationFrom(ObjectTag object, TagContext context) method - converts an ObjectTag to an EffectLib location, or displays an error and returns null.

Changes

  • effectlib command:
  • Deprecated the duration, location, and old target arguments, and the use of case-insensitive effect names, with SlowWarnings for each.
  • It is now ~waitable. when ~waited for, it will wait until the effect is done playing.
  • Updated to modern command argument handling.

Notes

  • As the old target:<entity> argument and the new target:<entity>/<location> argument have the same name, the command determines which one is used based on whether origin: was used.
  • While the effectlib command technically allowed specifying effect names without the type: prefix, it was never in the command syntax (see 73e9faf), so the prefix is now required.

}
public static Warning durationArgument = new SlowWarning("effectlibCommandDuration", "The 'duration:<duration>' argument for the 'effectlib' command is deprecated in favour of the 'duration' key in the 'effect_data' map, refer to the meta docs for more information.");
public static Warning oldTargetArguments = new SlowWarning("effectlibCommandOldTarget", "The 'target:<entity>'/'location:<location>' arguments for the 'effectlib' command are deprecated in favour of the 'origin:<entity>/<location>' argument.");
public static Warning caseInsensitiveEffectName = new SlowWarning("effectlibCommandCaseInsensitiveType", "Case-Insensitive effect types in the 'effectlib' commands are deprecated. make sure you're using correct casing.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels weird for this to be a deprecation - should probably be the other way around if anything - aim to support case-insensitivity better rather than plan its removal.

@mcmonkey4eva mcmonkey4eva merged commit c5c5a1d into DenizenScript:master Aug 27, 2022
@tal5 tal5 deleted the EffectLib_Command_Update branch August 28, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants