mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fixed nullpointers
This commit is contained in:
parent
e264c50957
commit
5b4e7f382a
@ -4588,19 +4588,19 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
THashSet<RoomUnit> units = new THashSet<>();
|
THashSet<RoomUnit> units = new THashSet<>();
|
||||||
|
|
||||||
for (Habbo habbo : this.currentHabbos.values()) {
|
for (Habbo habbo : this.currentHabbos.values()) {
|
||||||
if (habbo != null && habbo.getRoomUnit() != null && habbo.getRoomUnit().getRoom().getId() == this.getId()) {
|
if (habbo != null && habbo.getRoomUnit() != null && habbo.getRoomUnit().getRoom() != null && habbo.getRoomUnit().getRoom().getId() == this.getId()) {
|
||||||
units.add(habbo.getRoomUnit());
|
units.add(habbo.getRoomUnit());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Pet pet : this.currentPets.valueCollection()) {
|
for (Pet pet : this.currentPets.valueCollection()) {
|
||||||
if (pet != null && pet.getRoomUnit() != null && pet.getRoomUnit().getRoom().getId() == this.getId()) {
|
if (pet != null && pet.getRoomUnit() != null && pet.getRoomUnit().getRoom() != null && pet.getRoomUnit().getRoom().getId() == this.getId()) {
|
||||||
units.add(pet.getRoomUnit());
|
units.add(pet.getRoomUnit());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Bot bot : this.currentBots.valueCollection()) {
|
for (Bot bot : this.currentBots.valueCollection()) {
|
||||||
if (bot != null && bot.getRoomUnit() != null && bot.getRoomUnit().getRoom().getId() == this.getId()) {
|
if (bot != null && bot.getRoomUnit() != null && bot.getRoomUnit().getRoom() != null && bot.getRoomUnit().getRoom().getId() == this.getId()) {
|
||||||
units.add(bot.getRoomUnit());
|
units.add(bot.getRoomUnit());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ public class RoomUnit {
|
|||||||
this.resetIdleTimer();
|
this.resetIdleTimer();
|
||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
HabboItem topItem = this.room.getTopItemAt(next.x, next.y);
|
HabboItem topItem = room.getTopItemAt(next.x, next.y);
|
||||||
|
|
||||||
boolean isAtDoor = next.x == room.getLayout().getDoorX() && next.y == room.getLayout().getDoorY();
|
boolean isAtDoor = next.x == room.getLayout().getDoorX() && next.y == room.getLayout().getDoorY();
|
||||||
boolean publicRoomKicks = !room.isPublicRoom() || Emulator.getConfig().getBoolean("hotel.room.public.doortile.kick");
|
boolean publicRoomKicks = !room.isPublicRoom() || Emulator.getConfig().getBoolean("hotel.room.public.doortile.kick");
|
||||||
|
Loading…
Reference in New Issue
Block a user