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
Modifier and TypeFieldDescriptionprivate final boolean
private final Connection
TheConnection
for this message.private boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> io.netty.util.Attribute
<T> attr
(io.netty.util.AttributeKey<T> key) enqueueWork
(Runnable runnable) boolean
@Nullable ServerPlayer
When available, gets the sender for packets that are sent from a client to the server.boolean
boolean
void
setPacketHandled
(boolean packetHandled)
-
Field Details
-
connection
TheConnection
for 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.
-