package Ġme . ify dev . world spawn . sp ig ot . events čĊč Ċ import Ġme . ify dev . world spawn . api . structures . Location č Ċ import Ġme . ify dev . world spawn . sp ig ot . World Spawn Main č Ċ import Ġorg . bukkit . Bu kkit č Ċ import Ġorg . bukkit . event . EventHandler č Ċ import Ġorg . bukkit . event . Listener č Ċ import Ġorg . bukkit . event . player . Player Changed World Event čĊč Ċ /** čĊ Ġ* Ġ@ author ĠIn nect ic čĊ Ġ* Ġ@ since Ġ 0 8 / 0 8 / 2 0 1 8 čĊ Ġ*/ č Ċ class ĠPlayer Switch World Event Ġ: ĠListener Ġ{ čĊčĊĠĠĠ Ġ@ EventHandler čĊĠĠĠ Ġfun Ġon Player Switch World Event ( event : ĠPlayer Changed World Event ) Ġ{ čĊĠĠĠĠĠĠĠ Ġif Ġ( event . player Ġ== Ġnull ) Ġreturn čĊĠĠĠĠĠĠĠ Ġif Ġ( event . from Ġ== Ġnull ) Ġreturn čĊčĊĠĠĠĠĠĠĠ Ġval Ġplugin Ġ= ĠWorld Spawn Main . getInstance () čĊĠĠĠĠĠĠĠ Ġval Ġlocation : ĠLocation Ġ= Ġplugin . api . backend ?. get World Spawn ( event . from . name ) Ġ?: Ġreturn čĊčĊĠĠĠĠĠĠĠ Ġevent . player . tele port ( org . bukkit . Location ( Bu kkit . get World ( location . world ), Ġlocation . x . toDouble (), Ġlocation . y . toDouble (), Ġlocation . z . toDouble ())) čĊĠĠĠ Ġ} č Ċ }