Bug Report: About Region + Consume Potion
Panic-exe opened this issue ยท 6 comments
Skript/Server Version
[04:20:55 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[04:20:55 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[04:20:55 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[04:20:55 INFO]: [Skript] Server Version: git-Paper-393 (MC: 1.20.4)
[04:20:55 INFO]: [Skript] Skript Version: 2.8.2 (skriptlang-github)
[04:20:55 INFO]: [Skript] Installed Skript Addons:
[04:20:55 INFO]: [Skript] - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[04:20:55 INFO]: [Skript] - skript-bossbar v1.0
[04:20:55 INFO]: [Skript] - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[04:20:55 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[04:20:55 INFO]: [Skript] - SkJson v3.0.3 (https://www.skjson.xyz/)
[04:20:55 INFO]: [Skript] - SkBee v3.3.0 (https://github.com/ShaneBeee/SkBee)
[04:20:55 INFO]: [Skript] Installed dependencies:
[04:20:55 INFO]: [Skript] - Vault v1.7.3-b131
[04:20:55 INFO]: [Skript] - WorldGuard v7.0.9+5934e49
Bug Description
When u write the code like the code below, the event "consume" works with region...
on consume of potion of invisibility:
wait 5 ticks
if "%region at player%" contains "test":
But, if u write the code below, the code dont work.
on consume of potion of invisibility:
wait 5 ticks
if region is "test":
(I tried with)
On region enter:
On region leave:
And the
if region is "test":
Works normally, soo in conclusion, it is a bug.
Expected Behavior
Like in the description above
Steps to Reproduce
Like in the description above
Errors or Screenshots
No response
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
with the fixed formatting, from what I see it's just inability to convert an event-value to a region. since from what I get he says region at ...
is working as intended which makes sense we're passing a location. region
is failing which seems more like an event-value converter returning null. it doesn't seem to be erroring so I ruled out the possibility of using region type
This isn't a converter issue, per se.
There is no event-region in the consume event, so it just parses as the region
class info.
Essentially testing if "test" is a region.
You should be using if player is in region "test"
.
I don't think this is a bug, but I'd like some more opinions before closing.
Arguably this behaviour is unintuitive, so maybe it's something we should look into?
I don't think this is a bug, but I'd like some more opinions before closing.
Agree. We can however make ExprRegionsAt have an optional location so it always defaults to the event's location however not sure if this may cause conflicts with event-region. Anyways, the correct usage is region at player
.
I don't think this is a bug, but I'd like some more opinions before closing.
Arguably this behaviour is unintuitive, so maybe it's something we should look into?
maybe. another thing to know is that the region support is eventually planned to be split out into skript-worldguard.