Class Config


  • public class Config
    extends java.lang.Object
    Bot Config. Contains all global settings of the Bot
    • Constructor Summary

      Constructors 
      Constructor Description
      Config()
      DO NOT USE: this is a static class (but gradle wants this comment)
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void fromArgs​(java.lang.String[] args)
      Initializes the static Class Config.
      static java.lang.String getModeName()
      Gathers the Api name of the current Bot gamemode.
      static int getTimeoutLimit()
      Getter for timeoutLimit.
      static boolean isTimed()
      Getter of startupTimed
      static java.lang.Class<? extends Bot> loadClazzByName​(java.lang.String clazzName, java.lang.Class<? extends Bot> type)
      Loads ClassReferenz by name/file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Config

        public Config()
        DO NOT USE: this is a static class (but gradle wants this comment)
    • Method Detail

      • getModeName

        public static java.lang.String getModeName()
        Gathers the Api name of the current Bot gamemode.
        Returns:
        mode String
      • fromArgs

        public static void fromArgs​(java.lang.String[] args)
        Initializes the static Class Config. - Loads Bot Class
        Parameters:
        args - cmd args
      • loadClazzByName

        public static java.lang.Class<? extends Bot> loadClazzByName​(java.lang.String clazzName,
                                                                     java.lang.Class<? extends Bot> type)
                                                              throws java.lang.InstantiationException,
                                                                     java.lang.IllegalAccessException,
                                                                     java.lang.IllegalArgumentException,
                                                                     java.lang.reflect.InvocationTargetException,
                                                                     java.lang.NoSuchMethodException,
                                                                     java.lang.SecurityException,
                                                                     java.lang.ClassNotFoundException,
                                                                     java.io.IOException
        Loads ClassReferenz by name/file.
        Parameters:
        clazzName - name / file
        type - Enforced type by loader
        Returns:
        Class of the bot
        Throws:
        java.lang.InstantiationException - will get thrown on class loading error
        java.lang.IllegalAccessException - will get thrown on class loading error
        java.lang.IllegalArgumentException - will get thrown on class loading error
        java.lang.reflect.InvocationTargetException - will get thrown on class loading error
        java.lang.NoSuchMethodException - will get thrown on class loading error
        java.lang.SecurityException - will get thrown on class loading error
        java.lang.ClassNotFoundException - will get thrown on class loading error
        java.io.IOException - will get thrown on class loading error
      • getTimeoutLimit

        public static int getTimeoutLimit()
        Getter for timeoutLimit.
        Returns:
        value of timeoutLimit
      • isTimed

        public static boolean isTimed()
        Getter of startupTimed
        Returns:
        is timed