Class PlatformPlayerManager

java.lang.Object
eu.cloudnetservice.modules.bridge.platform.PlatformPlayerManager
All Implemented Interfaces:
PlayerManager

abstract class PlatformPlayerManager extends Object implements PlayerManager
  • Field Details

    • sender

      private final eu.cloudnetservice.driver.network.rpc.RPCSender sender
    • playerProviderAllocator

      private final eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<PlayerProvider> playerProviderAllocator
    • playerExecutorAllocator

      private final eu.cloudnetservice.driver.network.rpc.factory.RPCImplementationBuilder.InstanceAllocator<? extends PlayerExecutor> playerExecutorAllocator
    • allPlayers

      private final PlayerProvider allPlayers
    • globalPlayerExecutor

      private final PlayerExecutor globalPlayerExecutor
  • Constructor Details

    • PlatformPlayerManager

      @RPCInvocationTarget public PlatformPlayerManager(@NonNull @NonNull eu.cloudnetservice.driver.network.rpc.RPCSender sender, @NonNull @NonNull Supplier<eu.cloudnetservice.driver.network.NetworkChannel> channelSupplier)
  • Method Details

    • onlinePlayers

      @NonNull public @NonNull PlayerProvider onlinePlayers()
      Description copied from interface: PlayerManager
      Gets a player provider that provides access to all players that are connected to the cloudnet network.
      Specified by:
      onlinePlayers in interface PlayerManager
      Returns:
      the player provider for all online players.
    • taskOnlinePlayers

      @NonNull public @NonNull PlayerProvider taskOnlinePlayers(@NonNull @NonNull String task)
      Description copied from interface: PlayerManager
      Gets a player provider that provides access to all players that are connected to a service of the task with the given name.
      Specified by:
      taskOnlinePlayers in interface PlayerManager
      Parameters:
      task - the task of the service the player has to be connected to.
      Returns:
      the player provider for the given task.
    • groupOnlinePlayers

      @NonNull public @NonNull PlayerProvider groupOnlinePlayers(@NonNull @NonNull String group)
      Description copied from interface: PlayerManager
      Gets a player provider that provides access to all players that are connected to a service with the group with the given name.
      Specified by:
      groupOnlinePlayers in interface PlayerManager
      Parameters:
      group - the group of the service the player has to be connected to.
      Returns:
      the player provider for the given group.
    • globalPlayerExecutor

      @NonNull public @NonNull PlayerExecutor globalPlayerExecutor()
      Description copied from interface: PlayerManager
      Gets the jvm static player executor for all players that are connected to the network. All methods account for all connected players.
      Specified by:
      globalPlayerExecutor in interface PlayerManager
      Returns:
      the global player executor for all players.
    • playerExecutor

      @NonNull public @NonNull PlayerExecutor playerExecutor(@NonNull @NonNull UUID uniqueId)
      Description copied from interface: PlayerManager
      Creates a new player executor for the player associated with the given unique id. The player executor is created even if there is no online player with the given unique id.
      Specified by:
      playerExecutor in interface PlayerManager
      Parameters:
      uniqueId - the unique id of the player for the new player executor.
      Returns:
      the player executor for the given player.