Class PortalManager
java.lang.Object
org.mvplugins.multiverse.portals.utils.PortalManager
Manages all portals for all worlds.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPortal(org.mvplugins.multiverse.core.world.MultiverseWorld world, String name, String owner, PortalLocation location) booleanGets a portal with a commandsender and a name.getPortal(org.bukkit.entity.Player sender, org.bukkit.Location l) Method that checks to see if a player is inside a portal that they have permission to use.getPortal(org.bukkit.entity.Player sender, org.bukkit.Location l, boolean checkPermission) Method that checks to see if a player is inside a portal and optionally ensure they have permission to use.getPortal(org.bukkit.Location l) Return a portal at a location.getPortals(org.bukkit.command.CommandSender sender) getPortals(org.bukkit.command.CommandSender sender, org.mvplugins.multiverse.core.world.MultiverseWorld world) booleanisPortal(org.bukkit.entity.Player sender, org.bukkit.Location l) Deprecated.booleanisPortal(org.bukkit.Location l) Simplified method for seeing if someone is in a portal.voidremoveAll(boolean removeFromConfigs) removePortal(String portalName, boolean removeFromConfigs)
-
Method Details
-
getPortal
Method that checks to see if a player is inside a portal that they have permission to use.- Parameters:
sender- The sender to check.l- The location they're standing.- Returns:
- A MVPortal if it's valid, null if not.
-
getPortal
public MVPortal getPortal(org.bukkit.entity.Player sender, org.bukkit.Location l, boolean checkPermission) Method that checks to see if a player is inside a portal and optionally ensure they have permission to use.- Parameters:
sender- The sender to check.l- The location they're standing.checkPermission- TheMVPortalis returned only if player has permission to access it.- Returns:
- A MVPortal if it's valid, null if not.
-
isPortal
Deprecated.Deprecated, use getPortal instead. -
isPortal
public boolean isPortal(org.bukkit.Location l) Simplified method for seeing if someone is in a portal. We'll check perms later.- Parameters:
l- The location of the player- Returns:
- True if it is a valid portal location.
-
getPortal
Return a portal at a location. NOTE: If there are more than one portal, order is effectively indeterminate.- Parameters:
l- The location to check at- Returns:
- Null if no portal found, otherwise the MVPortal at that location.
-
addPortal
-
addPortal
public boolean addPortal(org.mvplugins.multiverse.core.world.MultiverseWorld world, String name, String owner, PortalLocation location) -
removePortal
-
getAllPortals
-
getPortals
-
getPortals
-
getPortal
-
getPortal
Gets a portal with a commandsender and a name. Used as a convenience for portal listing methods- Parameters:
portalName-sender-- Returns:
-
isPortal
-
removeAll
public void removeAll(boolean removeFromConfigs)
-