Class AnchorManager


  • public class AnchorManager
    extends java.lang.Object
    Manages anchors.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean deleteAnchor​(java.lang.String s)
      Deletes the specified anchor.
      java.util.Set<java.lang.String> getAllAnchors()
      Gets all anchors.
      org.bukkit.Location getAnchorLocation​(java.lang.String anchor)
      Gets the Location associated with an anchor.
      java.util.Set<java.lang.String> getAnchors​(org.bukkit.entity.Player p)
      Gets all anchors that the specified Player can access.
      void loadAnchors()
      Loads all anchors.
      boolean saveAnchorLocation​(java.lang.String anchor, java.lang.String location)
      Saves an anchor.
      boolean saveAnchorLocation​(java.lang.String anchor, org.bukkit.Location l)
      Saves an anchor.
      boolean saveAnchors()
      Saves all anchors.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • loadAnchors

        public void loadAnchors()
        Loads all anchors.
      • saveAnchors

        public boolean saveAnchors()
        Saves all anchors.
        Returns:
        True if all anchors were successfully saved.
      • getAnchorLocation

        public org.bukkit.Location getAnchorLocation​(java.lang.String anchor)
        Gets the Location associated with an anchor.
        Parameters:
        anchor - The name of the anchor.
        Returns:
        The Location.
      • saveAnchorLocation

        public boolean saveAnchorLocation​(java.lang.String anchor,
                                          java.lang.String location)
        Saves an anchor.
        Parameters:
        anchor - The name of the anchor.
        location - The location of the anchor as string.
        Returns:
        True if the anchor was successfully saved.
      • saveAnchorLocation

        public boolean saveAnchorLocation​(java.lang.String anchor,
                                          org.bukkit.Location l)
        Saves an anchor.
        Parameters:
        anchor - The name of the anchor.
        l - The Location of the anchor.
        Returns:
        True if the anchor was successfully saved.
      • getAllAnchors

        public java.util.Set<java.lang.String> getAllAnchors()
        Gets all anchors.
        Returns:
        An unmodifiable Set containing all anchors.
      • getAnchors

        public java.util.Set<java.lang.String> getAnchors​(org.bukkit.entity.Player p)
        Gets all anchors that the specified Player can access.
        Parameters:
        p - The Player.
        Returns:
        An unmodifiable Set containing all anchors the specified Player can access.
      • deleteAnchor

        public boolean deleteAnchor​(java.lang.String s)
        Deletes the specified anchor.
        Parameters:
        s - The name of the anchor.
        Returns:
        True if the anchor was successfully deleted.