Class HouseUtilities
java.lang.Object
games.stendhal.server.maps.quests.houses.HouseUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clears the house cacheprotected static StoredChest
findChest(HousePortal portal)
Find a chest corresponding to a house portal.protected static HousePortal
getHousePortal(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 HousePortal
getPlayersHouse(Player player)
Get the house owned by a player.getUnboughtHousesInLocation(String location)
protected static boolean
playerOwnsHouse(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
null
if he does not own one.
-
playerOwnsHouse
Check if a player owns a house.- Parameters:
player
- the player to be checked- Returns:
true
if 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
null
if 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
null
if there is no chest in the zone which the house portal leads to (Note, then, that chests should be on the 'ground floor')
-
getUnboughtHousesInLocation
-