package Ġnet . star legacy . listener . gear Ċ Ċ import Ġnet . star legacy . PLUGIN Ċ import Ġnet . star legacy . feature . machine . Area Shield s Ċ import Ġnet . star legacy . feature . misc . Custom Items Ċ import Ġnet . star legacy . listener . S LE vent Listener Ċ import Ġnet . star legacy . util . Tasks Ċ import Ġorg . bukkit . Material Ċ import Ġorg . bukkit . Sound Ċ import Ġorg . bukkit . block . Block Ċ import Ġorg . bukkit . block . Block Face Ċ import Ġorg . bukkit . entity . Living Entity Ċ import Ġorg . bukkit . event . EventHandler Ċ import Ġorg . bukkit . event . Event Priority Ċ import Ġorg . bukkit . event . block . Action Ċ import Ġorg . bukkit . event . block . Block Explo de Event Ċ import Ġorg . bukkit . event . player . Player Interact Event Ċ import Ġorg . bukkit . util . Vector Ċ import Ġjava . util . ArrayList Ċ Ċ object ĠDet on ator Listener Ġ: ĠS LE vent Listener () Ġ{ Ċ ĉ @ EventHandler ( priority Ġ= ĠEvent Priority . LOW EST ) Ċ ĉ fun Ġon Throw Det on ator ( event : ĠPlayer Interact Event ) Ġ{ Ċĉ ĉ if Ġ( event . action Ġ!= ĠAction . RIGHT _ CLICK _ BLOCK Ġ&& Ġevent . action Ġ!= ĠAction . RIGHT _ CLICK _ AIR ) Ġ{ Ċĉĉ ĉ return Ċĉ ĉ } ĊĊĉ ĉ val Ġitem Ġ= Ġevent . item Ġ?: Ġreturn Ċĉ ĉ val Ġcustom Item Ġ= ĠCustom Items [ item ] ĊĊĉ ĉ if Ġ( custom Item Ġ!= ĠCustom Items . DE TON ATOR ) Ġ{ Ċĉĉ ĉ return Ċĉ ĉ } ĊĊĉ ĉ event . is Cancelled Ġ= Ġtrue Ċĉ ĉ val Ġplayer Ġ= Ġevent . player Ċĉ ĉ val Ġnew Item Ġ= Ġitem . clone () Ċĉ ĉ new Item . amount Ġ= Ġ 1 Ċĉ ĉ val Ġde ton ator Ġ= Ġplayer . world . drop Item ( player . eye Location , Ġnew Item ) Ċĉ ĉ de ton ator . pickup Delay Ġ= ĠInteger . MAX _ VALUE Ċĉ ĉ de ton ator . velocity Ġ= Ġplayer . location . direction Ċĉ ĉ player . world . play Sound ( player . location , Ġ" las er ", Ġ 5 f , Ġ 0 . 5 f ) Ċĉ ĉ if Ġ( de ton ator . is Dead ) Ġ{ Ċĉĉ ĉ return Ċĉ ĉ } Ċĉ ĉ Tasks . bukkit Runnable Ġ{ Ċĉĉ ĉ if Ġ( de ton ator . is Dead ) Ġ{ Ċĉĉĉ ĉ cancel () Ċĉĉĉ ĉ return @ bukkit Runnable Ċĉĉ ĉ } ĊĊĉĉ ĉ if Ġ( de ton ator . velocity . distance ( Vector ( 0 , Ġ 0 , Ġ 0 )) Ġ== Ġ 0 . 0 Ġ&& Ġde ton ator . ticks L ived Ġ< Ġ 2 0 Ġ* Ġ 1 . 5 ) Ġ{ Ċĉĉĉ ĉ player . world . play Sound ( de ton ator . location , ĠSound . BLOCK _ NOTE _ BLOCK _ B ELL , Ġ 1 0 f , Ġ 1 . 0 f ) Ċĉĉĉ ĉ return @ bukkit Runnable Ċĉĉ ĉ } ĊĊĉĉ ĉ val Ġhit Block Ġ= Ġde ton ator . location . add ( de ton ator . velocity ). block Ċĉĉ ĉ val Ġtype Ġ= Ġhit Block . type ĊĊĉĉ ĉ if Ġ(! de ton ator . is On Ground Ġ&& Ġde ton ator . ticks L ived Ġ< Ġ 2 0 Ġ* Ġ 1 . 5 Ġ&& Ġ( type Ġ== ĠMaterial . AIR Ġ|| Ġhit Block . is Liquid )) Ġ{ Ċĉĉĉ ĉ return @ bukkit Runnable Ċĉĉ ĉ } ĊĊĉĉ ĉ de ton ator . set Gravity ( false ) Ċĉĉ ĉ de ton ator . velocity Ġ= ĠVector ( 0 , Ġ 0 , Ġ 0 ) ĊĊĉĉ ĉ Tasks . sync Delay ( Math . max ( 1 . 0 , Ġ 2 0 Ġ* Ġ 1 . 5 Ġ- Ġde ton ator . ticks L ived ). to Long ()) Ġ{ Ċĉĉĉ ĉ de ton ator . remove () ĊĊĉĉĉ ĉ val Ġblocks Ġ= ĠArrayList < Block >() Ċĉĉĉ ĉ val Ġblock Ġ= Ġde ton ator . location . block ĊĊĉĉĉ ĉ for Ġ( x Ġin Ġ- 2 .. 2 ) Ġ{ Ċĉĉĉĉ ĉ for Ġ( y Ġin Ġ- 2 .. 2 ) Ġ{ Ċĉĉĉĉĉ ĉ for Ġ( z Ġin Ġ- 2 .. 2 ) Ġ{ Ċĉĉĉĉĉĉ ĉ val Ġto Explo de Ġ= Ġblock . get Relative ( Block Face . EAST , Ġx ) Ċĉĉĉĉĉĉĉ ĉ . get Relative ( Block Face . UP , Ġy ) Ċĉĉĉĉĉĉĉ ĉ . get Relative ( Block Face . SO UTH , Ġz ) ĊĊĉĉĉĉĉĉ ĉ if Ġ( to Explo de . type Ġ!= ĠMaterial . AIR ) Ġ{ Ċĉĉĉĉĉĉĉ ĉ blocks . add ( to Explo de ) Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ } Ċĉĉĉĉ ĉ } Ċĉĉĉ ĉ } ĊĊĉĉĉ ĉ val Ġblock Explo de Event Ġ= ĠBlock Explo de Event ( block , Ġblocks , Ġ 0 . 1 2 3 f ) Ċĉĉĉ ĉ Area Shield s . bypass Shield Events . add ( block Explo de Event ) Ċĉĉĉ ĉ player . world . create Explo sion ( de ton ator , Ġ 1 f , Ġfalse , Ġfalse ) Ċĉĉĉ ĉ player . world . play Sound ( de ton ator . location , ĠSound . ENTITY _ GENERIC _ EXP LO DE , Ġ 1 0 f , Ġ 0 . 5 f ) ĊĊĉĉĉ ĉ if Ġ(! block Explo de Event . call Event () Ġ&& Ġ! de ton ator . world . name . lowercase (). contains (" arena ")) Ġ{ Ċĉĉĉĉ ĉ return @ sync Delay Ċĉĉĉ ĉ } ĊĊĉĉĉ ĉ blocks . forEach Ġ{ Ġit . setType ( Material . AIR , Ġfalse ) Ġ} ĊĊĉĉĉ ĉ de ton ator . world . get Near by Entities ( de ton ator . location , Ġ 4 . 0 , Ġ 4 . 0 , Ġ 4 . 0 ) Ċĉĉĉĉ ĉ . stream (). map Ġ{ Ġit Ġas ? ĠL iving Entity Ġ} Ċĉĉĉĉ ĉ . forEach Ġ{ Ġit ?. damage ( 8 0 . 0 Ġ/ Ġit . location . distance ( de ton ator . location ), Ġplayer ) Ġ} Ċĉĉ ĉ } Ċĉ ĉ }. run Task Timer ( PLUGIN , Ġ 1 , Ġ 1 ) Ċĉ ĉ item . amount Ġ= Ġ 0 Ċ ĉ } Ċ } Ċ