mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 08:34:58 +00:00
Limit duration and amplifier for /potion command. Resolves #243
This commit is contained in:
parent
86f61f1487
commit
5e4d1d0d6d
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue