mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
Limit duration and amplifier for /potion command. Resolves #243
This commit is contained in:
parent
86f61f1487
commit
5e4d1d0d6d
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user