Class UpstreamPacketSendEvent<T extends com.nukkitx.protocol.bedrock.BedrockPacket>

java.lang.Object
org.geysermc.geyser.event.GeyserEvent
org.geysermc.geyser.event.events.packet.UpstreamPacketSendEvent<T>
All Implemented Interfaces:
Cancellable, EventSession
Direct Known Subclasses:
AddBehaviorTreePacketSend, AddEntityPacketSend, AddHangingEntityPacketSend, AddItemEntityPacketSend, AddPaintingPacketSend, AddPlayerPacketSend, AdventureSettingsPacketSend, AnimatePacketSend, AnvilDamagePacketSend, AutomationClientConnectPacketSend, AvailableCommandsPacketSend, AvailableEntityIdentifiersPacketSend, BiomeDefinitionListPacketSend, BlockEntityDataPacketSend, BlockEventPacketSend, BlockPickRequestPacketSend, BookEditPacketSend, BossEventPacketSend, CameraPacketSend, ChangeDimensionPacketSend, ChunkRadiusUpdatedPacketSend, ClientboundMapItemDataPacketSend, ClientCacheBlobStatusPacketSend, ClientCacheMissResponsePacketSend, ClientCacheStatusPacketSend, ClientToServerHandshakePacketSend, CodeBuilderPacketSend, CommandBlockUpdatePacketSend, CommandOutputPacketSend, CommandRequestPacketSend, CompletedUsingItemPacketSend, ContainerClosePacketSend, ContainerOpenPacketSend, ContainerSetDataPacketSend, CraftingDataPacketSend, CraftingEventPacketSend, CreativeContentPacketSend, DebugInfoPacketSend, DisconnectPacketSend, EducationSettingsPacketSend, EmoteListPacketSend, EmotePacketSend, EntityEventPacketSend, EntityFallPacketSend, EntityPickRequestPacketSend, EventPacketSend, ExplodePacketSend, GameRulesChangedPacketSend, GuiDataPickItemPacketSend, HurtArmorPacketSend, InteractPacketSend, InventoryContentPacketSend, InventorySlotPacketSend, InventoryTransactionPacketSend, ItemFrameDropItemPacketSend, ItemStackRequestPacketSend, ItemStackResponsePacketSend, LabTablePacketSend, LecternUpdatePacketSend, LevelChunkPacketSend, LevelEventGenericPacketSend, LevelEventPacketSend, LevelSoundEvent1PacketSend, LevelSoundEvent2PacketSend, LevelSoundEventPacketSend, LoginPacketSend, MapCreateLockedCopyPacketSend, MapInfoRequestPacketSend, MobArmorEquipmentPacketSend, MobEffectPacketSend, MobEquipmentPacketSend, ModalFormRequestPacketSend, ModalFormResponsePacketSend, MoveEntityAbsolutePacketSend, MoveEntityDeltaPacketSend, MovePlayerPacketSend, MultiplayerSettingsPacketSend, NetworkChunkPublisherUpdatePacketSend, NetworkSettingsPacketSend, NetworkStackLatencyPacketSend, NpcRequestPacketSend, OnScreenTextureAnimationPacketSend, PacketViolationWarningPacketSend, PhotoTransferPacketSend, PlayerActionPacketSend, PlayerArmorDamagePacketSend, PlayerAuthInputPacketSend, PlayerEnchantOptionsPacketSend, PlayerHotbarPacketSend, PlayerInputPacketSend, PlayerListPacketSend, PlayerSkinPacketSend, PlaySoundPacketSend, PlayStatusPacketSend, PositionTrackingDBClientRequestPacketSend, PositionTrackingDBServerBroadcastPacketSend, PurchaseReceiptPacketSend, RemoveEntityPacketSend, RemoveObjectivePacketSend, RequestChunkRadiusPacketSend, ResourcePackChunkDataPacketSend, ResourcePackChunkRequestPacketSend, ResourcePackClientResponsePacketSend, ResourcePackDataInfoPacketSend, ResourcePacksInfoPacketSend, ResourcePackStackPacketSend, RespawnPacketSend, RiderJumpPacketSend, ScriptCustomEventPacketSend, ServerSettingsRequestPacketSend, ServerSettingsResponsePacketSend, ServerToClientHandshakePacketSend, SetCommandsEnabledPacketSend, SetDefaultGameTypePacketSend, SetDifficultyPacketSend, SetDisplayObjectivePacketSend, SetEntityDataPacketSend, SetEntityLinkPacketSend, SetEntityMotionPacketSend, SetHealthPacketSend, SetLastHurtByPacketSend, SetLocalPlayerAsInitializedPacketSend, SetPlayerGameTypePacketSend, SetScoreboardIdentityPacketSend, SetScorePacketSend, SetSpawnPositionPacketSend, SetTimePacketSend, SettingsCommandPacketSend, SetTitlePacketSend, ShowCreditsPacketSend, ShowProfilePacketSend, ShowStoreOfferPacketSend, SimpleEventPacketSend, SpawnExperienceOrbPacketSend, SpawnParticleEffectPacketSend, StartGamePacketSend, StopSoundPacketSend, StructureBlockUpdatePacketSend, StructureTemplateDataRequestPacketSend, StructureTemplateDataResponsePacketSend, SubClientLoginPacketSend, TakeItemEntityPacketSend, TextPacketSend, TickSyncPacketSend, TransferPacketSend, UnknownPacketSend, UpdateAttributesPacketSend, UpdateBlockPacketSend, UpdateBlockPropertiesPacketSend, UpdateBlockSyncedPacketSend, UpdateEquipPacketSend, UpdatePlayerGameTypePacketSend, UpdateSoftEnumPacketSend, UpdateTradePacketSend, VideoStreamConnectPacketSend

public abstract class UpstreamPacketSendEvent<T extends com.nukkitx.protocol.bedrock.BedrockPacket> extends GeyserEvent implements Cancellable, EventSession
  • Constructor Details

    • UpstreamPacketSendEvent

      public UpstreamPacketSendEvent(@NonNull @NonNull GeyserSession session, @NonNull T packet)
  • Method Details

    • of

      public static <T extends com.nukkitx.protocol.bedrock.BedrockPacket> UpstreamPacketSendEvent<T> of(GeyserSession session, T packet)
      Create a new UpstreamPacketSendEvent based on the packet type
      Parameters:
      session - player session
      packet - the packet to wrap
      Returns:
      an instantiated class that inherits from this one
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Cancellable
      Returns true if the event has been cancelled
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      True if cancelled
    • getSession

      @NonNull public @NonNull GeyserSession getSession()
      Description copied from interface: EventSession
      Return the GeyserSession for this Event
      Specified by:
      getSession in interface EventSession
      Returns:
      the current session
    • getPacket

      @NonNull public T getPacket()
      Upstream packet
      Returns:
      get the current upstream packet
    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: Cancellable
      Set if an event is cancelled
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancelled - True if event should be cancelled.
    • setPacket

      public void setPacket(@NonNull T packet)
      Upstream packet
      Parameters:
      packet - set the upstream packet
    • toString

      public String toString()
      Overrides:
      toString in class GeyserEvent
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class GeyserEvent
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class GeyserEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class GeyserEvent