Class PacketEventsPacketAdapter

java.lang.Object
com.github.juliarn.npclib.bukkit.protocol.PacketEventsPacketAdapter
All Implemented Interfaces:
com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>

final class PacketEventsPacketAdapter extends Object implements com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static final class 
     
    private static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final PacketEventsPacketAdapter
     
    private static final Type
     
    private static final com.github.retrooper.packetevents.settings.PacketEventsSettings
     
    private com.github.retrooper.packetevents.manager.player.PlayerManager
     
    private com.github.retrooper.packetevents.manager.server.ServerVersion
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    createAnimationPacket(@NotNull com.github.juliarn.npclib.api.protocol.enums.EntityAnimation animation)
     
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    createCustomPayloadPacket(@NotNull String channelId, byte[] payload)
     
    private static @NotNull com.github.retrooper.packetevents.protocol.entity.data.EntityData
    createEntityData(int index, @NotNull Type type, @NotNull Object value, @NotNull com.github.juliarn.npclib.api.PlatformVersionAccessor versionAccessor)
     
    <T, O> @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    createEntityMetaPacket(@NotNull com.github.juliarn.npclib.api.protocol.meta.EntityMetadataFactory<T,O> metadata, T value)
     
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
     
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
     
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    createEquipmentPacket(@NotNull com.github.juliarn.npclib.api.protocol.enums.ItemSlot slot, @NotNull org.bukkit.inventory.ItemStack item)
     
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    createPlayerInfoPacket(@NotNull com.github.juliarn.npclib.api.protocol.enums.PlayerInfoAction action)
     
    @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    createRotationPacket(float yaw, float pitch)
     
    void
    initialize(@NotNull com.github.juliarn.npclib.api.Platform<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> platform)
     
    private static @NotNull com.github.retrooper.packetevents.protocol.world.Location
    npcLocation(@NotNull com.github.juliarn.npclib.api.Npc<?,?,?,?> npc)
     
    private static @NotNull com.github.retrooper.packetevents.protocol.world.Location
    npcLocation(@NotNull com.github.juliarn.npclib.api.Npc<?,?,?,?> npc, float yaw, float pitch)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INSTANCE

      static final PacketEventsPacketAdapter INSTANCE
    • PACKET_EVENTS_SETTINGS

      private static final com.github.retrooper.packetevents.settings.PacketEventsSettings PACKET_EVENTS_SETTINGS
    • OPTIONAL_CHAT_COMPONENT_TYPE

      private static final Type OPTIONAL_CHAT_COMPONENT_TYPE
    • serverVersion

      private com.github.retrooper.packetevents.manager.server.ServerVersion serverVersion
    • packetPlayerManager

      private com.github.retrooper.packetevents.manager.player.PlayerManager packetPlayerManager
  • Constructor Details

    • PacketEventsPacketAdapter

      PacketEventsPacketAdapter()
  • Method Details

    • npcLocation

      @NotNull private static @NotNull com.github.retrooper.packetevents.protocol.world.Location npcLocation(@NotNull @NotNull com.github.juliarn.npclib.api.Npc<?,?,?,?> npc)
    • npcLocation

      @NotNull private static @NotNull com.github.retrooper.packetevents.protocol.world.Location npcLocation(@NotNull @NotNull com.github.juliarn.npclib.api.Npc<?,?,?,?> npc, float yaw, float pitch)
    • createEntityData

      @NotNull private static @NotNull com.github.retrooper.packetevents.protocol.entity.data.EntityData createEntityData(int index, @NotNull @NotNull Type type, @NotNull @NotNull Object value, @NotNull @NotNull com.github.juliarn.npclib.api.PlatformVersionAccessor versionAccessor)
    • createEntitySpawnPacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createEntitySpawnPacket()
      Specified by:
      createEntitySpawnPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createEntityRemovePacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createEntityRemovePacket()
      Specified by:
      createEntityRemovePacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createPlayerInfoPacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createPlayerInfoPacket(@NotNull @NotNull com.github.juliarn.npclib.api.protocol.enums.PlayerInfoAction action)
      Specified by:
      createPlayerInfoPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createRotationPacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createRotationPacket(float yaw, float pitch)
      Specified by:
      createRotationPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createAnimationPacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createAnimationPacket(@NotNull @NotNull com.github.juliarn.npclib.api.protocol.enums.EntityAnimation animation)
      Specified by:
      createAnimationPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createEquipmentPacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createEquipmentPacket(@NotNull @NotNull com.github.juliarn.npclib.api.protocol.enums.ItemSlot slot, @NotNull @NotNull org.bukkit.inventory.ItemStack item)
      Specified by:
      createEquipmentPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createCustomPayloadPacket

      @NotNull public @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createCustomPayloadPacket(@NotNull @NotNull String channelId, byte[] payload)
      Specified by:
      createCustomPayloadPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • createEntityMetaPacket

      @NotNull public <T, O> @NotNull com.github.juliarn.npclib.api.protocol.OutboundPacket<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> createEntityMetaPacket(@NotNull @NotNull com.github.juliarn.npclib.api.protocol.meta.EntityMetadataFactory<T,O> metadata, @NotNull T value)
      Specified by:
      createEntityMetaPacket in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
    • initialize

      public void initialize(@NotNull @NotNull com.github.juliarn.npclib.api.Platform<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> platform)
      Specified by:
      initialize in interface com.github.juliarn.npclib.api.protocol.PlatformPacketAdapter<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>