Skip to content

Commit 17a8907

Browse files
committed
docs(sdk): slight updates to Player
1 parent f264f46 commit 17a8907

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sdk/src/main/framework/sc/util/GameResultConverter.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ fun <T> HierarchicalStreamReader.readNode(action: HierarchicalStreamReader.() ->
2222
return result
2323
}
2424

25-
inline fun <reified T> UnmarshallingContext.read() = convertAnother(null, T::class.java) as T
25+
inline fun <reified T> UnmarshallingContext.read() =
26+
convertAnother(null, T::class.java) as T
2627

2728
class GameResultConverter: Converter {
2829
override fun canConvert(type: Class<*>?): Boolean = type == GameResult::class.java

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ private val logger = LoggerFactory.getLogger(Player::class.java)
1818
/**
1919
* Keeps information about a player:
2020
* - basic info: name and color
21-
* - state info: if they can time out, whether their game is paused
22-
* - game result info: left & timeouts, to determine the winner and potential violation information
21+
* - state info: if they can time out
22+
* - game result info: violations
2323
* - listeners: subscribers that get notified about new messages concerning this player, notably Welcome and Errors
2424
*
2525
* Note: the toString/equals/hashCode/clone methods only take [team] and [displayName] into account!
@@ -28,7 +28,7 @@ private val logger = LoggerFactory.getLogger(Player::class.java)
2828
@XStreamAlias("player")
2929
@XStreamConverter(PlayerConverter::class)
3030
open class Player @JvmOverloads constructor(
31-
@XStreamAsAttribute var team: ITeam,
31+
@XStreamAsAttribute val team: ITeam,
3232
@XStreamAsAttribute var displayName: String = ""
3333
): PublicCloneable<Player> {
3434

sdk/src/main/server-api/sc/networking/XStreamProvider.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ interface XStreamProvider {
4343
}
4444

4545
private fun XStreamProvider.load(xStream: XStream) {
46-
println("Loading into XStream: $this")
4746
LobbyProtocol.registerAdditionalMessages(xStream, this.classesToRegister)
4847
this.setup(xStream)
4948
}

0 commit comments

Comments
 (0)