File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/main/java/gg/archipelago/APClient Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ public void connect(String address) {
189189 }
190190
191191 public void sendChat (String message ) {
192+ if (apWebSocket == null )
193+ return ;
192194 if (apWebSocket .isAuthenticated ()) {
193195 apWebSocket .sendChat (message );
194196 }
@@ -274,6 +276,8 @@ public DataManager getDataManager() {
274276 }
275277
276278 public void setGameState (ClientStatus status ) {
279+ if (apWebSocket == null )
280+ return ;
277281 if (apWebSocket .isAuthenticated ())
278282 apWebSocket .sendPacket (new ClientStatusPacket (status ));
279283 }
@@ -283,6 +287,8 @@ public void sync() {
283287 }
284288
285289 public void sendBounce (BouncePacket bouncePacket ) {
290+ if (apWebSocket == null )
291+ return ;
286292 if (apWebSocket .isAuthenticated ())
287293 apWebSocket .sendPacket (bouncePacket );
288294 }
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ public boolean checkLocation(int id) {
2626 apClient .getDataManager ().save ();
2727 LocationChecks packet = new LocationChecks ();
2828 packet .locations .add (id );
29- if (webSocket != null && webSocket .isAuthenticated ()) {
29+ if (webSocket == null )
30+ return false ;
31+
32+ if (webSocket .isAuthenticated ()) {
3033 webSocket .sendPacket (packet );
3134 return true ;
3235 }
You can’t perform that action at this time.
0 commit comments