Class Config
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.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 startupTimedstatic java.lang.Class<? extends Bot>
loadClazzByName(java.lang.String clazzName, java.lang.Class<? extends Bot> type)
Loads ClassReferenz by name/file.
-
-
-
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 / filetype
- Enforced type by loader- Returns:
- Class of the bot
- Throws:
java.lang.InstantiationException
- will get thrown on class loading errorjava.lang.IllegalAccessException
- will get thrown on class loading errorjava.lang.IllegalArgumentException
- will get thrown on class loading errorjava.lang.reflect.InvocationTargetException
- will get thrown on class loading errorjava.lang.NoSuchMethodException
- will get thrown on class loading errorjava.lang.SecurityException
- will get thrown on class loading errorjava.lang.ClassNotFoundException
- will get thrown on class loading errorjava.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
-
-