diff --git a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGame.java b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGame.java index 993e2457..1f341d45 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGame.java @@ -255,7 +255,7 @@ public class FreezeGame extends Game { scoreboard.setExtradata("0"); } - int oldScore = Integer.valueOf(scoreboard.getExtradata()); + int oldScore = Integer.parseInt(scoreboard.getExtradata()); if (oldScore == totalScore) continue; diff --git a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java index a701a023..1b736b98 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java @@ -38,7 +38,7 @@ public class FreezeGamePlayer extends GamePlayer { } @Override - public void addScore(int amount) { + public synchronized void addScore(int amount) { super.addScore(amount); if (amount > 0) { @@ -122,10 +122,7 @@ public class FreezeGamePlayer extends GamePlayer { } public boolean canGetFrozen() { - if (this.isFrozen() || this.isProtected()) - return false; - - return true; + return !this.isFrozen() && !this.isProtected(); } public void addProtection() {