java.lang.Object
org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior
org.sgrewritten.stargate.api.network.portal.behavior.RandomBehavior
All Implemented Interfaces:
PortalBehavior

public class RandomBehavior extends AbstractPortalBehavior
  • Constructor Details

    • RandomBehavior

      public RandomBehavior(LanguageManager languageManager)
      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

      @Nullable public @Nullable Portal getDestination()
      Returns:
      The destination portal this behavior points to
    • getDestinationName

      public String getDestinationName()
      Specified by:
      getDestinationName in interface PortalBehavior
      Overrides:
      getDestinationName in class AbstractPortalBehavior
      Returns:

      Get the name of the destination this behavior is pointing towards

    • getLines

      @NotNull public @NotNull LineData @NotNull [] getLines()
      Returns:

      The sign lines that should be drawn by any portal with this behavior

    • getAttachedFlag

      @NotNull public @NotNull StargateFlag getAttachedFlag()
      Returns:

      The PortalFlag this behavior relates to