Class ForceResourcePack

java.lang.Object
de.studiocode.invui.resourcepack.ForceResourcePack
All Implemented Interfaces:
org.bukkit.event.Listener

public class ForceResourcePack extends Object implements org.bukkit.event.Listener
Forces Players to use a custom ResourcePack and kicks them if they don't accept it.
  • Field Details

    • RESOURCE_PACK_URL

      public static final String RESOURCE_PACK_URL
  • Method Details

    • getInstance

      public static ForceResourcePack getInstance()
    • getResourcePackUrl

      public String getResourcePackUrl()
    • setResourcePack

      public void setResourcePack(@Nullable @Nullable String resourcePackUrl, @Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] prompt)
      Sets the URL String for the custom ResourcePack every Player is required to download. Can be set to null to stop forcing the Resource Pack.
      Parameters:
      resourcePackUrl - The ResourcePack URL String
      prompt - The prompt to be displayed (since 1.17)
    • setResourcePack

      public void setResourcePack(@Nullable @Nullable String resourcePackUrl, @Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] prompt, boolean sendToOnlinePlayers)
      Sets the URL String for the custom ResourcePack every Player is required to download. Can be set to null to stop forcing the Resource Pack.
      Parameters:
      resourcePackUrl - The ResourcePack URL String
      prompt - The prompt to be displayed (since 1.17)
      sendToOnlinePlayers - If the resource pack should also be sent to all currently online players
    • sendResourcePack

      public void sendResourcePack(org.bukkit.entity.Player player)