Handle multiple mod names

This commit is contained in:
Mike Primm 2012-10-15 08:24:10 -05:00
parent cbb8cc061e
commit a117987840
1 changed files with 4 additions and 3 deletions

View File

@ -446,19 +446,20 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
}
@Override
public boolean isModLoaded(String name) {
boolean loaded = false;
if(ismodloaded != null) {
try {
Object rslt =ismodloaded.invoke(null, name);
if(rslt instanceof Boolean) {
loaded = ((Boolean)rslt).booleanValue();
if(((Boolean)rslt).booleanValue()) {
return true;
}
}
} catch (IllegalArgumentException iax) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
}
return loaded;
return false;
}
}
/**