Class World

java.lang.Object
net.botwithus.rs3.game.login.World
All Implemented Interfaces:
Interactable<World.Option>

public final class World extends Object implements Interactable<World.Option>
Represents a world in the world list.
  • Constructor Details

    • World

      public World(int id, int population, int properties, int ping, String activity)
  • Method Details

    • getId

      public int getId()
      Returns the id of the world.
      Returns:
      the id of the world
    • getPopulation

      public int getPopulation()
      Returns the player count of the world.
      Returns:
      the player count of the world
    • getProperties

      public int getProperties()
      Returns the properties of the world. The holds if the world isMembers and other information.
      Returns:
    • getActivity

      public String getActivity()
      Returns the activity of the world.
      Returns:
      the activity of the world
    • isMembers

      public boolean isMembers()
      Returns true if the world is members only.
      Returns:
      true if the world is members only
    • isFull

      public boolean isFull()
      Returns true if the world is full. Jagex checks the population in cs2 against 1980 so we do the same
      Returns:
      true if the world is full
    • getPing

      public int getPing()
      Returns the ping of the world.
      Returns:
      the ping of the world
    • interact

      public boolean interact(World.Option type)
      Description copied from interface: Interactable
      Performs an action based on the given type.
      Specified by:
      interact in interface Interactable<World.Option>
      Parameters:
      type - The type of action to perform.
      Returns:
      true if the action was successful, false otherwise.
    • interact

      public boolean interact(Integer option)
      Specified by:
      interact in interface Interactable<World.Option>
    • getOptions

      @NotNull public @NotNull List<String> getOptions()
      Description copied from interface: Interactable
      Gets the options available for this Interactable
      Specified by:
      getOptions in interface Interactable<World.Option>
      Returns:
      a list of strings containing the options
    • getDefaultMapper

      public Function<Integer,World.Option> getDefaultMapper()
      Description copied from interface: Interactable
      Returns a default Function that throws an UnsupportedOperationException when called.
      Specified by:
      getDefaultMapper in interface Interactable<World.Option>
      Returns:
      a default Function