package Ġli rand . api . dsl . menu . builders . fixed Ċ Ċ import Ġcom . github . sh yn ix n . m cc or outine . minecraft Dispatcher Ċ import Ġkotlinx . coroutines . Coroutine ExceptionHandler Ċ import Ġkotlinx . coroutines . Coroutine Scope Ċ import Ġkotlinx . coroutines . Supervisor Job Ċ import Ġkotlinx . coroutines . launch Ċ import Ġli rand . api . dsl . menu . ex posed . Menu Slot Interact Event Ċ import Ġli rand . api . dsl . menu . ex posed . Player Menu Slot Update Event Ċ import Ġli rand . api . dsl . menu . ex posed . fixed . Static Slot EventHandler Ċ import Ġorg . bukkit . inventory . Inventory Ċ import Ġorg . bukkit . plugin . Plugin Ċ Ċ type alias ĠMenu Player Slot Update Callback < I > Ġ= ĠPlayer Menu Slot Update Event < I >. ( scope : ĠCor outine Scope ) Ġ-> ĠUnit Ċ type alias ĠMenu Player Slot Interact Callback < I > Ġ= ĠMenu Slot Interact Event < I >. ( scope : ĠCor outine Scope ) Ġ-> ĠUnit Ċ Ċ open Ġclass ĠStatic Slot DS LE vent Handler < I Ġ: ĠInventory >( override Ġval Ġplugin : ĠPlugin ) Ġ: ĠStatic Slot EventHandler < I > Ġ{ ĊĊ ĉ protected Ġval Ġscope Ġ= ĠCor outine Scope ( Ċĉ ĉ plugin . minecraft Dispatcher Ġ+ ĠSuper visor Job () Ġ+ Ċĉĉĉ ĉ Coroutine ExceptionHandler Ġ{ Ġ_, Ġexception Ġ-> Ġexception . printStackTrace () Ġ} Ċ ĉ ) ĊĊ ĉ val Ġinteract Callbacks Ġ= Ġmutable ListOf < Menu Player Slot Interact Callback < I >>() Ċ ĉ val Ġupdate Callbacks Ġ= Ġmutable ListOf < Menu Player Slot Update Callback < I >>() ĊĊ ĉ override Ġfun Ġhandle Interact ( interact Event : ĠMenu Slot Interact Event < I >) Ġ{ Ċĉ ĉ for Ġ( callback Ġin Ġinteract Callbacks ) Ġ{ Ċĉĉ ĉ scope . launch Ġ{ Ċĉĉĉ ĉ callback ( interact Event , Ġthis ) Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ override Ġfun Ġhandle Update ( update Event : ĠPlayer Menu Slot Update Event < I >) Ġ{ Ċĉ ĉ for Ġ( callback Ġin Ġupdate Callbacks ) Ġ{ Ċĉĉ ĉ scope . launch Ġ{ Ċĉĉĉ ĉ callback ( update Event , Ġthis ) Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ override Ġfun Ġclone ( plugin : ĠPlugin ): ĠStatic Slot DS LE vent Handler < I > Ġ{ Ċĉ ĉ return ĠStatic Slot DS LE vent Handler < I >( plugin ). also Ġ{ Ċĉĉ ĉ it . interact Callbacks . addAll ( interact Callbacks ) Ċĉĉ ĉ it . update Callbacks . addAll ( update Callbacks ) Ċĉ ĉ } Ċ ĉ } Ċ Ċ }