package Ġeu . the simple cloud . plugin . server . sponge . listener Ċ Ċ import Ġeu . the simple cloud . plugin . server . Server EventHandler Ċ import Ġnet . ky ori . ad venture . text . Component Ċ import Ġorg . spongepowered . api . Sp onge Ċ import Ġorg . spongepowered . api . event . Listener Ċ import Ġorg . spongepowered . api . event . network . Server Side Connection Event ĊĊ Ċ class ĠSp onge Listener Ġ{ ĊĊĠĠĠ Ġ@ Listener ĊĠĠĠ Ġfun Ġhandle Login ( event : ĠServer Side Connection Event . Login ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmsg Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠServer EventHandler . handle Login ( event . user (). unique Id (), Ġevent . connection (). address (). address . host Address ) ĊĠĠĠĠĠĠĠ Ġif Ġ( msg Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevent . is Cancelled Ġ= Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevent . setMessage ( Component . text ( msg )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Listener ĊĠĠĠ Ġfun Ġhandle Disconnect ( event : ĠServer Side Connection Event . Disconnect ) Ġ= ĊĠĠĠĠĠĠĠ ĠServer EventHandler . handle Disconnected ( event . player (). unique Id (), ĠSp onge . server (). online Players (). size Ġ- Ġ 1 ) Ċ Ċ }