Class CompassMeta

java.lang.Object
net.minestom.server.item.metadata.CompassMeta
All Implemented Interfaces:
ItemMeta

public class CompassMeta
extends java.lang.Object
implements ItemMeta
  • Constructor Summary

    Constructors 
    Constructor Description
    CompassMeta()  
  • Method Summary

    Modifier and Type Method Description
    ItemMeta copy()
    Copies this item meta.
    java.lang.String getLodestoneDimension()  
    int getX()  
    int getY()  
    int getZ()  
    boolean hasNbt()
    Gets if this meta object contains any useful data to send to the client.
    boolean isLodestoneTracked()  
    boolean isSimilar​(ItemMeta itemMeta)
    Gets if the two ItemMeta are similar.
    void read​(org.jglrxavpok.hephaistos.nbt.NBTCompound compound)
    Reads nbt data from a compound.
    void setLodestoneDimension​(java.lang.String lodestoneDimension)  
    void setLodestoneTracked​(boolean lodestoneTracked)  
    void setX​(int x)  
    void setY​(int y)  
    void setZ​(int z)  
    void write​(org.jglrxavpok.hephaistos.nbt.NBTCompound compound)
    Writes nbt data to a compound.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • isLodestoneTracked

      public boolean isLodestoneTracked()
    • setLodestoneTracked

      public void setLodestoneTracked​(boolean lodestoneTracked)
    • getLodestoneDimension

      public java.lang.String getLodestoneDimension()
    • setLodestoneDimension

      public void setLodestoneDimension​(java.lang.String lodestoneDimension)
    • getX

      public int getX()
    • setX

      public void setX​(int x)
    • getY

      public int getY()
    • setY

      public void setY​(int y)
    • getZ

      public int getZ()
    • setZ

      public void setZ​(int z)
    • hasNbt

      public boolean hasNbt()
      Description copied from interface: ItemMeta
      Gets if this meta object contains any useful data to send to the client.
      Specified by:
      hasNbt in interface ItemMeta
      Returns:
      true if this item has nbt data, false otherwise
    • isSimilar

      public boolean isSimilar​(@NotNull ItemMeta itemMeta)
      Description copied from interface: ItemMeta
      Gets if the two ItemMeta are similar.

      It is used by ItemStack.isSimilar(ItemStack).

      Specified by:
      isSimilar in interface ItemMeta
      Parameters:
      itemMeta - the second item meta to check
      Returns:
      true if the two meta are similar, false otherwise
    • read

      public void read​(@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound compound)
      Description copied from interface: ItemMeta
      Reads nbt data from a compound.

      WARNING: it is possible that it contains no useful data, it has to be checked before getting anything.

      Specified by:
      read in interface ItemMeta
      Parameters:
      compound - the compound containing the data
    • write

      public void write​(@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound compound)
      Description copied from interface: ItemMeta
      Writes nbt data to a compound.
      Specified by:
      write in interface ItemMeta
      Parameters:
      compound - the compound receiving the item meta data
    • copy

      @NotNull public ItemMeta copy()
      Description copied from interface: ItemMeta
      Copies this item meta.

      Used by ItemStack.copy().

      Specified by:
      copy in interface ItemMeta
      Returns:
      the cloned item meta