Skip to content

Commit 001af2f

Browse files
committed
fix: little snippets
1 parent 22f0f36 commit 001af2f

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

sdk/src/server-api/sc/framework/plugins/Player.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import sc.api.plugins.ITeam
88
import sc.api.plugins.host.IPlayerListener
99
import sc.framework.plugins.protocol.MoveRequest
1010
import sc.protocol.room.RoomMessage
11-
import java.util.*
1211

1312
private val logger = LoggerFactory.getLogger(Player::class.java)
1413

@@ -63,7 +62,7 @@ open class Player @JvmOverloads constructor(
6362
}
6463

6564
fun notifyListeners(o: RoomMessage) {
66-
for (listener in this.listeners) {
65+
for (listener in ArrayList(listeners)) {
6766
listener.onPlayerEvent(o)
6867
}
6968
}

server/src/sc/server/gaming/GameRoom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public synchronized void step(boolean forced) throws GameRoomException {
408408
}
409409
if (isPauseRequested()) {
410410
logger.info("Stepping {}", game);
411-
((AbstractGame<Player>) game).afterPause();
411+
((AbstractGame<?>) game).afterPause();
412412
} else {
413413
logger.warn("Can't step unpaused {}", game);
414414
}

server/src/sc/server/network/Client.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,6 @@ protected void onObject(@NotNull ProtocolPacket message) throws UnprocessedPacke
136136
logger.debug("Stopping {} because of error", this);
137137
stop();
138138
}
139-
140-
if (message instanceof RemovedFromGame) {
141-
logger.debug("Stopping {} because of received RemovedFromGame message", this);
142-
stop();
143-
}
144139
}
145140

146141
}

0 commit comments

Comments
 (0)