ViaVersion/api/src/main/java/us/myles/ViaVersion/api/platform/ViaInjector.java

49 lines
1.1 KiB
Java
Raw Normal View History

package us.myles.ViaVersion.api.platform;
import com.google.gson.JsonObject;
public interface ViaInjector {
2016-09-27 18:31:10 +02:00
/**
* Inject into the current Platform
*
* @throws Exception If there is an error with injecting
*/
void inject() throws Exception;
2016-09-27 18:31:10 +02:00
/**
* Uninject into the current Platform
*
* @throws Exception If there is an error with uninjecting
*/
void uninject() throws Exception;
2016-09-27 18:31:10 +02:00
/**
* Get the server protocol version
*
* @return The server protocol integer
* @throws Exception If there is an error with getting this info, eg. not binded.
*/
int getServerProtocolVersion() throws Exception;
2016-09-26 18:57:36 +02:00
2016-09-27 18:31:10 +02:00
/**
* Get the name of the encoder for then netty pipeline for this platform.
*
* @return The name
*/
String getEncoderName();
/**
* Get the name of the decoder for then netty pipeline for this platform.
*
* @return The name
*/
String getDecoderName();
/**
* Get any relevant data for debugging injection issues.
*
* @return JSONObject containing the data
*/
JsonObject getDump();
}