Merge branch 'master' of github.com:MassiveCraft/Factions

This commit is contained in:
Olof Larsson
2011-10-13 22:49:52 +02:00
9 changed files with 269 additions and 80 deletions

View File

@ -123,6 +123,22 @@ public class CmdConfig extends FCommand
}
}
// float
else if (target.getType() == float.class)
{
try
{
float floatVal = Float.parseFloat(value);
target.setFloat(null, floatVal);
success = "\""+fieldName+"\" option set to "+floatVal+".";
}
catch(NumberFormatException ex)
{
sendMessage("Cannot set \""+fieldName+"\": float (numeric) value required.");
return;
}
}
// String
else if (target.getType() == String.class)
{