Class ResourcePack

java.lang.Object
net.minestom.server.resourcepack.ResourcePack

public class ResourcePack
extends java.lang.Object
Represents a resource pack which can be sent with Player.setResourcePack(ResourcePack).
  • Constructor Summary

    Constructors 
    Constructor Description
    ResourcePack​(java.lang.String url, java.lang.String hash)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getHash()
    Gets the resource pack hash.
    java.lang.String getUrl()
    Gets the resource pack URL.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResourcePack

      public ResourcePack​(@NotNull java.lang.String url, @Nullable java.lang.String hash)
  • Method Details

    • getUrl

      @NotNull public java.lang.String getUrl()
      Gets the resource pack URL.
      Returns:
      the resource pack URL
    • getHash

      @NotNull public java.lang.String getHash()
      Gets the resource pack hash.

      WARNING: if null or empty, the player will probably waste bandwidth by re-downloading the resource pack.

      Returns:
      the resource pack hash, can be empty