Class AnchorManager
- java.lang.Object
-
- com.onarandombox.MultiverseCore.utils.AnchorManager
-
public class AnchorManager extends java.lang.ObjectManages anchors.
-
-
Constructor Summary
Constructors Constructor Description AnchorManager(MultiverseCore plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteAnchor(java.lang.String s)Deletes the specified anchor.java.util.Set<java.lang.String>getAllAnchors()Gets all anchors.org.bukkit.LocationgetAnchorLocation(java.lang.String anchor)Gets theLocationassociated with an anchor.java.util.Set<java.lang.String>getAnchors(org.bukkit.entity.Player p)Gets all anchors that the specifiedPlayercan access.voidloadAnchors()Loads all anchors.booleansaveAnchorLocation(java.lang.String anchor, java.lang.String location)Saves an anchor.booleansaveAnchorLocation(java.lang.String anchor, org.bukkit.Location l)Saves an anchor.booleansaveAnchors()Saves all anchors.
-
-
-
Constructor Detail
-
AnchorManager
public AnchorManager(MultiverseCore plugin)
-
-
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 theLocationassociated 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- TheLocationof 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
Setcontaining all anchors.
-
getAnchors
public java.util.Set<java.lang.String> getAnchors(org.bukkit.entity.Player p)
Gets all anchors that the specifiedPlayercan access.- Parameters:
p- ThePlayer.- Returns:
- An unmodifiable
Setcontaining all anchors the specifiedPlayercan 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.
-
-