-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Values Fix #7599
base: dev/patch
Are you sure you want to change the base?
Event Values Fix #7599
Conversation
This sounds good and looks alright from a skim. I'm worried about the delegate function though. If a Player value is registered (assume it's the only event-value for this event), does it still allow |
Yes, the I also have it to where the method is only used after the first and second loops, as those loops are what covers the |
7063d26
to
7495475
Compare
# Conflicts: # src/main/java/ch/njol/skript/registrations/EventValues.java
Description
This PR aims to fix and update Event Values. (dev/patch branch)
For the
PlayerDropItemEvent
andPlayerPickupItemEvent
usingevent-entity
was throwing a parse error ofmultiple entities
which should not be the case. The easy solution to this was to register anEntity
value directly to these classes. Though in their correspondingSkriptEvent
s they are paired with theirEntity
counterparts, insideEventValueExpression#init
only the Player event was being accessed.Adds the
#setTime
intoExprEntity
which utilizesEventValueExpression#setTime
allowing past and futureevent-%entitydata%
resulting in the fix of not being able to grab thefuture event-entity
inItemMergeEvent
Adds a new method within
EventValues
,#delegateConverters
Though the
PlayerTradeEvent
could have easily been fixed by changing the valueClass of the registered event value fromAbstractVillager
toEntity
(dont know why it's like that in the first place, as we dont register a class info for abstract villager)However, I believe this addition can be beneficial.
Finally, adds an
EventValues.sk
test which sole purpose is to look for parse errors.Had to fix
EffDetonate.sk
becauseEffSecSpawn.lastSpawned
was being overwritten by the dropped items that spawned.Also changes variable names within
EventValues
to match what they areTarget Minecraft Versions: any
Requirements: none
Related Issues: none