package Ġcom . project city build . platforms . sp ig ot . listeners Ċ Ċ import Ġcom . project city build . core . contracts . Config Provider Ċ import Ġcom . project city build . core . entities . Plugin Config Ċ import Ġorg . bukkit . event . EventHandler Ċ import Ġorg . bukkit . event . Event Priority Ċ import Ġorg . bukkit . event . Listener Ċ import Ġorg . bukkit . event . player . Player Login Event Ċ Ċ class ĠMaint enance Connect Listener ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġconfig : ĠConfig Provider Ċ ): ĠListener Ġ{ ĊĊĠĠĠ Ġ@ EventHandler ( priority Ġ= ĠEvent Priority . HIG HE ST ) ĊĠĠĠ Ġfun Ġon Player Login Event ( event : ĠPlayer Login Event ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġis Maintenance Mode Ġ= Ġconfig . get ( Plugin Config . SETTINGS . MA INTEN ANCE _ MODE ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( event . player . has Permission (" pc bridge . maintenance . bypass ")) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġif Ġ( is Maintenance Mode ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevent . dis allow ( Player Login Event . Result . K ICK _ WHITE LIST , Ġ" Server Ġis Ġcurrently Ġin Ġmaintenance Ġmode . ĠPlease Ġtry Ġagain Ġlater ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }