Interface PlayerUtils
public interface PlayerUtils
-
Method Summary
Modifier and TypeMethodDescriptionvoidsendMapUpdate(@NotNull org.bukkit.entity.Player player, int mapId, byte scale, boolean locked, @Nullable MapPatch mapPatch, @Nullable List<MapIcon> icons) Sends a map update to aPlayerdefault voidsendResourcePack(@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 aPlayervoidstartAdvancementListening(@NotNull Object player) Stops the advancement listener for aPlayervoidstartAdvancementListening(@NotNull org.bukkit.entity.Player player) Starts the advancement listener for aPlayervoidstopAdvancementListening(@NotNull Object player) Stops the advancement listener for aPlayervoidstopAdvancementListening(@NotNull org.bukkit.entity.Player player) Stops the advancement listener for aPlayer
-
Method Details
-
stopAdvancementListening
void stopAdvancementListening(@NotNull @NotNull org.bukkit.entity.Player player) Stops the advancement listener for aPlayer- Parameters:
player- ThePlayer
-
stopAdvancementListening
Stops the advancement listener for aPlayer- Parameters:
player- ThePlayer
-
startAdvancementListening
void startAdvancementListening(@NotNull @NotNull org.bukkit.entity.Player player) Starts the advancement listener for aPlayer- Parameters:
player- ThePlayer
-
startAdvancementListening
Stops the advancement listener for aPlayer- Parameters:
player- ThePlayer
-
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 aPlayer- Parameters:
player- ThePlayerto receive the map updatemapId- The id of the map to updatescale- 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 tablemapPatch- TheMapPatchto update, can be nullicons- Thenew iconsto 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 aPlayer- Parameters:
player- ThePlayerto receive the resource pack requesturl- The URL of the resource packhash- The SHA1 hash of the resource packprompt- The prompt message to be displayed (since 1.17)force- If thePlayershould be forced to download the resource pack (since 1.17)
-