You may listen to any Bukkit-based event (including events added by other plugins) by referencing the imported class. For example, if you wanted to listen to org.bukkit.event.entity.EnderDragonChangePhaseEvent:
example.skimport:org.bukkit.event.entity.EnderDragonChangePhaseEventon EnderDragonChangePhaseEvent:# your code
You may also listen to multiple events with the same handler. The events do not have to be related, but you should take appropriate precautions if you try to access methods that are available in one event but not in the other. For example, if you want to listen to both org.bukkit.event.entity.ProjectileLaunchEvent and org.bukkit.event.entity.ProjectileHitEvent
example.skimport:org.bukkit.event.entity.ProjectileLaunchEventorg.bukkit.event.entity.ProjectileHitEventon ProjectileLaunchEvent and ProjectileHitEvent:# your code
skript-mirror exposes an
event expression, allowing you to access event values using reflection.
import:org.bukkit.event.entity.EnderDragonChangePhaseEventorg.bukkit.entity.EnderDragon$Phase as EnderDragonPhaseon EnderDragonChangePhaseEvent:if event.getNewPhase() is EnderDragonPhase.CIRCLING!:event.setNewPhase(EnderDragonPhase.CHARGE_PLAYER!)
The priority level of an event may be set to control when a particular event handler is run relative to other event handlers.
example.skimport:org.bukkit.event.entity.EnderDragonChangePhaseEventon EnderDragonChangePhaseEvent with priority highest:# your code
Any event priorities defined in org.bukkit.event.EventPriority may be used. Lower priority event handlers are run before higher priority event handlers.
By default, event handlers will not be called if an event is cancelled by a lower priority handler. This behavior can be changed by specifying that the handler should handle
example.skimport:org.bukkit.event.block.BlockBreakEventon all BlockBreakEvent:uncancel event