public interface Form
| Modifier and Type | Method and Description |
|---|---|
String |
getJsonData()
Returns the data that will be sent by Geyser to the Bedrock client
|
Consumer<String> |
getResponseHandler()
Returns the handler that will be invoked once the form got a response from the Bedrock
client
|
FormType |
getType()
Returns the form type of this specific instance.
|
boolean |
isClosed(String response)
Checks if the given data by the Bedrock client is saying that the client closed the form.
|
FormResponse |
parseResponse(String response)
Parses the method into something provided by the form implementation, which will make the
data given by the Bedrock client easier to handle.
|
void |
setResponseHandler(Consumer<String> responseHandler)
Sets the handler that will be invoked once the form got a response from the Bedrock client.
|
FormType getType()
in the FormType classString getJsonData()
Consumer<String> getResponseHandler()
void setResponseHandler(Consumer<String> responseHandler)
parseResponse(String) if you want to turn the given data into something that's easier to
handle.responseHandler - the response handlerFormResponse parseResponse(String response)
response - the raw data given by the Bedrock clientboolean isClosed(String response)
response - the raw data given by the Bedrock clientCopyright © 2020 GeyserMC. All rights reserved.