File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import dev .agones .model .request .PlayerInfo ;
1111import dev .agones .model .request .Reservation ;
1212import okhttp3 .HttpUrl ;
13- import okhttp3 .OkHttpClient ;
14- import okhttp3 .Request ;
1513import retrofit2 .Retrofit ;
1614import retrofit2 .converter .gson .GsonConverterFactory ;
1715
@@ -44,6 +42,7 @@ public AgonesSDK(int port) {
4442 .build ();
4543 }
4644
45+ @ SuppressWarnings ("unchecked" )
4746 private <E extends Endpoints > E getEndpoints (Class <E > endpoints ) {
4847 return (E ) endpointsMap .computeIfAbsent (endpoints , __ -> retrofit .create (endpoints ));
4948 }
@@ -80,8 +79,8 @@ public void shutdown() {
8079 getEndpoints (AgonesEndpoints .class ).shutdown ();
8180 }
8281
83- public void gameServer () {
84- getEndpoints (AgonesEndpoints .class ).gameServer ();
82+ public GameServer gameServer () {
83+ return getEndpoints (AgonesEndpoints .class ).gameServer ();
8584 }
8685
8786 public void label (String key , String value ) {
You can’t perform that action at this time.
0 commit comments