Limit duration and amplifier for /potion command. Resolves #243

This commit is contained in:
StevenLawson 2014-07-26 11:47:23 -04:00
parent 86f61f1487
commit 5e4d1d0d6d

View File

@ -136,6 +136,7 @@ public class Command_potion extends TFM_Command
try
{
duration = Integer.parseInt(args[2]);
duration = Math.min(duration, 100000);
}
catch (NumberFormatException ex)
{
@ -147,6 +148,7 @@ public class Command_potion extends TFM_Command
try
{
amplifier = Integer.parseInt(args[3]);
amplifier = Math.min(amplifier, 100000);
}
catch (NumberFormatException ex)
{