package Ġdev . em ort al . div ine . commands Ċ Ċ import Ġcom . moj ang . b rig ad ier . arguments . String Argument Type Ċ import Ġcom . moj ang . b rig ad ier . builder . Literal Argument Builder Ċ import Ġcom . moj ang . b rig ad ier . builder . Required Argument Builder Ċ import Ġcom . moj ang . b rig ad ier . context . Command Context Ċ import Ġcom . moj ang . b rig ad ier . suggestion . Suggestions Builder Ċ import Ġcom . moj ang . b rig ad ier . tree . Literal Command Node Ċ import Ġcom . velocity powered . api . command . Command Source Ċ import Ġcom . velocity powered . api . proxy . Player Ċ import Ġdev . em ort al . div ine . Div ine Plugin Ċ import Ġdev . em ort al . div ine . Div ine Plugin . Companion . server Ċ import Ġdev . em ort al . div ine . Game Manager Ċ import Ġdev . em ort al . div ine . Game Manager . send ToServer Ċ import Ġnet . ky ori . ad venture . text . Component Ċ import Ġnet . ky ori . ad venture . text . format . Named TextColor ĊĊ Ċ object ĠSpect ate Command Ġ: ĠDiv ine Command () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġcreate B rig ad ier Command (): ĠLiteral Command Node < Command Source > Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġspect ate Node Ġ= ĠLiteral Argument Builder . literal < Command Source >(" spect ate ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. exec utes Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . source . sendMessage ( Component . text (" Usage : Ġ/ spect ate Ġ< player Ġusername >", ĠNamed TextColor . RED )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġplayer Arg Node Ġ= ĠRequired Argument Builder ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. argument < Command Source , ĠString >(" player ", ĠString Argument Type . string ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. exec utes Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġexecutor Ġ= Ġit . source Ġas ? ĠPlayer ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( executor Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . source . sendMessage ( Component . text (" Spect ate Ġcommand Ġcannot Ġbe Ġused Ġvia Ġconsole ", ĠNamed TextColor . RED )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn @ exec utes Ġ 0 ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Argument Ġ= Ġit . arguments [" player "] ?. result Ġas ? ĠString Ġ?: Ġreturn @ exec utes Ġ 0 ĊĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġserver . getPlayer ( player Argument ). if Present OrElse ({ Ġplayer Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġexecutor . send ToServer ( player . current Server . get (). server Info . name , Ġ" spect ate ", Ġtrue , Ġplayer . unique Id ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ}, Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . source . sendMessage ( Component . text (" Invalid Ġplayer ", ĠNamed TextColor . RED )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġspect ate Node . addChild ( player Arg Node ) ĊĊĊĠĠĠĠĠĠĠ Ġreturn Ġspect ate Node ĊĊĠĠĠ Ġ} Ċ Ċ }