Interface PlayerUtils


public interface PlayerUtils
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sendMapUpdate(@NotNull org.bukkit.entity.Player player, int mapId, byte scale, boolean locked, @Nullable MapPatch mapPatch, @Nullable List<MapIcon> icons)
    Sends a map update to a Player
    default void
    sendResourcePack(@NotNull org.bukkit.entity.Player player, @NotNull String url, byte[] hash, @Nullable net.md_5.bungee.api.chat.BaseComponent[] prompt, boolean force)
    Sends a resource pack request to a Player
    void
    Stops the advancement listener for a Player
    void
    startAdvancementListening(@NotNull org.bukkit.entity.Player player)
    Starts the advancement listener for a Player
    void
    Stops the advancement listener for a Player
    void
    stopAdvancementListening(@NotNull org.bukkit.entity.Player player)
    Stops the advancement listener for a Player
  • Method Details

    • stopAdvancementListening

      void stopAdvancementListening(@NotNull @NotNull org.bukkit.entity.Player player)
      Stops the advancement listener for a Player
      Parameters:
      player - The Player
    • stopAdvancementListening

      void stopAdvancementListening(@NotNull @NotNull Object player)
      Stops the advancement listener for a Player
      Parameters:
      player - The Player
    • startAdvancementListening

      void startAdvancementListening(@NotNull @NotNull org.bukkit.entity.Player player)
      Starts the advancement listener for a Player
      Parameters:
      player - The Player
    • startAdvancementListening

      void startAdvancementListening(@NotNull @NotNull Object player)
      Stops the advancement listener for a Player
      Parameters:
      player - The Player
    • sendMapUpdate

      void sendMapUpdate(@NotNull @NotNull org.bukkit.entity.Player player, int mapId, byte scale, boolean locked, @Nullable @Nullable MapPatch mapPatch, @Nullable @Nullable List<MapIcon> icons)
      Sends a map update to a Player
      Parameters:
      player - The Player to receive the map update
      mapId - The id of the map to update
      scale - The scale of the map. From 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel)
      locked - If the map has been locked in the cartography table
      mapPatch - The MapPatch to update, can be null
      icons - The new icons to be displayed, can be null
    • sendResourcePack

      default void sendResourcePack(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String url, byte[] hash, @Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] prompt, boolean force)
      Sends a resource pack request to a Player
      Parameters:
      player - The Player to receive the resource pack request
      url - The URL of the resource pack
      hash - The SHA1 hash of the resource pack
      prompt - The prompt message to be displayed (since 1.17)
      force - If the Player should be forced to download the resource pack (since 1.17)