Package de.studiocode.invui.resourcepack
Class ForceResourcePack
java.lang.Object
de.studiocode.invui.resourcepack.ForceResourcePack
- All Implemented Interfaces:
org.bukkit.event.Listener
Forces
Players to use a custom ResourcePack and kicks them if they don't accept it.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ForceResourcePackvoidsendResourcePack(org.bukkit.entity.Player player) voidsetResourcePack(@Nullable String resourcePackUrl, @Nullable net.md_5.bungee.api.chat.BaseComponent[] prompt) Sets the URL String for the custom ResourcePack everyPlayeris required to download.voidsetResourcePack(@Nullable String resourcePackUrl, @Nullable net.md_5.bungee.api.chat.BaseComponent[] prompt, boolean sendToOnlinePlayers) Sets the URL String for the custom ResourcePack everyPlayeris required to download.
-
Field Details
-
RESOURCE_PACK_URL
-
-
Method Details
-
getInstance
-
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 everyPlayeris required to download. Can be set to null to stop forcing the Resource Pack.- Parameters:
resourcePackUrl- The ResourcePack URL Stringprompt- 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 everyPlayeris required to download. Can be set to null to stop forcing the Resource Pack.- Parameters:
resourcePackUrl- The ResourcePack URL Stringprompt- 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)
-