Interface Client

    • Method Detail

      • player

        Optional<LocalPlayer> player()
        Gets the player responsible for controlling this client.

        A client may not always have a local player if browsing menus prior to joining a world or server.

        Returns:
        The local player or Optional.empty() if it is not found
      • server

        Optional<LocalServer> server()
        Gets the server that powers a local SinglePlayer game instance of a typical Minecraft client.

        A client will not have a local server if it is outside of SinglePlayer

        Returns:
        The local server or Optional.empty() if it is not found
      • world

        Optional<ClientWorld> world()
        Gets the world that a typical Minecraft client will be viewing while in some game instance (local or remote).

        A client will not have a client world if it is browsing the main menus

        Returns:
        The client world or Optional.empty()} if it is not found