mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2024-11-13 05:54:03 +01:00
Additional check added to make sure frequency value specified in Fill and Trim commands is greater than zero. Thanks to sync667 for pointing this oversight out.
This commit is contained in:
parent
48fb41f0ee
commit
2e48a5f903
@ -1005,8 +1005,16 @@ public class WBCommand implements CommandExecutor
|
||||
catch(NumberFormatException ex)
|
||||
{
|
||||
sender.sendMessage(clrErr + "The frequency and padding values must be integers.");
|
||||
fillDefaults();
|
||||
return false;
|
||||
}
|
||||
if (fillFrequency <= 0)
|
||||
{
|
||||
sender.sendMessage(clrErr + "The frequency value must be greater than zero.");
|
||||
fillDefaults();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!forceLoad.isEmpty())
|
||||
fillForceLoad = strAsBool(forceLoad);
|
||||
|
||||
@ -1111,6 +1119,13 @@ public class WBCommand implements CommandExecutor
|
||||
catch(NumberFormatException ex)
|
||||
{
|
||||
sender.sendMessage(clrErr + "The frequency and padding values must be integers.");
|
||||
trimDefaults();
|
||||
return false;
|
||||
}
|
||||
if (trimFrequency <= 0)
|
||||
{
|
||||
sender.sendMessage(clrErr + "The frequency value must be greater than zero.");
|
||||
trimDefaults();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user