Don't fetch NetworkMarker uncessarily.
Dieser Commit ist enthalten in:
Ursprung
3b26940385
Commit
485c3856c1
@ -257,16 +257,7 @@ class ChannelInjector extends ByteToMessageDecoder implements Injector {
|
||||
* @return The resulting message/packet.
|
||||
*/
|
||||
private PacketEvent processSending(Object message) {
|
||||
return processSending(message, packetMarker.get(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a given message on the packet listeners.
|
||||
* @param message - the message/packet.
|
||||
* @return The resulting message/packet.
|
||||
*/
|
||||
private PacketEvent processSending(Object message, NetworkMarker marker) {
|
||||
return channelListener.onPacketSending(ChannelInjector.this, message, marker);
|
||||
return channelListener.onPacketSending(ChannelInjector.this, message);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -315,7 +306,7 @@ class ChannelInjector extends ByteToMessageDecoder implements Injector {
|
||||
packet = null;
|
||||
|
||||
} else {
|
||||
event = processSending(packet, marker);
|
||||
event = processSending(packet);
|
||||
|
||||
// Handle the output
|
||||
if (event != null) {
|
||||
|
@ -16,10 +16,9 @@ interface ChannelListener {
|
||||
* This is invoked on the main thread.
|
||||
* @param injector - the channel injector.
|
||||
* @param packet - the packet.
|
||||
* @param marker - the associated network marker, if any.
|
||||
* @return The packet even that was passed to the listeners, with a possible packet change, or NULL.
|
||||
*/
|
||||
public PacketEvent onPacketSending(Injector injector, Object packet, NetworkMarker marker);
|
||||
public PacketEvent onPacketSending(Injector injector, Object packet);
|
||||
|
||||
/**
|
||||
* Invoked when a packet is being received from a client.
|
||||
|
@ -227,7 +227,7 @@ public class NettyProtocolInjector implements ChannelListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketEvent onPacketSending(Injector injector, Object packet, NetworkMarker marker) {
|
||||
public PacketEvent onPacketSending(Injector injector, Object packet) {
|
||||
Class<?> clazz = packet.getClass();
|
||||
|
||||
if (sendingFilters.contains(clazz)) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren