Interface EnablementComponent


public interface EnablementComponent
Data component that can be attached to an Entity to provide information about the enabled state of the entity, and to allow the enabled state to be changed.
  • Method Details

    • isEnabled

      boolean isEnabled()
      Returns:
      current state of the enabled flag for the entity.
    • isEnabledStateMutable

      boolean isEnabledStateMutable()
      Returns:
      true if the enabled state can be changed, false if it is immutable.
    • setEnabled

      CompletableFuture<Void> setEnabled(boolean enabled, String actor)
      Callback to alter the enabled state of the entity. You must check that isEnabledStateMutable() returns true before calling this method, otherwise will throw UnsupportedOperationException.