Interface CodingPrompter

All Superinterfaces:
Manager, ShutDownable, Startable, Toggleable
All Known Implementing Classes:
DisabledCodingPrompter, GeminiPrompter, OpenAIPrompter, OpenRouterPrompter

public interface CodingPrompter extends Manager, Toggleable

CodingPrompter

This interface represents a coding prompter, that will generate a code by players prompts.
  • Method Summary

    Modifier and Type
    Method
    Description
    generateCode(@NotNull String nickname, @NotNull UUID uuid, @NotNull String prompt, int actionsLimit)
    Generates a code by player's prompt.
    void
    setToken(@NotNull String token)
    Sets the token for coding prompter.

    Methods inherited from interface Manager

    getName
    Modifier and Type
    Method
    Description
    @NotNull String
    Returns name of manager, that will be displayed by request in the logs.

    Methods inherited from interface ShutDownable

    shutdown
    Modifier and Type
    Method
    Description
    void
    Does tasks on shutdown.

    Methods inherited from interface Startable

    start
    Modifier and Type
    Method
    Description
    void
    Does tasks on start.

    Methods inherited from interface Toggleable

    isWorking
    Modifier and Type
    Method
    Description
    boolean
    Checks whether manager was started successfully and it currently works.
  • Method Details

    • generateCode

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

      void setToken(@NotNull @NotNull String token)
      Sets the token for coding prompter.
      Parameters:
      token - new token.