Skip to content

Commit 76f08af

Browse files
anarchuserxeruf
authored andcommitted
fix(server): correct wrong calling of kotlin getters from java
1 parent 45c5b3c commit 76f08af

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ private void syncSlot(PlayerSlot slot) throws RescuableClientException {
370370
Player player = getGame().onPlayerJoined(); // make new player in gameState of game
371371
// set attributes for player XXX check whether this is needed for prepared games
372372
player.setDisplayName(slot.getDescriptor().getDisplayName());
373-
player.setShouldBePaused(slot.getDescriptor().isShouldBePaused());
374-
player.setCanTimeout(slot.getDescriptor().isCanTimeout());
373+
player.setShouldBePaused(slot.getDescriptor().getShouldBePaused());
374+
player.setCanTimeout(slot.getDescriptor().getCanTimeout());
375375

376376
if (slot.isEmpty()) // needed for forced step, if client crashes before joining room
377377
{
@@ -652,8 +652,7 @@ public void openSlots(SlotDescriptor[] descriptors)
652652

653653
for (int i = 0; i < descriptors.length; i++) {
654654
this.playerSlots.get(i).setDescriptor(descriptors[i]);
655-
// isShouldBePaused should work. If not, change to getShouldBePaused. Calling Kt from Jv may cause issues here
656-
if (descriptors[i].isShouldBePaused()) {
655+
if (descriptors[i].getShouldBePaused()) {
657656
pause(true);
658657
}
659658
}

0 commit comments

Comments
 (0)