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
* Initial Commit * Add 'event-entity' with 'event-player' in parse test * Revert javadocs * Requested Changes * Improve Method Javadocs
Description
This PR aims to fix and update Event Values. (dev/patch branch)
For the
PlayerDropItemEventandPlayerPickupItemEventusingevent-entitywas throwing a parse error ofmultiple entitieswhich should not be the case. The easy solution to this was to register anEntityvalue directly to these classes. Though in their correspondingSkriptEvents they are paired with theirEntitycounterparts, insideEventValueExpression#initonly the Player event was being accessed.Adds the
#setTimeintoExprEntitywhich utilizesEventValueExpression#setTimeallowing past and futureevent-%entitydata%resulting in the fix of not being able to grab thefuture event-entityinItemMergeEventAdds a new method within
EventValues,#stripConvertersThough the
PlayerTradeEventcould have easily been fixed by changing the valueClass of the registered event value fromAbstractVillagertoEntity(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.sktest which sole purpose is to look for parse errors.Had to fix
EffDetonate.skbecauseEffSecSpawn.lastSpawnedwas being overwritten by the dropped items that spawned.Also changes variable names within
EventValuesto match what they areTarget Minecraft Versions: any
Requirements: none
Related Issues: none