File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/main/java/dev/emortal/minestom/gamesdk/internal Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ private void registerGame(@NotNull Game game) {
7777 }
7878
7979 public void startGame (@ NotNull Game game ) {
80+ LOGGER .info ("Starting game {}" , game .getCreationInfo ().id ());
8081 game .start ();
8182 for (GameStatusListener listener : this .statusListeners ) {
8283 listener .onGameStart (game );
@@ -101,10 +102,11 @@ private void onGameFinish(@NotNull GameFinishedEvent event) {
101102 Game game = event .game ();
102103 if (!this .games .contains (game )) {
103104 // Definitely don't want a double remove and clean up
104- LOGGER .info ("Game already finished and removed when asked to be finished . Ignoring finish request." );
105+ LOGGER .info ("Game {} already finished and removed. Ignoring finish request." , game . getCreationInfo (). id () );
105106 return ;
106107 }
107108
109+ LOGGER .info ("Game {} finished" , game .getCreationInfo ().id ());
108110 for (GameStatusListener listener : this .statusListeners ) {
109111 listener .onGameFinish (game );
110112 }
@@ -120,6 +122,7 @@ private void onGameFinish(@NotNull GameFinishedEvent event) {
120122 }
121123
122124 private void cleanUpGame (@ NotNull Game game ) {
125+ LOGGER .info ("Cleaning up game {}" , game .getCreationInfo ().id ());
123126 this .kickAllRemainingPlayers (game );
124127 game .cleanUp ();
125128 game .getMeters ().forEach (Meter ::close );
Original file line number Diff line number Diff line change @@ -79,8 +79,9 @@ public void onGameStart(@NotNull Game game) {
7979 .setStartTime (ProtoTimestampConverter .now ())
8080 .addAllContent (this .packMessages (game .createGameStartExtraData ()));
8181
82- if (game .getCreationInfo ().mapId () != null ) {
83- messageBuilder .setMapId (game .getCreationInfo ().mapId ());
82+ String mapId = game .getCreationInfo ().mapId ();
83+ if (mapId != null ) {
84+ messageBuilder .setMapId (mapId );
8485 }
8586
8687 this .gameMaxTimeUpdateTasks .put (game , SCHEDULER .schedule (() -> {
You can’t perform that action at this time.
0 commit comments