mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-10 04:50:12 +01:00
Merge pull request #321 from GunfighterJ/patch-10
Fix array index out of bounds on /firework fire
This commit is contained in:
commit
8ea0a152d4
@ -85,11 +85,13 @@ public class Commandfirework extends EssentialsCommand
|
||||
}
|
||||
stack.setItemMeta(fmeta);
|
||||
}
|
||||
else if ((args[0].equalsIgnoreCase("fire") || (args[0].equalsIgnoreCase("p")))
|
||||
else if ((args[0].equalsIgnoreCase("fire") || (args[0].equalsIgnoreCase("f")))
|
||||
&& user.isAuthorized("essentials.firework.fire"))
|
||||
{
|
||||
int amount = 1;
|
||||
boolean direction = false;
|
||||
if (args.length > 1)
|
||||
{
|
||||
if (Util.isInt(args[1]))
|
||||
{
|
||||
final int serverLimit = ess.getSettings().getSpawnMobLimit();
|
||||
@ -104,6 +106,7 @@ public class Commandfirework extends EssentialsCommand
|
||||
{
|
||||
direction = true;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
Firework firework = (Firework)user.getWorld().spawnEntity(user.getLocation(), EntityType.FIREWORK);
|
||||
|
@ -121,7 +121,7 @@ commands:
|
||||
aliases: [efireball,fireskull,efireskull,fireentity,efireentity]
|
||||
firework:
|
||||
description: Allows you to modify a stack of fireworks
|
||||
usage: /<command> <<meta param>|power [amount]|clear|fire>
|
||||
usage: /<command> <<meta param>|power [amount]|clear|fire [amount]>
|
||||
aliases: [efirework]
|
||||
gamemode:
|
||||
description: Change player gamemode.
|
||||
|
Loading…
Reference in New Issue
Block a user