mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-19 19:41:01 +02:00
Merge pull request #396 from GunfighterJ/2.9
Allow potion clear/apply commands to work
This commit is contained in:
commit
fe28faf79d
@ -43,11 +43,6 @@ public class Commandpotion extends EssentialsCommand
|
|||||||
throw new NotEnoughArgumentsException(_("potions", Util.joinList(potionslist.toArray())));
|
throw new NotEnoughArgumentsException(_("potions", Util.joinList(potionslist.toArray())));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length < 3)
|
|
||||||
{
|
|
||||||
throw new NotEnoughArgumentsException();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stack.getType() == Material.POTION)
|
if (stack.getType() == Material.POTION)
|
||||||
{
|
{
|
||||||
PotionMeta pmeta = (PotionMeta)stack.getItemMeta();
|
PotionMeta pmeta = (PotionMeta)stack.getItemMeta();
|
||||||
@ -65,6 +60,10 @@ public class Commandpotion extends EssentialsCommand
|
|||||||
effect.apply(user);
|
effect.apply(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (args.length < 3)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final MetaItemStack mStack = new MetaItemStack(stack);
|
final MetaItemStack mStack = new MetaItemStack(stack);
|
||||||
|
Loading…
Reference in New Issue
Block a user