So, I'm looking at the SkriptParser class (https://github.com/Njol/Skript/blob/master/src/main/java/ch/njol/skript/lang/SkriptParser.java).
I'm trying to figure out where exactly skript is parsing a string into whatever skript uses to execute code.
I.E.
How does it determine that player is a valid entity for the on spawn event, or that %event-player% is actually a player? What's actually stopping nonsense like the below code from parsing:
I'm trying to figure out where exactly skript is parsing a string into whatever skript uses to execute code.
I.E.
Code:
on spawn of player:
message "lel, %event-player%" to player
How does it determine that player is a valid entity for the on spawn event, or that %event-player% is actually a player? What's actually stopping nonsense like the below code from parsing:
Code:
on spawn of chest:
teleport %event-chest% to water