mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Fixed vendingmachines NPE
This commit is contained in:
parent
d82184ca83
commit
4a334fb563
@ -34,8 +34,12 @@ public class InteractionVendingMachine extends HabboItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public THashSet<RoomTile> getActivatorTiles(Room room) {
|
public THashSet<RoomTile> getActivatorTiles(Room room) {
|
||||||
THashSet<RoomTile> tiles = new THashSet<RoomTile>();
|
THashSet<RoomTile> tiles = new THashSet<>();
|
||||||
tiles.add(getSquareInFront(room.getLayout(), this));
|
RoomTile tileInFront = getSquareInFront(room.getLayout(), this);
|
||||||
|
|
||||||
|
if (tileInFront != null)
|
||||||
|
tiles.add(tileInFront);
|
||||||
|
|
||||||
tiles.add(room.getLayout().getTile(this.getX(), this.getY()));
|
tiles.add(room.getLayout().getTile(this.getX(), this.getY()));
|
||||||
return tiles;
|
return tiles;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user