Class LegacyBungeeBehavior
java.lang.Object
org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior
org.sgrewritten.stargate.api.network.portal.behavior.LegacyBungeeBehavior
- All Implemented Interfaces:
PortalBehavior
-
Field Summary
Fields inherited from class org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior
languageManager, portal -
Constructor Summary
ConstructorsConstructorDescriptionLegacyBungeeBehavior(LanguageManager languageManager, String destination, String destinationServer) -
Method Summary
Modifier and TypeMethodDescriptionvoidassignPortal(@NotNull RealPortal portal) Assign this behavior to a portal@NotNull StargateFlag@Nullable Portal@NotNull LineData @NotNull []getLines()voidupdate()This method will be triggered whenever the portal deems it reasonable to update itself.Methods inherited from class org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior
getDestinationName, onButtonClick, onDestroy, onSignClick
-
Constructor Details
-
LegacyBungeeBehavior
public LegacyBungeeBehavior(LanguageManager languageManager, String destination, String destinationServer) throws BungeeNameException - Parameters:
languageManager-Any language manager able to provide translations
destination-The destination portal on the other server
destinationServer-The destination server
- Throws:
BungeeNameException-If information is lacking to determine a destination server and portal
-
-
Method Details
-
update
public void update()Description copied from interface:PortalBehaviorThis method will be triggered whenever the portal deems it reasonable to update itself. Can be triggered from multiple causes, for example a portal gets destroyed in the network. -
getDestination
- Returns:
- The destination portal this behavior points to
-
getLines
- Returns:
The sign lines that should be drawn by any portal with this behavior
-
getAttachedFlag
- Returns:
The
PortalFlagthis behavior relates to
-
assignPortal
Description copied from interface:PortalBehaviorAssign this behavior to a portal- Specified by:
assignPortalin interfacePortalBehavior- Overrides:
assignPortalin classAbstractPortalBehavior- Parameters:
portal-The portal to assign this behavior to
-