Example #1
0
 public Module getLoaded(String modName) {
   List<Module> mods = bot.getModules();
   for (Module mod : mods) {
     if (mod.moduleName.equals(modName)) {
       return mod;
     }
   }
   return null;
 }
Example #2
0
 public Module getLoaded(Class<?> modClass) {
   Iterator<Module> it = bot.getModules().listIterator();
   Module ret = null;
   if (!modClass.equals(goat.core.Module.class) && !modClass.equals(Object.class))
     while (it.hasNext()) {
       Module mod = it.next();
       if (modClass.isInstance(mod)) ret = mod;
     }
   return ret;
 }
Example #3
0
 public Module getLoaded(int i) {
   return bot.getModules().get(i);
 }