Class PortalManager

java.lang.Object
org.mvplugins.multiverse.portals.utils.PortalManager

@Service public class PortalManager extends Object
Manages all portals for all worlds.
  • Method Details

    • getPortal

      public MVPortal 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.
      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 - The MVPortal is returned only if player has permission to access it.
      Returns:
      A MVPortal if it's valid, null if not.
    • isPortal

      @Deprecated public MVPortal isPortal(org.bukkit.entity.Player sender, org.bukkit.Location l)
      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

      public MVPortal getPortal(org.bukkit.Location l)
      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

      public boolean addPortal(MVPortal portal)
    • addPortal

      public boolean addPortal(org.mvplugins.multiverse.core.world.MultiverseWorld world, String name, String owner, PortalLocation location)
    • removePortal

      public MVPortal removePortal(String portalName, boolean removeFromConfigs)
    • getAllPortals

      public List<MVPortal> getAllPortals()
    • getPortals

      public List<MVPortal> getPortals(org.bukkit.command.CommandSender sender)
    • getPortals

      public List<MVPortal> getPortals(org.bukkit.command.CommandSender sender, org.mvplugins.multiverse.core.world.MultiverseWorld world)
    • getPortal

      public MVPortal getPortal(String portalName)
    • getPortal

      public MVPortal getPortal(String portalName, org.bukkit.command.CommandSender sender)
      Gets a portal with a commandsender and a name. Used as a convenience for portal listing methods
      Parameters:
      portalName -
      sender -
      Returns:
    • isPortal

      public boolean isPortal(String portalName)
    • removeAll

      public void removeAll(boolean removeFromConfigs)