From ab65865d734a9db0863c81deeedd431650cccda0 Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Sun, 26 May 2019 19:27:11 +0300 Subject: [PATCH 1/3] Fix NullPointerException in RedeemClothingEvent --- .../messages/incoming/rooms/items/RedeemClothingEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RedeemClothingEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RedeemClothingEvent.java index 612360cf..99c40950 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RedeemClothingEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RedeemClothingEvent.java @@ -29,7 +29,7 @@ public class RedeemClothingEvent extends MessageHandler { HabboItem item = this.client.getHabbo().getHabboInfo().getCurrentRoom().getHabboItem(itemId); - if(item.getUserId() == this.client.getHabbo().getHabboInfo().getId()) + if(item != null && item.getUserId() == this.client.getHabbo().getHabboInfo().getId()) { if(item instanceof InteractionClothing) { From 8dda7e811104f521bdf5b9911a21e51a24842562 Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Sun, 26 May 2019 19:28:51 +0300 Subject: [PATCH 2/3] Fix NullPointerException in Banzai refreshCounters --- .../habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java b/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java index b59e0be7..4d4c57e5 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java @@ -405,6 +405,8 @@ public class BattleBanzaiGame extends Game public void refreshCounters(GameTeamColors teamColors) { + if (!this.teams.containsKey(teamColors)) return; + int totalScore = this.teams.get(teamColors).getTotalScore(); THashMap scoreBoards = this.room.getRoomSpecialTypes().getBattleBanzaiScoreboards(teamColors); From 6caadebe3303039be81fd6a9d52e8cfa8e22a53b Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Sun, 26 May 2019 19:31:14 +0300 Subject: [PATCH 3/3] Fix NullPointerException in RoomUnit canOverrideTile --- src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java index 5fea11e4..f6afd05c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java @@ -806,6 +806,8 @@ public class RoomUnit } public boolean canOverrideTile(RoomTile tile) { + if (tile == null || room == null || room.getLayout() == null) return false; + int tileIndex = (room.getLayout().getMapSizeY() * tile.y) + tile.x + 1; return this.overridableTiles.contains(tileIndex); }