Disallow negative or 0 scaling

This commit is contained in:
Eric Stokes 2011-06-20 20:22:50 -06:00
parent 5a60df3f5a
commit 9632414429
1 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,11 @@ public class MVWorld {
this.pvp = config.getBoolean("worlds." + this.name + ".pvp", true);
this.scaling = config.getDouble("worlds." + this.name + ".scale", 1.0);
if(this.scaling <= 0) {
// Disallow negative or 0 scalings.
config.setProperty("worlds." + this.name + ".scale", 1.0);
this.scaling = 1.0;
}
this.joinWhitelist = config.getStringList("worlds." + name + ".playerWhitelist", joinWhitelist);
this.joinBlacklist = config.getStringList("worlds." + name + ".playerBlacklist", joinBlacklist);