Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Adds spectator start/stop/swap Paper events and spectator target event value expression

Open TheLimeGlass opened this issue 3 years ago • 0 comments

Description

Note to those that are reviewing that there are plenty of logical mathematical statements, so this will take some time.

  • Adds paper spectator events.
[on] [player] stop spectating [(of|from) %-*entitydatas%]
[on] [player] start spectating [of %-*entitydatas%]
[on] [player] (swap|switch) spectating [(of|from) %-*entitydatas%]
  • Turns the ExprSpectatorTarget into an optional event value expression spectator target when using Paper.
  • Also has time state support as Paper can grab before and after spectator targets.
  • Added documentation annotations to the class, as the original direct commit forgot to add them. #1346
  • Adds support for multiple events from SimpleExpression#setTime(int, Class<? extends Event>) to SimpleExpression#setTime(int, Class<? extends Event>...)
  • Fixes a bug where SimpleExpression#setTime(int, Expression<?>, Class<? extends Event>...) would throw an error if the default expression was null. Made it throw a SkriptAPIException because it's a developer issue if they're defining spectator target [of %-players%] with a nullable expression and not a default expression.

Target Minecraft Versions: any Requirements: Paper

TheLimeGlass avatar Aug 03 '22 05:08 TheLimeGlass