Interface IShips


public interface IShips
Provides access to and management of ships in the sailing system.

This interface serves as a manager for ship entities within the game's sailing feature. Ships represent separate world views that players can interact with during sailing activities.

Ships contain their own set of entities including NPCs, players, tiles, and objects that exist within the ship's world view.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets all currently loaded ships.
    Gets a ship by its world view identifier.
  • Method Details

    • getAll

      Collection<Ship> getAll()
      Gets all currently loaded ships.

      Returns a collection of all ship instances that are currently active and loaded in the game. This may include the player's ship and any other ships in the vicinity.

      Returns:
      a Collection containing all currently loaded Ship instances, or an empty collection if no ships are present
    • getByWorldViewId

      Ship getByWorldViewId(int id)
      Gets a ship by its world view identifier.

      Each ship has a unique world view ID that identifies it within the game. This method retrieves a specific ship based on that identifier.

      Parameters:
      id - the world view identifier of the ship to retrieve
      Returns:
      the Ship with the specified world view ID, or null if no ship exists with that ID