Skip to content

Commit 666d550

Browse files
committed
Fixed NPE on ServerListPing if plugin isn't fully started / arenaregistry not ready
1 parent 3ee48be commit 666d550

File tree

1 file changed

+4
-0
lines changed
  • MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/managers

1 file changed

+4
-0
lines changed

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/managers/BungeeManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public void connectToHub(Player player) {
7676

7777
@EventHandler(priority = EventPriority.HIGHEST)
7878
public void onServerListPing(ServerListPingEvent event) {
79+
if(plugin.getArenaRegistry() == null) {
80+
//can be null on early request after server startup
81+
return;
82+
}
7983
if(plugin.getArenaRegistry().getArenas().isEmpty() || !config.getBoolean("MOTD.Manager")) {
8084
return;
8185
}

0 commit comments

Comments
 (0)