Interface PlayerOperationContext

All Known Implementing Classes:
OperationContext

public interface PlayerOperationContext
Context - Interface for Player Gameplay Operation Context
Since:
21.8
Author:
渔民小镇
See Also:
date:
2022-03-31
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    get command data.
    The FlowContext of the current player
    default <T extends Player>
    T
    get the current operating player
    <T extends Room>
    T
    get room
    default long
    get room id
    default long
    get the userId of the current operating player
  • Method Details

    • getRoom

      <T extends Room> T getRoom()
      get room
      Type Parameters:
      T - Room
      Returns:
      room
    • getCommand

      <T> T getCommand()
      get command data. The data required for specific gameplay operations, usually customized by developers according to the game business
      Type Parameters:
      T - t
      Returns:
      operation data
    • getFlowContext

      FlowContext getFlowContext()
      The FlowContext of the current player
      Returns:
      FlowContext
    • getUserId

      default long getUserId()
      get the userId of the current operating player
      Returns:
      userId
    • getPlayer

      default <T extends Player> T getPlayer()
      get the current operating player
      Type Parameters:
      T - Player
      Returns:
      the current operating player
    • getRoomId

      default long getRoomId()
      get room id
      Returns:
      room id