Class Result

java.lang.Object
de.chojo.jdautil.conversation.elements.Result

public class Result extends Object
Class which represents the result of a Step
  • Method Details

    • proceed

      public static Result proceed(int next)
      Proceeds to the next step
      Parameters:
      next - next step
      Returns:
      new result
    • finish

      public static Result finish()
      Ends the conversation
      Returns:
      new result
    • fail

      public static Result fail()
      Fails the current step and repeats the last step again
      Returns:
      new result
    • failSilent

      @Deprecated(forRemoval=true) public static Result failSilent(boolean silent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated in favor of freeze()
      Fails the current step and repeats the last step again
      Parameters:
      silent - true if the message should not be sent again
      Returns:
      new result
    • freeze

      public static Result freeze()
      Freezes the conversation in the current step and handles another input.
      Returns:
      new result
    • isSilent

      public boolean isSilent()
      Checks if the failure is silent. Only applicable if type() is ResultType.FAILED
      Returns:
      true if silent
    • type

      public ResultType type()
      Returns:
    • next

      public int next()
      Returns the id of the next stage. Only applicable if type() is ResultType.PROCEED
      Returns:
      id of next step