Class PaperResourcesManager

java.lang.Object
computer.livingroom.paperesources.PaperResourcesManager

public class PaperResourcesManager extends Object
  • Constructor Details

    • PaperResourcesManager

      public PaperResourcesManager(PaperResources instance)
  • Method Details

    • addResourcePack

      public void addResourcePack(String url, int index, boolean rebuild, boolean resendResources)
      This will cause the plugin to load any changes in the resource file (if any) and save your pack to whatever index you indicate.
      Parameters:
      url - String of url that points towards the pack file
      index - Priority of the pack or Index within the resource file (index 0 will always load first)
    • removeResourcePack

      public boolean removeResourcePack(String url, boolean rebuild, boolean resendResources)
    • getURLStrings

      public List<String> getURLStrings() throws IOException
      Returns:
      Returns the urls from the resource file.
      Throws:
      IOException
    • isRequestValid

      public boolean isRequestValid()
      Returns:
      Whether the current resource request is valid and is not empty.
    • sendRequestToPlayer

      public void sendRequestToPlayer(org.bukkit.entity.Player player)
      Sends specified player the resource packs generated. Request validation is already done.
      Parameters:
      player - Player to send resource packs to.
    • reloadResources

      public void reloadResources(boolean sendNewResources)
      Reloads the resource packs from the resource file.
      Parameters:
      sendNewResources - Whether to resend the resource packs to all players or wait (usually until they relog)