Package org.mvplugins.multiverse.portals
Class MVPortal
java.lang.Object
org.mvplugins.multiverse.portals.MVPortal
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMVPortal(org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world, MultiversePortals instance, String name, String owner, String location) MVPortal(MultiversePortals plugin, String name, String owner, PortalLocation location) -
Method Summary
Modifier and TypeMethodDescription@NotNull org.mvplugins.multiverse.core.utils.result.Attempt<? extends ActionHandler<?, ?>, ActionFailureReason> @NotNull org.mvplugins.multiverse.core.utils.result.Attempt<? extends ActionHandler<?, ?>, ActionFailureReason> getActionHandler(@NotNull org.bukkit.command.CommandSender sender) booleanorg.bukkit.Material@Nullable org.mvplugins.multiverse.core.destination.DestinationInstance<?, ?> Deprecated, for removal: This API element is subject to removal in a future version.Portals now have new types of action.org.bukkit.permissions.Permissionorg.bukkit.MaterialGets the Material that fills this portal.org.bukkit.permissions.PermissionDeprecated, for removal: This API element is subject to removal in a future version.Busscript feature has been removed.Deprecated, for removal: This API element is subject to removal in a future version.UsegetPortalLocation()instead.getName()getOwner()org.bukkit.permissions.PermissionReturns what type of portal this is.doublegetPrice()org.bukkit.Locationorg.mvplugins.multiverse.core.config.handle.StringPropertyHandleGets the string property handleboolean@Nullable org.bukkit.WorldgetWorld()booleanisExempt(org.bukkit.entity.Player player) Deprecated, for removal: This API element is subject to removal in a future version.This feature has been removed.booleanisFrameValid(org.bukkit.Location l) Determines whether a point within the portal has a valid frame around it.booleanReturns whether this portal is of thePortalType.Legacytype.static booleanisPortalInterior(org.bukkit.Material material) static MVPortalloadMVPortalFromConfig(MultiversePortals instance, String name) booleanplayerCanEnterPortal(org.bukkit.entity.Player player) booleanplayerCanFillPortal(org.bukkit.entity.Player player) void@NotNull org.mvplugins.multiverse.core.utils.result.Attempt<Void, ActionFailureReason> runActionFor(org.bukkit.entity.Entity entity) org.mvplugins.multiverse.external.vavr.control.Try<Void> org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionHandler(@NotNull ActionHandler<?, ?> action) org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionType(String actionType) org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionType(@NotNull ActionHandlerType<?, ?> actionType) org.mvplugins.multiverse.external.vavr.control.Try<Void> setCheckDestinationSafety(boolean checkDestinationSafety) booleansetDestination(String destinationString) Deprecated, for removal: This API element is subject to removal in a future version.Portals now have new types of action.booleansetDestination(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.voidsetHandlerScript(String handlerScript) Deprecated, for removal: This API element is subject to removal in a future version.Busscript feature has been removed.booleanbooleansetPortalLocation(String locationString) booleansetPortalLocation(String locationString, String worldString) booleansetPortalLocation(String locationString, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world) booleansetPortalLocation(PortalLocation location) booleansetProperty(String property, String value) Deprecated, for removal: This API element is subject to removal in a future version.UsegetStringPropertyHandle()instead.voidsetTeleportNonPlayers(boolean teleportNonPlayers) Set the value of teleportNonPlayersboolean
-
Field Details
-
PORTAL_NAME_PATTERN
-
-
Constructor Details
-
MVPortal
public MVPortal(org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world, MultiversePortals instance, String name, String owner, String location) -
MVPortal
-
-
Method Details
-
isPortalInterior
public static boolean isPortalInterior(org.bukkit.Material material) -
loadMVPortalFromConfig
-
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
- Parameters:
owner-- Returns:
- Since:
- 5.1
-
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
- Parameters:
locationString-- Returns:
- Since:
- 5.1
-
setPortalLocation
-
setPortalLocation
public boolean setPortalLocation(String locationString, org.mvplugins.multiverse.core.world.LoadedMultiverseWorld world) -
setPortalLocation
-
getPortalLocation
-
setActionType
@AvailableSince("5.2") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setActionType(@NotNull @NotNull ActionHandlerType<?, ?> actionType) -
setActionType
-
getActionType
-
setAction
-
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<?,?>, getActionHandler()ActionFailureReason> -
getActionHandler
@AvailableSince("5.2") @NotNull public @NotNull org.mvplugins.multiverse.core.utils.result.Attempt<? extends ActionHandler<?,?>, getActionHandlerActionFailureReason> (@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
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
Returns what type of portal this is. This will bePortalType.Normalfor portals filled with the nether portal block, andPortalType.Legacyfor portals filled with anything else.- Returns:
- The type of this portal.
- Throws:
IllegalStateException- If this portal's location is no longer valid.
-
isLegacyPortal
Returns whether this portal is of thePortalType.Legacytype.- Returns:
- True if and only if this portal is of the
PortalType.Legacytype, 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.UsegetStringPropertyHandle()instead. -
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.UsegetPortalLocation()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 seegetActionHandler()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 seegetActionHandler()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 seegetActionHandler()instead.
-