%entitytype% may return null
Anarchick opened this issue ยท 1 comments
Skript/Server Version
[12:53:00 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[12:53:00 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[12:53:00 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[12:53:00 INFO]: [Skript] Server Version: git-Paper-450 (MC: 1.20.4)
[12:53:00 INFO]: [Skript] Skript Version: 2.8.4 (skriptlang-github)
[12:53:00 INFO]: [Skript] Installed Skript Addons:
[12:53:00 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[12:53:00 INFO]: [Skript] - Skript-Packet v2.2.1 (www.github.com/Anarchick/skript-packet)
[12:53:00 INFO]: [Skript] Installed dependencies: None
Bug Description
%entitytype% may return null.
Expected Behavior
Return Skript EntityType or SimpleEntityData
Steps to Reproduce
# test1(pig)
function test1(t: entitytype):
broadcast "> %{_t}%" # output pig
# test2(pig)
function test2(t: object):
broadcast "> %{_t}%" # output <none>
# test2(type of pig)
function test2(t: object):
broadcast "> %{_t}%" # output pig
Errors or Screenshots
No response
Other
I was trying to add support for %entitytype% on Skript-Packet ExprNMS But when I execute the command nms of pig
it return null.
protected Object @NotNull [] get(@NotNull Event e) {
final Object obj = expr.getSingle(e);
System.out.println("obj = " + obj); // output null when trying %entitytype%
Agreement
- I have read the guidelines above and affirm I am following them with this report.
This is likely trying to use an event-entity and converting it to an entitytype. However, whatever event-entity is provided is not a pig, so pig
is not set. Therefore, its entity type is also not set.
I would think this is a bug, but I'm not sure how to properly address it. Perhaps (i can't find it right now) the issue/pr suggesting that we force the use of event-
would solve this confusion, but again, not sure if that's an appropriate response.
Would love more opinions.