From 96324144294dd58717046116b3a02ca444d74f4a Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Mon, 20 Jun 2011 20:22:50 -0600 Subject: [PATCH] Disallow negative or 0 scaling --- src/com/onarandombox/MultiverseCore/MVWorld.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/onarandombox/MultiverseCore/MVWorld.java b/src/com/onarandombox/MultiverseCore/MVWorld.java index 6f77851c..dab97f59 100644 --- a/src/com/onarandombox/MultiverseCore/MVWorld.java +++ b/src/com/onarandombox/MultiverseCore/MVWorld.java @@ -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);