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) {
77
77
}
78
78
79
79
public void startGame (@ NotNull Game game ) {
80
+ LOGGER .info ("Starting game {}" , game .getCreationInfo ().id ());
80
81
game .start ();
81
82
for (GameStatusListener listener : this .statusListeners ) {
82
83
listener .onGameStart (game );
@@ -101,10 +102,11 @@ private void onGameFinish(@NotNull GameFinishedEvent event) {
101
102
Game game = event .game ();
102
103
if (!this .games .contains (game )) {
103
104
// 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 () );
105
106
return ;
106
107
}
107
108
109
+ LOGGER .info ("Game {} finished" , game .getCreationInfo ().id ());
108
110
for (GameStatusListener listener : this .statusListeners ) {
109
111
listener .onGameFinish (game );
110
112
}
@@ -120,6 +122,7 @@ private void onGameFinish(@NotNull GameFinishedEvent event) {
120
122
}
121
123
122
124
private void cleanUpGame (@ NotNull Game game ) {
125
+ LOGGER .info ("Cleaning up game {}" , game .getCreationInfo ().id ());
123
126
this .kickAllRemainingPlayers (game );
124
127
game .cleanUp ();
125
128
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) {
79
79
.setStartTime (ProtoTimestampConverter .now ())
80
80
.addAllContent (this .packMessages (game .createGameStartExtraData ()));
81
81
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 );
84
85
}
85
86
86
87
this .gameMaxTimeUpdateTasks .put (game , SCHEDULER .schedule (() -> {
You can’t perform that action at this time.
0 commit comments