Class MVPortal

java.lang.Object
org.mvplugins.multiverse.portals.MVPortal

public final class MVPortal extends Object
  • Field Details

    • PORTAL_NAME_PATTERN

      public static final Pattern PORTAL_NAME_PATTERN
  • Constructor Details

  • Method Details

    • isPortalInterior

      public static boolean isPortalInterior(org.bukkit.Material material)
    • loadMVPortalFromConfig

      public static MVPortal loadMVPortalFromConfig(MultiversePortals instance, String name)
    • getName

      public String getName()
      Returns:
    • getStringPropertyHandle

      @AvailableSince("5.1") public org.mvplugins.multiverse.core.config.handle.StringPropertyHandle getStringPropertyHandle()
      Gets the string property handle
      Returns:
      The string property handle
      Since:
      5.1
    • setOwner

      @AvailableSince("5.1") public boolean setOwner(String owner)
      Parameters:
      owner -
      Returns:
      Since:
      5.1
    • getOwner

      @AvailableSince("5.1") public String getOwner()
      Returns:
      Since:
      5.1
    • setTeleportNonPlayers

      @AvailableSince("5.1") public void setTeleportNonPlayers(boolean teleportNonPlayers)
      Set the value of teleportNonPlayers
      Parameters:
      teleportNonPlayers - The new value
    • getTeleportNonPlayers

      public boolean getTeleportNonPlayers()
    • useSafeTeleporter

      public boolean useSafeTeleporter()
    • getCurrency

      public org.bukkit.Material getCurrency()
    • getPrice

      public double getPrice()
    • setPortalLocation

      @AvailableSince("5.1") public boolean setPortalLocation(String locationString)
      Parameters:
      locationString -
      Returns:
      Since:
      5.1
    • setPortalLocation

      public boolean setPortalLocation(String locationString, String worldString)
    • setPortalLocation

      public boolean setPortalLocation(String locationString, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world)
    • setPortalLocation

      public boolean setPortalLocation(PortalLocation location)
    • getPortalLocation

      public PortalLocation getPortalLocation()
    • setActionType

      @AvailableSince("5.2") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionType(@NotNull @NotNull ActionHandlerType<?,?> actionType)
    • setActionType

      @AvailableSince("5.2") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionType(String actionType)
    • getActionType

      @AvailableSince("5.2") public String getActionType()
    • setAction

      @AvailableSince("5.2") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setAction(String action)
    • getAction

      @AvailableSince("5.2") public String getAction()
    • setActionHandler

      @AvailableSince("5.2") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionHandler(@NotNull @NotNull ActionHandler<?,?> action)
    • getActionHandler

      @AvailableSince("5.2") @NotNull public @NotNull org.mvplugins.multiverse.core.utils.result.Attempt<? extends ActionHandler<?,?>,ActionFailureReason> getActionHandler()
    • getActionHandler

      @AvailableSince("5.2") @NotNull public @NotNull org.mvplugins.multiverse.core.utils.result.Attempt<? extends ActionHandler<?,?>,ActionFailureReason> getActionHandler(@NotNull @NotNull org.bukkit.command.CommandSender sender)
    • runActionFor

      @AvailableSince("5.2") @NotNull public @NotNull org.mvplugins.multiverse.core.utils.result.Attempt<Void,ActionFailureReason> runActionFor(org.bukkit.entity.Entity entity)
    • setCheckDestinationSafety

      @AvailableSince("5.1") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setCheckDestinationSafety(boolean checkDestinationSafety)
      Parameters:
      checkDestinationSafety -
      Returns:
      Since:
      5.1
    • getCheckDestinationSafety

      @AvailableSince("5.1") public boolean getCheckDestinationSafety()
      Returns:
      Since:
      5.1
    • getSafePlayerSpawnLocation

      public org.bukkit.Location getSafePlayerSpawnLocation()
    • getFillMaterial

      public org.bukkit.Material getFillMaterial() throws IllegalStateException
      Gets the Material that fills this portal. Specifically, this gets the Material at the center of the portal.
      Returns:
      The Material that fills this portal.
      Throws:
      IllegalStateException - If this portal's location is no longer valid.
    • getPortalType

      public PortalType getPortalType() throws IllegalStateException
      Returns what type of portal this is. This will be PortalType.Normal for portals filled with the nether portal block, and PortalType.Legacy for portals filled with anything else.
      Returns:
      The type of this portal.
      Throws:
      IllegalStateException - If this portal's location is no longer valid.
    • isLegacyPortal

      public boolean isLegacyPortal() throws IllegalStateException
      Returns whether this portal is of the PortalType.Legacy type.
      Returns:
      True if and only if this portal is of the PortalType.Legacy type, false otherwise.
      Throws:
      IllegalStateException - If this portal's location is no longer valid.
    • playerCanEnterPortal

      public boolean playerCanEnterPortal(org.bukkit.entity.Player player)
    • playerCanFillPortal

      public boolean playerCanFillPortal(org.bukkit.entity.Player player)
    • getWorld

      @Nullable public @Nullable org.bukkit.World getWorld()
    • getPermission

      public org.bukkit.permissions.Permission getPermission()
    • getFillPermission

      public org.bukkit.permissions.Permission getFillPermission()
    • getExempt

      public org.bukkit.permissions.Permission getExempt()
    • removePermission

      public void removePermission()
    • isFrameValid

      public boolean isFrameValid(org.bukkit.Location l)
      Determines whether a point within the portal has a valid frame around it.
      Parameters:
      l - the location
      Returns:
      true if the frame around the location is valid; false otherwise
    • setProperty

      @Deprecated(since="5.1", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public boolean setProperty(String property, String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getHandlerScript

      @Deprecated(since="5.1", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public String getHandlerScript()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Busscript feature has been removed.
    • setHandlerScript

      @Deprecated(since="5.1", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public void setHandlerScript(String handlerScript)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Busscript feature has been removed.
    • isExempt

      @Deprecated(since="5.1", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public boolean isExempt(org.bukkit.entity.Player player)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This feature has been removed.
    • getLocation

      @Deprecated(forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public PortalLocation getLocation()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getPortalLocation() instead.
    • setDestination

      @Deprecated(since="5.2", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public boolean setDestination(String destinationString)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Portals now have new types of action. Hence, the portal's destination (now called action) may not always be a multiverse destination. It can be a command or server name as well. Please see getActionHandler() instead.
    • setDestination

      @Deprecated(since="5.2", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public boolean setDestination(org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> newDestination)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Portals now have new types of action. Hence, the portal's destination (now called action) may not always be a multiverse destination. For example, it can be a command or server name as well. Please see getActionHandler() instead.
    • getDestination

      @Deprecated(since="5.2", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") @Nullable public @Nullable org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> getDestination()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Portals now have new types of action. Hence, the portal's destination (now called action) may not always be a multiverse destination. For example, it can be a command or server name as well. Please see getActionHandler() instead.