Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Do it to the message event too
Dieser Commit ist enthalten in:
Ursprung
47c354e6ee
Commit
0ed8352012
@ -22,17 +22,17 @@ import java.io.ByteArrayInputStream;
|
||||
*/
|
||||
public interface PluginMessageEvent extends ResultedEvent<PluginMessageEvent.ForwardResult> {
|
||||
|
||||
ChannelMessageSource getSource();
|
||||
ChannelMessageSource source();
|
||||
|
||||
ChannelMessageSink getTarget();
|
||||
ChannelMessageSink sink();
|
||||
|
||||
ChannelIdentifier getIdentifier();
|
||||
ChannelIdentifier channel();
|
||||
|
||||
byte[] getData();
|
||||
byte[] rawMessage();
|
||||
|
||||
ByteArrayInputStream dataAsInputStream();
|
||||
ByteArrayInputStream messageAsInputStream();
|
||||
|
||||
ByteArrayDataInput dataAsDataStream();
|
||||
ByteArrayDataInput messageAsDataInput();
|
||||
|
||||
/**
|
||||
* A result determining whether or not to forward this message on.
|
||||
|
@ -58,32 +58,32 @@ public final class PluginMessageEventImpl implements PluginMessageEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelMessageSource getSource() {
|
||||
public ChannelMessageSource source() {
|
||||
return source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelMessageSink getTarget() {
|
||||
public ChannelMessageSink sink() {
|
||||
return target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelIdentifier getIdentifier() {
|
||||
public ChannelIdentifier channel() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getData() {
|
||||
public byte[] rawMessage() {
|
||||
return Arrays.copyOf(data, data.length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteArrayInputStream dataAsInputStream() {
|
||||
public ByteArrayInputStream messageAsInputStream() {
|
||||
return new ByteArrayInputStream(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteArrayDataInput dataAsDataStream() {
|
||||
public ByteArrayDataInput messageAsDataInput() {
|
||||
return ByteStreams.newDataInput(data);
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren