mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-04-25 16:00:27 +00:00
reduce code used in settings.gradle.kts, changes to plugin message
This commit is contained in:
@@ -11,7 +11,7 @@ dependencies {
|
||||
tasks {
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(8) // use java 8 for shit servers that still stuck on 1.8
|
||||
options.release.set(17)
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package net.limework.pluginmessageapi.protocol.messages;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import net.limework.pluginmessageapi.protocol.PluginMessageHandler;
|
||||
import net.limework.pluginmessageapi.protocol.PluginMessage;
|
||||
|
||||
// example plugin message class
|
||||
public class HelloMessage extends PluginMessage {
|
||||
|
||||
private String helloWorld;
|
||||
|
||||
private static final String DEFAULT_MESSAGE = "hello from Limework!";
|
||||
|
||||
public HelloMessage(String helloWorld) {
|
||||
this.helloWorld = helloWorld != null ? helloWorld : DEFAULT_MESSAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decode(ByteArrayDataInput in) {
|
||||
this.helloWorld = in.readUTF();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encode(ByteArrayDataOutput out) {
|
||||
out.writeUTF(this.helloWorld);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(PluginMessageHandler messageHandler) {
|
||||
// messageHandler.handle(this);
|
||||
}
|
||||
|
||||
public void setHelloWorldMessage(String helloWorld) {
|
||||
this.helloWorld = helloWorld != null ? helloWorld : DEFAULT_MESSAGE;
|
||||
}
|
||||
|
||||
public String helloWorld() {
|
||||
return helloWorld;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user