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

java.lang.Object
org.geysermc.geyser.event.GeyserEvent
org.geysermc.geyser.event.events.packet.UpstreamPacketReceiveEvent<T>
All Implemented Interfaces:
Cancellable, EventSession
Direct Known Subclasses:
AddBehaviorTreePacketReceive, AddEntityPacketReceive, AddHangingEntityPacketReceive, AddItemEntityPacketReceive, AddPaintingPacketReceive, AddPlayerPacketReceive, AdventureSettingsPacketReceive, AnimatePacketReceive, AnvilDamagePacketReceive, AutomationClientConnectPacketReceive, AvailableCommandsPacketReceive, AvailableEntityIdentifiersPacketReceive, BiomeDefinitionListPacketReceive, BlockEntityDataPacketReceive, BlockEventPacketReceive, BlockPickRequestPacketReceive, BookEditPacketReceive, BossEventPacketReceive, CameraPacketReceive, ChangeDimensionPacketReceive, ChunkRadiusUpdatedPacketReceive, ClientboundMapItemDataPacketReceive, ClientCacheBlobStatusPacketReceive, ClientCacheMissResponsePacketReceive, ClientCacheStatusPacketReceive, ClientToServerHandshakePacketReceive, CodeBuilderPacketReceive, CommandBlockUpdatePacketReceive, CommandOutputPacketReceive, CommandRequestPacketReceive, CompletedUsingItemPacketReceive, ContainerClosePacketReceive, ContainerOpenPacketReceive, ContainerSetDataPacketReceive, CraftingDataPacketReceive, CraftingEventPacketReceive, CreativeContentPacketReceive, DebugInfoPacketReceive, DisconnectPacketReceive, EducationSettingsPacketReceive, EmoteListPacketReceive, EmotePacketReceive, EntityEventPacketReceive, EntityFallPacketReceive, EntityPickRequestPacketReceive, EventPacketReceive, ExplodePacketReceive, GameRulesChangedPacketReceive, GuiDataPickItemPacketReceive, HurtArmorPacketReceive, InteractPacketReceive, InventoryContentPacketReceive, InventorySlotPacketReceive, InventoryTransactionPacketReceive, ItemFrameDropItemPacketReceive, ItemStackRequestPacketReceive, ItemStackResponsePacketReceive, LabTablePacketReceive, LecternUpdatePacketReceive, LevelChunkPacketReceive, LevelEventGenericPacketReceive, LevelEventPacketReceive, LevelSoundEvent1PacketReceive, LevelSoundEvent2PacketReceive, LevelSoundEventPacketReceive, LoginPacketReceive, MapCreateLockedCopyPacketReceive, MapInfoRequestPacketReceive, MobArmorEquipmentPacketReceive, MobEffectPacketReceive, MobEquipmentPacketReceive, ModalFormRequestPacketReceive, ModalFormResponsePacketReceive, MoveEntityAbsolutePacketReceive, MoveEntityDeltaPacketReceive, MovePlayerPacketReceive, MultiplayerSettingsPacketReceive, NetworkChunkPublisherUpdatePacketReceive, NetworkSettingsPacketReceive, NetworkStackLatencyPacketReceive, NpcRequestPacketReceive, OnScreenTextureAnimationPacketReceive, PacketViolationWarningPacketReceive, PhotoTransferPacketReceive, PlayerActionPacketReceive, PlayerArmorDamagePacketReceive, PlayerAuthInputPacketReceive, PlayerEnchantOptionsPacketReceive, PlayerHotbarPacketReceive, PlayerInputPacketReceive, PlayerListPacketReceive, PlayerSkinPacketReceive, PlaySoundPacketReceive, PlayStatusPacketReceive, PositionTrackingDBClientRequestPacketReceive, PositionTrackingDBServerBroadcastPacketReceive, PurchaseReceiptPacketReceive, RemoveEntityPacketReceive, RemoveObjectivePacketReceive, RequestChunkRadiusPacketReceive, ResourcePackChunkDataPacketReceive, ResourcePackChunkRequestPacketReceive, ResourcePackClientResponsePacketReceive, ResourcePackDataInfoPacketReceive, ResourcePacksInfoPacketReceive, ResourcePackStackPacketReceive, RespawnPacketReceive, RiderJumpPacketReceive, ScriptCustomEventPacketReceive, ServerSettingsRequestPacketReceive, ServerSettingsResponsePacketReceive, ServerToClientHandshakePacketReceive, SetCommandsEnabledPacketReceive, SetDefaultGameTypePacketReceive, SetDifficultyPacketReceive, SetDisplayObjectivePacketReceive, SetEntityDataPacketReceive, SetEntityLinkPacketReceive, SetEntityMotionPacketReceive, SetHealthPacketReceive, SetLastHurtByPacketReceive, SetLocalPlayerAsInitializedPacketReceive, SetPlayerGameTypePacketReceive, SetScoreboardIdentityPacketReceive, SetScorePacketReceive, SetSpawnPositionPacketReceive, SetTimePacketReceive, SettingsCommandPacketReceive, SetTitlePacketReceive, ShowCreditsPacketReceive, ShowProfilePacketReceive, ShowStoreOfferPacketReceive, SimpleEventPacketReceive, SpawnExperienceOrbPacketReceive, SpawnParticleEffectPacketReceive, StartGamePacketReceive, StopSoundPacketReceive, StructureBlockUpdatePacketReceive, StructureTemplateDataRequestPacketReceive, StructureTemplateDataResponsePacketReceive, SubClientLoginPacketReceive, TakeItemEntityPacketReceive, TextPacketReceive, TickSyncPacketReceive, TransferPacketReceive, UnknownPacketReceive, UpdateAttributesPacketReceive, UpdateBlockPacketReceive, UpdateBlockPropertiesPacketReceive, UpdateBlockSyncedPacketReceive, UpdateEquipPacketReceive, UpdatePlayerGameTypePacketReceive, UpdateSoftEnumPacketReceive, UpdateTradePacketReceive, VideoStreamConnectPacketReceive

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

    • UpstreamPacketReceiveEvent

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

    • of

      public static <T extends com.nukkitx.protocol.bedrock.BedrockPacket,​ P extends UpstreamPacketReceiveEvent<T>> P of(GeyserSession session, T packet)
      Create a new UpstreamPacketReceiveEvent 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