Closed ThaBalla1148 closed 8 years ago
This part of exeCommand(String command) does not account for a boolean:
// attempt to convert arguments to numbers. If the conversion does not work, keep the argument as a string.
Object[] args = null;
if (sArgs != null) {
args = new Object[sArgs.length];
for (int i = 0; i < sArgs.length; i++) {
String s = sArgs[i];
try {
int j = Integer.parseInt(s);
args[i] = j;
} catch (NumberFormatException e) {
try {
float f = Float.parseFloat(s);
args[i] = f;
} catch (NumberFormatException e2) {
args[i] = s;
}
}
}
}
I'm actually looking into rewriting and fixing this code.
Fixed in pull request #19
Creating a command with a boolean as an argument does not work.
Example: