Class DisabledCodingPrompter

java.lang.Object
ua.mcchickenstudio.opencreative.coding.prompters.DisabledCodingPrompter
All Implemented Interfaces:
CodingPrompter, Manager

public final class DisabledCodingPrompter extends Object implements CodingPrompter

DisabledCodingPrompter

This class represents a coding prompter, that does nothing, because it's disabled.
  • Constructor Details

    • DisabledCodingPrompter

      public DisabledCodingPrompter()
  • Method Details

    • generateCode

      @NotNull public @NotNull CompletableFuture<String> generateCode(@NotNull @NotNull String nickname, @NotNull @NotNull UUID uuid, @NotNull @NotNull String text, int actionsLimit)
      Description copied from interface: CodingPrompter
      Generates a code by player's prompt. Returns
      Specified by:
      generateCode in interface CodingPrompter
      Parameters:
      nickname - name of player.
      uuid - uuid of player.
      text - prompt to generate code.
      actionsLimit - limit of actions per executor.
      Returns:
      code script YAML, or reason why code refused to generate.
    • setToken

      public void setToken(@NotNull @NotNull String token)
      Description copied from interface: CodingPrompter
      Sets the token for coding prompter.
      Specified by:
      setToken in interface CodingPrompter
      Parameters:
      token - new token.
    • init

      public void init()
      Description copied from interface: Manager
      Initialization of manager.
      Specified by:
      init in interface Manager
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Manager
      Checks if manager is ready to work.
      Specified by:
      isEnabled in interface Manager
      Returns:
      true - if enabled, false - disabled.
    • getName

      public String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.