Package net.minecraftforge.event.network
Class CustomPayloadEvent.Context
java.lang.Object
net.minecraftforge.event.network.CustomPayloadEvent.Context
- Enclosing class:
CustomPayloadEvent
Context for
CustomPayloadEvent-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final ConnectionTheConnectionfor this message.private boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> io.netty.util.Attribute<T> attr(io.netty.util.AttributeKey<T> key) enqueueWork(Runnable runnable) boolean@Nullable ServerPlayerWhen available, gets the sender for packets that are sent from a client to the server.booleanbooleanvoidsetPacketHandled(boolean packetHandled)
-
Field Details
-
connection
TheConnectionfor this message. -
client
private final boolean client -
packetHandled
private boolean packetHandled
-
-
Constructor Details
-
Context
-
-
Method Details
-
isClientSide
public boolean isClientSide() -
isServerSide
public boolean isServerSide() -
getConnection
-
attr
public <T> io.netty.util.Attribute<T> attr(io.netty.util.AttributeKey<T> key) -
setPacketHandled
public void setPacketHandled(boolean packetHandled) -
getPacketHandled
public boolean getPacketHandled() -
enqueueWork
-
getSender
When available, gets the sender for packets that are sent from a client to the server.
-