geforkt von Mirrors/Velocity
Add dataAsInputStream() to PluginMessageEvent
Dieser Commit ist enthalten in:
Ursprung
fc51f1c203
Commit
c963343e27
@ -9,6 +9,7 @@ import com.velocitypowered.api.proxy.ServerConnection;
|
|||||||
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
|
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
|
||||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
|
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
|
||||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
|
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,6 +67,10 @@ public final class PluginMessageEvent implements ResultedEvent<PluginMessageEven
|
|||||||
return Arrays.copyOf(data, data.length);
|
return Arrays.copyOf(data, data.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ByteArrayInputStream dataAsInputStream() {
|
||||||
|
return new ByteArrayInputStream(data);
|
||||||
|
}
|
||||||
|
|
||||||
public ByteArrayDataInput dataAsDataStream() {
|
public ByteArrayDataInput dataAsDataStream() {
|
||||||
return ByteStreams.newDataInput(data);
|
return ByteStreams.newDataInput(data);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren