Skript/Server Version
[18:52:36 INFO]: [Skript] Server Version: git-Paper-42 (MC: 1.18)
[18:52:36 INFO]: [Skript] Skript Version: 2.6.3 (selfbuilt-unknown)
[18:52:36 INFO]: [Skript] Installed Skript Addons:
[18:52:36 INFO]: [Skript] Installed dependencies: None
Bug Description
Using the apply %potioneffects% to %livingentities% effect is impossible: another pattern is matched instead of the one it should have been.
According to the EffPotion class, four patterns are registered:
apply [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)]
apply ambient [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)]
apply [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] without [any] particles to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)]
apply %potioneffects% to %livingentities%
Expected Behavior
The expected behaviour is that the fourth pattern is matched, except that the first is matched.
Steps to Reproduce
command /potion:
trigger:
set {_potion} to potion effect of slowness of tier 5 for 10 seconds
apply {_potion} to player
The apply {_potion} to player effect is not effective because it matches the syntax apply [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)].
https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/effects/EffPotion.java#L53
Errors or Screenshots
No response
Other
No response
Agreement
Skript/Server Version
Bug Description
Using the
apply %potioneffects% to %livingentities%effect is impossible: another pattern is matched instead of the one it should have been.According to the EffPotion class, four patterns are registered:
apply [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)]apply ambient [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)]apply [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] without [any] particles to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)]apply %potioneffects% to %livingentities%Expected Behavior
The expected behaviour is that the fourth pattern is matched, except that the first is matched.
Steps to Reproduce
The
apply {_potion} to playereffect is not effective because it matches the syntaxapply [potion of] %potioneffecttypes% [potion] [[[of] tier] %-number%] to %livingentities% [for %-timespan%] [(1¦replacing [the] existing effect)].https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/effects/EffPotion.java#L53
Errors or Screenshots
No response
Other
No response
Agreement