Class JsonRPCUtils
java.lang.Object
net.minecraft.server.jsonrpc.JsonRPCUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonObjectcreateError(com.google.gson.JsonElement id, String message, int errorCode, @Nullable String data) static com.google.gson.JsonObjectcreateRequest(@Nullable Integer id, Identifier method, List<com.google.gson.JsonElement> params) static com.google.gson.JsonObjectcreateSuccessResult(com.google.gson.JsonElement id, com.google.gson.JsonElement result) static @Nullable com.google.gson.JsonObjectgetError(com.google.gson.JsonObject jsonObject) static @Nullable StringgetMethodName(com.google.gson.JsonObject jsonObject) static @Nullable com.google.gson.JsonElementgetParams(com.google.gson.JsonObject jsonObject) static @Nullable com.google.gson.JsonElementgetRequestId(com.google.gson.JsonObject jsonObject) static @Nullable com.google.gson.JsonElementgetResult(com.google.gson.JsonObject jsonObject)
-
Field Details
-
JSON_RPC_VERSION
- See Also:
-
OPEN_RPC_VERSION
- See Also:
-
-
Constructor Details
-
JsonRPCUtils
public JsonRPCUtils()
-
-
Method Details
-
createSuccessResult
public static com.google.gson.JsonObject createSuccessResult(com.google.gson.JsonElement id, com.google.gson.JsonElement result) -
createRequest
public static com.google.gson.JsonObject createRequest(@Nullable Integer id, Identifier method, List<com.google.gson.JsonElement> params) -
createError
-
getRequestId
public static @Nullable com.google.gson.JsonElement getRequestId(com.google.gson.JsonObject jsonObject) -
getMethodName
-
getParams
public static @Nullable com.google.gson.JsonElement getParams(com.google.gson.JsonObject jsonObject) -
getResult
public static @Nullable com.google.gson.JsonElement getResult(com.google.gson.JsonObject jsonObject) -
getError
public static @Nullable com.google.gson.JsonObject getError(com.google.gson.JsonObject jsonObject)
-