Class ResizableEvent

java.lang.Object
net.storm.sdk.script.blocking_events.BlockingEvent
net.storm.sdk.script.blocking_events.ResizableEvent

public class ResizableEvent extends BlockingEvent
A blocking event that handles switching the client to fixed/resizable mode.

This event ensures the client is set to the appropriate windowed mode when logged in. If the windowed mode is not set to 1 (fixed mode), it will attempt to change it.

Note: This event only activates when the player is logged in (LOGGED_IN state).

See Also:
  • Constructor Details

    • ResizableEvent

      public ResizableEvent()
  • Method Details

    • validate

      public boolean validate()
      Validates whether the resizable event should be active.

      The event is valid when the player is logged in and the windowed mode is not set to 1 (fixed mode).

      Specified by:
      validate in class BlockingEvent
      Returns:
      true if the windowed mode needs to be changed, false otherwise
    • loop

      public int loop()
      Executes the resizable event logic by setting the windowed mode.

      If the windowed mode is not 1, it will be set to 0 to trigger a mode change.

      Specified by:
      loop in class BlockingEvent
      Returns:
      sleep duration of 1000 milliseconds