Interface PlayerObserver<P extends Player<P,​S>,​S>

Type Parameters:
P - the generic type
S - the generic type
All Superinterfaces:
ChangePositionObserver<P>, ClickedObserver<P>, DraggabilityChangedObserver<P>, PositionChangedObserver<P>, StateChangedObserver<P,​S>, VisibilityChangedObserver<P>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface PlayerObserver<P extends Player<P,​S>,​S>
extends ClickedObserver<P>, ChangePositionObserver<P>, PositionChangedObserver<P>, StateChangedObserver<P,​S>, VisibilityChangedObserver<P>, DraggabilityChangedObserver<P>
An asynchronous update interface for receiving notifications about Player information as the Player is constructed.
  • Method Summary

    Modifier and Type Method Description
    default void onChangePositionEvent​(ChangePositionEvent<P> aPlayerEvent)
    This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
    default void onClickedEvent​(ClickedEvent<P> aPlayerEvent)
    This method is called when a player has been clicked.
    default void onDraggabilityChangedEvent​(DraggabilityChangedEvent<P> aPlayerEvent)
    This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
    void onPlayerEvent​(PlayerEvent<P> aPlayerEvent)
    This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
    default void onPositionChangedEvent​(PositionChangedEvent<P> aPlayerEvent)
    This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
    default void onStateChangedEvent​(StateChangedEvent<P,​S> aPlayerEvent)
    This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
    default void onVisibilityChangedEvent​(VisibilityChangedEvent<P> aPlayerEvent)
    This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
  • Method Details

    • onPlayerEvent

      void onPlayerEvent​(PlayerEvent<P> aPlayerEvent)
      This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
      Parameters:
      aPlayerEvent - the player event
    • onChangePositionEvent

      default void onChangePositionEvent​(ChangePositionEvent<P> aPlayerEvent) throws org.refcodes.exception.VetoException
      This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
      Specified by:
      onChangePositionEvent in interface ChangePositionObserver<P extends Player<P,​S>>
      Parameters:
      aPlayerEvent - the player event
      Throws:
      org.refcodes.exception.VetoException - the veto exception
    • onPositionChangedEvent

      default void onPositionChangedEvent​(PositionChangedEvent<P> aPlayerEvent)
      This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
      Specified by:
      onPositionChangedEvent in interface PositionChangedObserver<P extends Player<P,​S>>
      Parameters:
      aPlayerEvent - the player event
    • onStateChangedEvent

      default void onStateChangedEvent​(StateChangedEvent<P,​S> aPlayerEvent)
      This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
      Specified by:
      onStateChangedEvent in interface StateChangedObserver<P extends Player<P,​S>,​S>
      Parameters:
      aPlayerEvent - the player event
    • onVisibilityChangedEvent

      default void onVisibilityChangedEvent​(VisibilityChangedEvent<P> aPlayerEvent)
      This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
      Specified by:
      onVisibilityChangedEvent in interface VisibilityChangedObserver<P extends Player<P,​S>>
      Parameters:
      aPlayerEvent - the player event
    • onDraggabilityChangedEvent

      default void onDraggabilityChangedEvent​(DraggabilityChangedEvent<P> aPlayerEvent)
      This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
      Specified by:
      onDraggabilityChangedEvent in interface DraggabilityChangedObserver<P extends Player<P,​S>>
      Parameters:
      aPlayerEvent - the player event
    • onClickedEvent

      default void onClickedEvent​(ClickedEvent<P> aPlayerEvent)
      This method is called when a player has been clicked.
      Specified by:
      onClickedEvent in interface ClickedObserver<P extends Player<P,​S>>
      Parameters:
      aPlayerEvent - the player event