Package dev.latvian.mods.kubejs.net
Class NetworkKubeEvent
java.lang.Object
dev.latvian.mods.kubejs.net.NetworkKubeEvent
- All Implemented Interfaces:
KubeEntityEvent,KubeLivingEntityEvent,KubeEvent,KubeLevelEvent,KubePlayerEvent
@Info("Invoked when a network packet is received.\n\nNote that the behaviour of this event is depending on the **script type**.\n\nIn `server_scripts`, this event is invoked on the server side when a packet is received from a client.\n\nIn `client_scripts`, this event is invoked on the client side when a packet is received from the server.\n")
public class NetworkKubeEvent
extends Object
implements KubePlayerEvent
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkKubeEvent(net.minecraft.world.entity.player.Player p, String c, @Nullable net.minecraft.nbt.CompoundTag d) -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.nbt.CompoundTaggetData()net.minecraft.world.entity.player.PlayerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.entity.KubeEntityEvent
getLevelMethods inherited from interface dev.latvian.mods.kubejs.event.KubeEvent
afterPosted, cancel, cancel, defaultExitValue, exit, exit, getExitValueType, mapExitValue, success, successMethods inherited from interface dev.latvian.mods.kubejs.level.KubeLevelEvent
getRegistries, getServerMethods inherited from interface dev.latvian.mods.kubejs.player.KubePlayerEvent
getPlayer
-
Constructor Details
-
NetworkKubeEvent
public NetworkKubeEvent(net.minecraft.world.entity.player.Player p, String c, @Nullable @Nullable net.minecraft.nbt.CompoundTag d)
-
-
Method Details
-
getEntity
@Info("The player that sent the packet. Always `Minecraft.player` in `client_scripts`.") public net.minecraft.world.entity.player.Player getEntity()- Specified by:
getEntityin interfaceKubeEntityEvent- Specified by:
getEntityin interfaceKubeLivingEntityEvent- Specified by:
getEntityin interfaceKubePlayerEvent
-
getChannel
-
getData
-