mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-30 11:01:40 +00:00
Allow potion clear/apply commands to work
This commit is contained in:
commit
8b97a84652
20 changed files with 320 additions and 108 deletions
|
@ -42,11 +42,6 @@ public class Commandpotion extends EssentialsCommand
|
|||
}
|
||||
throw new NotEnoughArgumentsException(_("potions", Util.joinList(potionslist.toArray())));
|
||||
}
|
||||
|
||||
if (args.length < 3)
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
if (stack.getType() == Material.POTION)
|
||||
{
|
||||
|
@ -60,11 +55,15 @@ public class Commandpotion extends EssentialsCommand
|
|||
}
|
||||
else if (args[0].equalsIgnoreCase("apply") && user.isAuthorized("essentials.potion.apply"))
|
||||
{
|
||||
for(PotionEffect effect : pmeta.getCustomEffects())
|
||||
for (PotionEffect effect : pmeta.getCustomEffects())
|
||||
{
|
||||
effect.apply(user);
|
||||
}
|
||||
}
|
||||
else if (args.length < 3)
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
else
|
||||
{
|
||||
final MetaItemStack mStack = new MetaItemStack(stack);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue