Class HouseUtilities
java.lang.Object
games.stendhal.server.maps.quests.houses.HouseUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclears the house cacheprotected static StoredChestfindChest(HousePortal portal) Find a chest corresponding to a house portal.protected static HousePortalgetHousePortal(int houseNumber) Find a portal corresponding to a house number.protected static List<HousePortal>Get a list of all house portals available to players.protected static HousePortalgetPlayersHouse(Player player) Get the house owned by a player.getUnboughtHousesInLocation(String location) protected static booleanplayerOwnsHouse(Player player) Check if a player owns a house.
-
Method Details
-
clearCache
public static void clearCache()clears the house cache -
getPlayersHouse
Get the house owned by a player.- Parameters:
player- the player to be examined- Returns:
- portal to the house owned by the player, or
nullif he does not own one.
-
playerOwnsHouse
Check if a player owns a house.- Parameters:
player- the player to be checked- Returns:
trueif the player owns a house, false otherwise
-
getHousePortal
Find a portal corresponding to a house number.- Parameters:
houseNumber- the house number to find- Returns:
- the portal to the house, or
nullif there is no house by numberid
-
getHousePortals
Get a list of all house portals available to players.- Returns:
- list of all house portals
-
findChest
Find a chest corresponding to a house portal.- Parameters:
portal- the house portal of the house containing the chest we want to find- Returns:
- the chest in the house, or
nullif there is no chest in the zone which the house portal leads to (Note, then, that chests should be on the 'ground floor')
-
getUnboughtHousesInLocation
-