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

public class LegacyBungeeBehavior extends AbstractPortalBehavior
  • 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

      @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

    • assignPortal

      public void assignPortal(@NotNull @NotNull RealPortal portal)
      Description copied from interface: PortalBehavior
      Assign this behavior to a portal
      Specified by:
      assignPortal in interface PortalBehavior
      Overrides:
      assignPortal in class AbstractPortalBehavior
      Parameters:
      portal -

      The portal to assign this behavior to