Skip to content

Commit

Permalink
fix: fixed motd updating while the game is running (bungee: random-se…
Browse files Browse the repository at this point in the history
…lection without game pre-selection)
  • Loading branch information
Misat11 committed Oct 26, 2024
1 parent c5d7d60 commit 144db82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ accessors {
// exclude 1.16 and 1.10.1, they don't have most mappings and are basically not used at all
// exclude 1.8.9, client-only update - no Spigot mappings, no thank you
// exclude 1.9.1 and 1.9.3 - no mappings at all
exclude '1.16', '1.10.1', '1.8.9', '1.9.1', '1.9.3', '1.20', '1.20.3', '1.20.5', '1.21.2
exclude '1.16', '1.10.1', '1.8.9', '1.9.1', '1.9.3', '1.20', '1.20.3', '1.20.5', '1.21.2'
// include only releases, no snapshots
includeTypes 'release'
Expand Down
2 changes: 1 addition & 1 deletion plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ buildConfig {
}

prepareTestTask()
.versions('1.21.1', '1.20.6', '1.20.4', '1.20.2', '1.20.1', '1.19.4', '1.19.3', '1.18.2', '1.17.1', '1.16.5', '1.15.2', '1.14.4', '1.13.2', '1.12.2', '1.11.2', '1.10.2', '1.9.4', '1.8.8')
.versions('1.21.3', '1.21.1', '1.20.6', '1.20.4', '1.20.2', '1.20.1', '1.19.4', '1.19.3', '1.18.2', '1.17.1', '1.16.5', '1.15.2', '1.14.4', '1.13.2', '1.12.2', '1.11.2', '1.10.2', '1.9.4', '1.8.8')
.setSubdirectory("paper-0-2-x-branch")
.jvmArgs('-Dio.papermc.paper.suppress.sout.nags=true', '-DPaper.IgnoreJavaVersion=true') // suppress System.out.println nag
.onlineMode(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public void onServerListPing(ServerListPingEvent slpe) {
game = Main.getInstance().getSelectedGame();
} else if (Main.getConfigurator().config.getBoolean("bungee.random-game-selection.enabled")) {
game = (Game) Main.getInstance().getRandomWaitingGameForBungeeMode();

if (game == null && !Main.getGameNames().isEmpty()) {
game = Main.getGame(Main.getGameNames().get(0)); // seems like there are no waiting games, let's just show one of the game in running state
}
} else {
game = Main.getGame(Main.getGameNames().get(0));
}
Expand Down

0 comments on commit 144db82

Please sign in to comment.