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
ConstructorDescriptionLegacyBungeeBehavior
(LanguageManager languageManager, String destination, String destinationServer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignPortal
(@NotNull RealPortal portal) Assign this behavior to a portal@NotNull StargateFlag
@Nullable Portal
@NotNull LineData @NotNull []
getLines()
void
update()
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:PortalBehavior
This 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
PortalFlag
this behavior relates to
-
assignPortal
Description copied from interface:PortalBehavior
Assign this behavior to a portal- Specified by:
assignPortal
in interfacePortalBehavior
- Overrides:
assignPortal
in classAbstractPortalBehavior
- Parameters:
portal
-The portal to assign this behavior to
-