Class PacketIO

java.lang.Object
com.github.darksoulq.abyssallib.server.packet.PacketIO

public final class PacketIO extends Object
Utility for low-level packet transmission to clients.

This class bypasses the standard Bukkit API to send raw NMS packets directly via the player's network connection.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    broadcast(net.minecraft.network.protocol.Packet<?> packet)
    Broadcasts a packet to every player currently online.
    static void
    send(Iterable<org.bukkit.entity.Player> players, net.minecraft.network.protocol.Packet<?> packet)
    Sends a packet to multiple players.
    static void
    send(org.bukkit.entity.Player player, net.minecraft.network.protocol.Packet<?> packet)
    Sends a single NMS packet to a specific player.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PacketIO

      public PacketIO()
  • Method Details

    • send

      public static void send(org.bukkit.entity.Player player, net.minecraft.network.protocol.Packet<?> packet)
      Sends a single NMS packet to a specific player.
      Parameters:
      player - The recipient player.
      packet - The Packet instance to send.
    • send

      public static void send(Iterable<org.bukkit.entity.Player> players, net.minecraft.network.protocol.Packet<?> packet)
      Sends a packet to multiple players.
      Parameters:
      players - An iterable collection of players.
      packet - The packet to distribute.
    • broadcast

      public static void broadcast(net.minecraft.network.protocol.Packet<?> packet)
      Broadcasts a packet to every player currently online.
      Parameters:
      packet - The packet to broadcast.