Class SafeHouse

java.lang.Object
zombie.iso.areas.SafeHouse

public class SafeHouse extends Object
  • Field Details

  • Constructor Details

    • SafeHouse

      public SafeHouse(int x, int y, int w, int h, String player)
  • Method Details

    • init

      public static void init()
    • addSafeHouse

      public static SafeHouse addSafeHouse(int x, int y, int w, int h, String player, boolean remote)
    • addSafeHouse

      public static SafeHouse addSafeHouse(IsoGridSquare square, IsoPlayer player)
    • hasSafehouse

      public static SafeHouse hasSafehouse(String username)
    • hasSafehouse

      public static SafeHouse hasSafehouse(IsoPlayer player)
    • updateSafehousePlayersConnected

      public static void updateSafehousePlayersConnected()
    • updatePlayersConnected

      public void updatePlayersConnected()
    • getSafeHouse

      public static SafeHouse getSafeHouse(IsoGridSquare square)
    • getSafeHouse

      public static SafeHouse getSafeHouse(int x, int y, int w, int h)
    • 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

      public boolean playerAllowed(IsoPlayer player)
    • playerAllowed

      public boolean playerAllowed(String name)
    • addPlayer

      public void addPlayer(String player)
    • removePlayer

      public void removePlayer(String player)
    • syncSafehouse

      public void syncSafehouse()
    • removeSafeHouse

      public void removeSafeHouse(IsoPlayer player)
    • removeSafeHouse

      public void removeSafeHouse(IsoPlayer player, boolean force)
    • save

      public void save(ByteBuffer output)
    • load

      public static SafeHouse load(ByteBuffer bb, int WorldVersion)
    • canBeSafehouse

      public static String canBeSafehouse(IsoGridSquare clickedSquare, IsoPlayer player)
    • kickOutOfSafehouse

      public void kickOutOfSafehouse(IsoPlayer player)
    • checkTrespass

      public void checkTrespass(IsoPlayer player)
    • alreadyHaveSafehouse

      public SafeHouse alreadyHaveSafehouse(String username)
    • alreadyHaveSafehouse

      public SafeHouse alreadyHaveSafehouse(IsoPlayer player)
    • allowSafeHouse

      public static boolean allowSafeHouse(IsoPlayer player)
    • updateSafehouse

      public 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.
      Parameters:
      player -
    • getId

      public String 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

      public ArrayList<String> getPlayers()
    • setPlayers

      public void setPlayers(ArrayList<String> players)
    • getSafehouseList

      public static ArrayList<SafeHouse> getSafehouseList()
    • getOwner

      public String getOwner()
    • setOwner

      public void setOwner(String owner)
    • isOwner

      public boolean isOwner(IsoPlayer player)
    • getLastVisited

      public long getLastVisited()
    • setLastVisited

      public void setLastVisited(long lastVisited)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getPlayerConnected

      public int getPlayerConnected()
    • setPlayerConnected

      public void setPlayerConnected(int playerConnected)
    • getOpenTimer

      public int getOpenTimer()
    • setOpenTimer

      public void setOpenTimer(int openTimer)
    • setRespawnInSafehouse

      public void setRespawnInSafehouse(boolean b, String username)
    • isRespawnInSafehouse

      public boolean isRespawnInSafehouse(String username)
    • isPlayerAllowedOnSquare

      public static boolean isPlayerAllowedOnSquare(IsoPlayer player, IsoGridSquare sq)