Class Game


  • public class Game
    extends Object
    Provides general game state operations
    • Constructor Detail

      • Game

        public Game()
    • Method Detail

      • getClient

        public static RSClient getClient()
      • getRevision

        public static int getRevision()
      • setClient

        public static void setClient​(RSClient client)
      • setFps

        public static void setFps​(int fps)
      • getTick

        public static int getTick()
      • getRemainingMembershipDays

        public static int getRemainingMembershipDays()
      • isMembershipPresent

        public static boolean isMembershipPresent()
      • logout

        public static boolean logout()
      • logout

        public static boolean logout​(boolean xlog)
      • getAccountType

        public static AccountType getAccountType()
      • queueAction

        public static void queueAction​(MenuAction action)
      • queueAction

        public static void queueAction​(Action action)
      • getState

        public static int getState()
      • isLoggedIn

        public static boolean isLoggedIn()
      • isOnCredentialsScreen

        public static boolean isOnCredentialsScreen()
      • isLoadingRegion

        public static boolean isLoadingRegion()
      • getEngineCycle

        public static int getEngineCycle()
      • getCanvas

        public static Canvas getCanvas()
      • getEventMediator

        public static EventMediator getEventMediator()
      • call

        public static <T> T call​(Callable<T> callable)
        Executes code on the game thread
        Type Parameters:
        T - The return type
        Parameters:
        callable - The task to call
        Returns:
        The value returned from the task, or null
      • callAsync

        public static <T> CompletableFuture<T> callAsync​(Function<RSClient,​T> function)
        Executes code on the game thread
        Type Parameters:
        T - The return type
        Returns:
        The value returned from the task, or null
      • call

        public static void call​(Runnable runnable)
      • getProxy

        public static Proxy getProxy()
      • setProxy

        public static void setProxy​(Proxy proxy)
      • getProxyCredentials

        public static Pair<String,​String> getProxyCredentials()
      • setProxyCredentials

        public static void setProxyCredentials​(Pair<String,​String> proxyCredentials)
      • isVerboseMenuActions

        public static boolean isVerboseMenuActions()
      • setVerboseMenuActions

        public static void setVerboseMenuActions​(boolean verboseMenuActions)