Enum Class JsonRPCErrors

java.lang.Object
java.lang.Enum<JsonRPCErrors>
net.minecraft.server.jsonrpc.JsonRPCErrors
All Implemented Interfaces:
Serializable, Comparable<JsonRPCErrors>, Constable

public enum JsonRPCErrors extends Enum<JsonRPCErrors>
  • Enum Constant Details

    • PARSE_ERROR

      public static final JsonRPCErrors PARSE_ERROR
    • INVALID_REQUEST

      public static final JsonRPCErrors INVALID_REQUEST
    • METHOD_NOT_FOUND

      public static final JsonRPCErrors METHOD_NOT_FOUND
    • INVALID_PARAMS

      public static final JsonRPCErrors INVALID_PARAMS
    • INTERNAL_ERROR

      public static final JsonRPCErrors INTERNAL_ERROR
  • Field Details

    • errorCode

      private final int errorCode
    • message

      private final String message
  • Constructor Details

    • JsonRPCErrors

      private JsonRPCErrors(int pErrorCode, String pMessage)
  • Method Details

    • values

      public static JsonRPCErrors[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JsonRPCErrors valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createWithUnknownId

      public JsonObject createWithUnknownId(@Nullable String pData)
    • createWithoutData

      public JsonObject createWithoutData(JsonElement pRequestId)
    • create

      public JsonObject create(JsonElement pRequestId, String pData)