SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.08k stars 373 forks source link

'ender crystal' taking priority for heal reason #5675

Closed Fusezion closed 1 year ago

Fusezion commented 1 year ago

Skript/Server Version

22:44:14 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[22:44:14 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[22:44:14 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[22:44:14 INFO]: [Skript] Server Version: git-Paper-521 (MC: 1.19.4)
[22:44:14 INFO]: [Skript] Skript Version: 2.7.0-beta2 (skriptlang-github)
[22:44:14 INFO]: [Skript] Installed Skript Addons: 
[22:44:14 INFO]: [Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[22:44:14 INFO]: [Skript]  - SkBee v3.0-custom (https://github.com/ShaneBeee/SkBee)
[22:44:14 INFO]: [Skript] Installed dependencies: 
[22:44:14 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

When using ender crystal in any event, atleast the damage event my only tested one you'll be sent a parser error for comparing an entity with a heal reason

Expected Behavior

Skript wouldn't error and properly tell if ender crystal is comparing an entity

Steps to Reproduce

on damage:
  attacker is ender crystal

Errors or Screenshots

image

Other

Issue looked into only after discord thread listed here on the SkUnity discord server

Agreement

TheLimeGlass commented 1 year ago

Referenced pull request will fix the solution.

Until then, you can use

attacker is "ender crystal" parsed as entity type

or 

attacker is a ender crystal

To get around parsing issues. The a hacky solution uses the nouns of the EntityData type which is @an to differentiate it between a heal reason as heal reason is @a