Class ServerWorld


@Node public class ServerWorld extends World
World in which all servers reside, created by WorldManager on startup. Once a RemoteServer enters here, its properties are set to defaults defined in application.properties, i.e portalMesh and portalScript of this object. Properties of other clients (users) are not changed.
Author:
joe
  • Constructor Details

    • ServerWorld

      public ServerWorld()
  • Method Details

    • enter

      public boolean enter(Client client, WorldManager wm)
      Description copied from class: World
      Called when client enters the world. It may change some client properties, allow entrance or not, etc. This implementation checks whether the world is private and owned, and compares the session token.
      Overrides:
      enter in class World
      Parameters:
      client - Client that's asking to enter
      wm - WorldManager
      Returns:
      true if client is allowed to enter
    • exit

      public void exit(Client client, WorldManager wm)
      Description copied from class: World
      Called after client exits the world. After the owner (if any) exits the world, invalidates the token (if any).
      Overrides:
      exit in class World
      Parameters:
      client - Client exiting the world
      wm - WorldManager
    • getUrl

      public String getUrl()
    • getPortalMesh

      public String getPortalMesh()
    • getPortalThumbnail

      public String getPortalThumbnail()
    • getPortalScript

      public String getPortalScript()
    • getCurrentServers

      public ConcurrentHashMap<Long,RemoteServer> getCurrentServers()
    • getServerCount

      public AtomicInteger getServerCount()
    • getDl

      public double getDl()
    • getK

      public double getK()
    • setUrl

      public void setUrl(String url)
    • setPortalMesh

      public void setPortalMesh(String portalMesh)
    • setPortalThumbnail

      public void setPortalThumbnail(String portalThumbnail)
    • setPortalScript

      public void setPortalScript(String portalScript)
    • setCurrentServers

      public void setCurrentServers(ConcurrentHashMap<Long,RemoteServer> currentServers)
    • setServerCount

      public void setServerCount(AtomicInteger serverCount)
    • setDl

      public void setDl(double dl)
    • setK

      public void setK(double k)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class World
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class World
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class World
    • toString

      public String toString()
      Overrides:
      toString in class World