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> {
|
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.
|
* A result determining whether or not to forward this message on.
|
||||||
|
@ -58,32 +58,32 @@ public final class PluginMessageEventImpl implements PluginMessageEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChannelMessageSource getSource() {
|
public ChannelMessageSource source() {
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChannelMessageSink getTarget() {
|
public ChannelMessageSink sink() {
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChannelIdentifier getIdentifier() {
|
public ChannelIdentifier channel() {
|
||||||
return identifier;
|
return identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getData() {
|
public byte[] rawMessage() {
|
||||||
return Arrays.copyOf(data, data.length);
|
return Arrays.copyOf(data, data.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ByteArrayInputStream dataAsInputStream() {
|
public ByteArrayInputStream messageAsInputStream() {
|
||||||
return new ByteArrayInputStream(data);
|
return new ByteArrayInputStream(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ByteArrayDataInput dataAsDataStream() {
|
public ByteArrayDataInput messageAsDataInput() {
|
||||||
return ByteStreams.newDataInput(data);
|
return ByteStreams.newDataInput(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren