Class RandomBehavior
java.lang.Object
org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior
org.sgrewritten.stargate.api.network.portal.behavior.RandomBehavior
- All Implemented Interfaces:
PortalBehavior
-
Field Summary
Fields inherited from class org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior
languageManager, portal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@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
assignPortal, onButtonClick, onDestroy, onSignClick
-
Constructor Details
-
RandomBehavior
- Parameters:
languageManager
-Any language manager able to provide translations
-
-
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
-
getDestinationName
- Specified by:
getDestinationName
in interfacePortalBehavior
- Overrides:
getDestinationName
in classAbstractPortalBehavior
- Returns:
Get the name of the destination this behavior is pointing towards
-
getLines
- Returns:
The sign lines that should be drawn by any portal with this behavior
-
getAttachedFlag
- Returns:
The
PortalFlag
this behavior relates to
-