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

public class FixedBehavior extends AbstractPortalBehavior
  • Constructor Details

    • FixedBehavior

      public FixedBehavior(LanguageManager languageManager, @NotNull @NotNull String destinationName)
      Parameters:
      languageManager -

      Any language manager able to get translations

      destinationName -

      The name of the destination 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

      @Nullable public @Nullable Portal getDestination()
      Returns:
      The destination portal this behavior points to
    • 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

    • 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