Package zombie.iso.areas
Class SafeHouse
java.lang.Object
zombie.iso.areas.SafeHouse
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static SafeHouse
addSafeHouse
(int x, int y, int w, int h, String player, boolean remote) static SafeHouse
addSafeHouse
(IsoGridSquare square, IsoPlayer player) static boolean
allowSafeHouse
(IsoPlayer player) alreadyHaveSafehouse
(String username) alreadyHaveSafehouse
(IsoPlayer player) static String
canBeSafehouse
(IsoGridSquare clickedSquare, IsoPlayer player) void
checkTrespass
(IsoPlayer player) static void
boolean
containsLocation
(float x, float y) int
getH()
getId()
long
int
getOwner()
int
static SafeHouse
getSafeHouse
(int x, int y, int w, int h) static SafeHouse
getSafeHouse
(IsoGridSquare square) getTitle()
int
getW()
int
getX()
int
getX2()
int
getY()
int
getY2()
static SafeHouse
hasSafehouse
(String username) static SafeHouse
hasSafehouse
(IsoPlayer player) static void
init()
boolean
static boolean
isPlayerAllowedOnSquare
(IsoPlayer player, IsoGridSquare sq) boolean
isRespawnInSafehouse
(String username) static SafeHouse
isSafeHouse
(IsoGridSquare square, String username, boolean doDisableSafehouse) Return if the square is a safehouse non allowed for the player You need to be on a safehouse AND not be allowed to return the safe If you're allowed, you'll have null in return If username is null, you basically just return if there's a safehouse herevoid
kickOutOfSafehouse
(IsoPlayer player) static SafeHouse
load
(ByteBuffer bb, int WorldVersion) boolean
playerAllowed
(String name) boolean
playerAllowed
(IsoPlayer player) void
removePlayer
(String player) void
removeSafeHouse
(IsoPlayer player) void
removeSafeHouse
(IsoPlayer player, boolean force) void
save
(ByteBuffer output) void
setH
(int h) void
setLastVisited
(long lastVisited) void
setOpenTimer
(int openTimer) void
void
setPlayerConnected
(int playerConnected) void
setPlayers
(ArrayList<String> players) void
setRespawnInSafehouse
(boolean b, String username) void
void
setW
(int w) void
setX
(int x) void
setY
(int y) void
void
void
updateSafehouse
(IsoPlayer player) Update the last visited value everytime someone is in this safehouse If it's not visited for some time (SafehouseRemoval serveroption) it's automatically removed.static void
-
Field Details
-
playersRespawn
-
-
Constructor Details
-
SafeHouse
-
-
Method Details
-
init
public static void init() -
addSafeHouse
-
addSafeHouse
-
hasSafehouse
-
hasSafehouse
-
updateSafehousePlayersConnected
public static void updateSafehousePlayersConnected() -
updatePlayersConnected
public void updatePlayersConnected() -
getSafeHouse
-
getSafeHouse
-
isSafeHouse
public static SafeHouse isSafeHouse(IsoGridSquare square, String username, boolean doDisableSafehouse) Return if the square is a safehouse non allowed for the player You need to be on a safehouse AND not be allowed to return the safe If you're allowed, you'll have null in return If username is null, you basically just return if there's a safehouse here- Parameters:
square
-username
-- Returns:
-
clearSafehouseList
public static void clearSafehouseList() -
playerAllowed
-
playerAllowed
-
addPlayer
-
removePlayer
-
syncSafehouse
public void syncSafehouse() -
removeSafeHouse
-
removeSafeHouse
-
save
-
load
-
canBeSafehouse
-
kickOutOfSafehouse
-
checkTrespass
-
alreadyHaveSafehouse
-
alreadyHaveSafehouse
-
allowSafeHouse
-
updateSafehouse
Update the last visited value everytime someone is in this safehouse If it's not visited for some time (SafehouseRemoval serveroption) it's automatically removed.- Parameters:
player
-
-
getId
-
getX
public int getX() -
setX
public void setX(int x) -
getY
public int getY() -
setY
public void setY(int y) -
getW
public int getW() -
setW
public void setW(int w) -
getH
public int getH() -
setH
public void setH(int h) -
getX2
public int getX2() -
getY2
public int getY2() -
containsLocation
public boolean containsLocation(float x, float y) -
getPlayers
-
setPlayers
-
getSafehouseList
-
getOwner
-
setOwner
-
isOwner
-
getLastVisited
public long getLastVisited() -
setLastVisited
public void setLastVisited(long lastVisited) -
getTitle
-
setTitle
-
getPlayerConnected
public int getPlayerConnected() -
setPlayerConnected
public void setPlayerConnected(int playerConnected) -
getOpenTimer
public int getOpenTimer() -
setOpenTimer
public void setOpenTimer(int openTimer) -
setRespawnInSafehouse
-
isRespawnInSafehouse
-
isPlayerAllowedOnSquare
-