Interface PacketProvider


public interface PacketProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clearProperties​(org.bukkit.entity.Player player)
    This method clears every property from the player.
    static void
    refreshPlayer​(org.bukkit.entity.Player player, org.bukkit.plugin.Plugin plugin)
    This method refreshes a player by hiding them and reshowing them to players that have this player in sight.
    default void
    sendPacket​(Object... packet)
    This method sends packets to all servers that are currently logged in to the server.
    void
    sendPacket​(org.bukkit.entity.Player player, Object... packet)
    Sends a specific packet or multiple packets to this player.
    void
    sendServerPackets​(org.bukkit.entity.Player player)
    This method sends all packets that contribute to changing the player properties.
    void
    updateProperties​(org.bukkit.entity.Player player, Skin skin)
    This method applies a certain property to a player.
  • Method Details

    • updateProperties

      void updateProperties(org.bukkit.entity.Player player, @Nonnull Skin skin)
      This method applies a certain property to a player.
      Parameters:
      player - the player that the skin is applied to
      skin - the skin that is being applied
    • clearProperties

      void clearProperties(org.bukkit.entity.Player player)
      This method clears every property from the player. It is equal to just clearing the game profile of the player.
      Parameters:
      player - the player
    • sendPacket

      void sendPacket(org.bukkit.entity.Player player, Object... packet)
      Sends a specific packet or multiple packets to this player.
      Parameters:
      player - the player that the packets are being sent
      packet - the packets that are being sent
    • sendPacket

      default void sendPacket(Object... packet)
      This method sends packets to all servers that are currently logged in to the server.
      Parameters:
      packet - the packets that are sent
    • sendServerPackets

      void sendServerPackets(org.bukkit.entity.Player player)
      This method sends all packets that contribute to changing the player properties.

      The packets that are sent may vary depending on the version.

      Parameters:
      player - the player
    • refreshPlayer

      static void refreshPlayer(org.bukkit.entity.Player player, org.bukkit.plugin.Plugin plugin)
      This method refreshes a player by hiding them and reshowing them to players that have this player in sight.
      Parameters:
      player - the player to reshow
      plugin - the plugin