package Ġink . pt ms . ady esh ach . common . script Ċ Ċ import Ġink . pt ms . ady esh ach . api . Ad y esh ach API Ċ import Ġink . pt ms . ady esh ach . common . entity . Entity Instance Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . Controller Generator Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . expand . Controller Look At Player Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . expand . Controller Look At Player Always Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . expand . Controller Random Look Ground Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . expand . Controller Random St roll Land Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . general . General Gravity Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . general . General Move Ċ import Ġink . pt ms . ady esh ach . common . entity . ai . general . General Smooth Look Ċ import Ġink . pt ms . ady esh ach . common . entity . manager . Manager Ċ import Ġorg . bukkit . Bu kkit Ċ import Ġorg . bukkit . Location Ċ import Ġorg . bukkit . util . Euler Angle Ċ import Ġorg . bukkit . util . Vector Ċ import Ġtab ool ib . common . Life Cycle Ċ import Ġtab ool ib . common . platform . Aw ake Ċ import Ġtab ool ib . common . platform . Skip To Ċ import Ġtab ool ib . common . platform . function . getData Folder Ċ import Ġtab ool ib . common 5 . Co erce Ċ import Ġtab ool ib . library . ke ther . Localized Exception Ċ import Ġtab ool ib . module . ke ther . Script Context Ċ import Ġtab ool ib . module . ke ther . Workspace Ċ import Ġjava . io . File Ċ Ċ @ Skip To ( Life Cycle . LOAD ) Ċ object ĠScript Handler Ġ{ ĊĊĠĠĠ Ġval Ġworkspace Ġ= ĠWorkspace ( File ( getData Folder (), Ġ" npc / script "), Ġ". ady ", ĠlistOf (" ady esh ach ")) ĊĊĠĠĠ Ġ@ Aw ake ( Life Cycle . LOAD ) ĊĠĠĠ Ġfun Ġload () Ġ{ ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Move "] Ġ= ĠController Generator ( General Move :: class . java ) Ġ{ ĠGeneral Move ( it ) Ġ} ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Gravity "] Ġ= ĠController Generator ( General Gravity :: class . java ) Ġ{ ĠGeneral Gravity ( it ) Ġ} ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Smooth Look "] Ġ= ĠController Generator ( General Smooth Look :: class . java ) Ġ{ ĠGeneral Smooth Look ( it ) Ġ} ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Look At Player "] Ġ= ĠController Generator ( Controller Look At Player :: class . java ) Ġ{ ĠController Look At Player ( it ) Ġ} ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Look At Player Always "] Ġ= ĠController Generator ( Controller Look At Player Always :: class . java ) Ġ{ ĠController Look At Player Always ( it ) Ġ} ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Random Look Ground "] Ġ= ĠController Generator ( Controller Random Look Ground :: class . java ) Ġ{ ĠController Random Look Ground ( it ) Ġ} ĊĠĠĠĠĠĠĠ ĠAd y esh ach API . registered Controller Generator [" Random St roll Land "] Ġ= ĠController Generator ( Controller Random St roll Land :: class . java ) Ġ{ ĠController Random St roll Land ( it ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġto Euler Angle ( str : ĠString ): ĠE uler Angle Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġargs Ġ= Ġstr . split (",") ĊĠĠĠĠĠĠĠ Ġreturn ĠE uler Angle ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toDouble ( args . getOrElse ( 0 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toDouble ( args . getOrElse ( 1 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toDouble ( args . getOrElse ( 2 ) Ġ{ Ġ" 0 " Ġ}) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġto Vector ( str : ĠString ): ĠVector Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġargs Ġ= Ġstr . split (",") ĊĠĠĠĠĠĠĠ Ġreturn ĠVector ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . to Integer ( args . getOrElse ( 0 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . to Integer ( args . getOrElse ( 1 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . to Integer ( args . getOrElse ( 2 ) Ġ{ Ġ" 0 " Ġ}) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġto Location ( str : ĠString ): ĠLocation Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġargs Ġ= Ġstr . split (",") ĊĠĠĠĠĠĠĠ Ġreturn ĠLocation ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBu kkit . get World ( args [ 0 ]), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toDouble ( args . getOrElse ( 1 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toDouble ( args . getOrElse ( 2 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toDouble ( args . getOrElse ( 3 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toFloat ( args . getOrElse ( 4 ) Ġ{ Ġ" 0 " Ġ}), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCo erce . toFloat ( args . getOrElse ( 5 ) Ġ{ Ġ" 0 " Ġ}) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Controller Generator ( name : ĠString ): ĠController Generator ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠAd y esh ach API . get Controller Generator ( name ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠScript Context . getManager (): ĠManager ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġroot Frame (). variables (). get < Manager ?> ("@ manager "). orElse ( null ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠScript Context . set Manager ( manager : ĠManager ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġroot Frame (). variables (). set ("@ manager ", Ġmanager ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠScript Context . get Entities (): ĠList < Entity Instance ?> ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġroot Frame (). variables (). get < List < Entity Instance ?> ?> ("@ entities "). orElse ( null ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠScript Context . set Entities ( entities : ĠList < Entity Instance ?> ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġroot Frame (). variables (). set ("@ entities ", Ġentities ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠScript Context . entity Selected (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġget Entities () Ġ!= Ġnull Ġ&& Ġget Entities () !!. filter NotNull (). isNotEmpty () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġload Error ( message : ĠString ): ĠLocal ized Exception Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠLocal ized Exception . of (" load - error . custom ", Ġmessage ) ĊĠĠĠ Ġ} Ċ }