Adds potion meta

Some cleanup as well
This commit is contained in:
GunfighterJ 2013-02-04 15:47:26 -06:00
parent a3b2ffdeef
commit ef341ae539
18 changed files with 359 additions and 19 deletions

View File

@ -12,6 +12,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.*; import org.bukkit.inventory.meta.*;
import org.bukkit.potion.*;
public class MetaItemStack public class MetaItemStack
@ -21,7 +22,16 @@ public class MetaItemStack
private final static Map<String, DyeColor> colorMap = new HashMap<String, DyeColor>(); private final static Map<String, DyeColor> colorMap = new HashMap<String, DyeColor>();
private final static Map<String, FireworkEffect.Type> fireworkShape = new HashMap<String, FireworkEffect.Type>(); private final static Map<String, FireworkEffect.Type> fireworkShape = new HashMap<String, FireworkEffect.Type>();
private FireworkEffect.Builder builder = FireworkEffect.builder(); private FireworkEffect.Builder builder = FireworkEffect.builder();
private PotionEffectType pEffectType;
private PotionEffect pEffect;
private boolean validFirework = false; private boolean validFirework = false;
private boolean validPotionEffect = false;
private boolean validPotionDuration = false;
private boolean validPotionPower = false;
private boolean canceledEffect = false;
private boolean completePotion = false;
private int power = 1;
private int duration = 120;
static static
{ {
@ -50,11 +60,36 @@ public class MetaItemStack
return validFirework; return validFirework;
} }
public boolean isValidPotion()
{
return validPotionEffect && validPotionDuration && validPotionPower;
}
public FireworkEffect.Builder getFireworkBuilder() public FireworkEffect.Builder getFireworkBuilder()
{ {
return builder; return builder;
} }
public PotionEffect getPotionEffect()
{
return pEffect;
}
public boolean completePotion()
{
return completePotion;
}
private void resetPotionMeta()
{
pEffect = null;
pEffectType = null;
validPotionEffect = false;
validPotionDuration = false;
validPotionPower = false;
completePotion = true;
}
public void parseStringMeta(final CommandSender user, final boolean allowUnsafe, String[] string, int fromArg, final IEssentials ess) throws Exception public void parseStringMeta(final CommandSender user, final boolean allowUnsafe, String[] string, int fromArg, final IEssentials ess) throws Exception
{ {
@ -148,6 +183,10 @@ public class MetaItemStack
{ {
addFireworkMeta(user, false, string, ess); addFireworkMeta(user, false, string, ess);
} }
else if (stack.getType() == Material.POTION) //WARNING - Meta for potions will be ignored after this point.
{
addPotionMeta(user, false, string, ess);
}
else if (split.length > 1 && (split[0].equalsIgnoreCase("color") || split[0].equalsIgnoreCase("colour")) else if (split.length > 1 && (split[0].equalsIgnoreCase("color") || split[0].equalsIgnoreCase("colour"))
&& (stack.getType() == Material.LEATHER_BOOTS && (stack.getType() == Material.LEATHER_BOOTS
|| stack.getType() == Material.LEATHER_CHESTPLATE || stack.getType() == Material.LEATHER_CHESTPLATE
@ -210,7 +249,6 @@ public class MetaItemStack
{ {
user.sendMessage(_("fireworkSyntax")); user.sendMessage(_("fireworkSyntax"));
throw new Exception(_("invalidFireworkFormat", split[1], split[0])); throw new Exception(_("invalidFireworkFormat", split[1], split[0]));
} }
} }
builder.withColor(primaryColors); builder.withColor(primaryColors);
@ -277,6 +315,70 @@ public class MetaItemStack
} }
} }
public void addPotionMeta(final CommandSender user, final boolean allowShortName, final String string, final IEssentials ess) throws Exception
{
if (stack.getType() == Material.POTION)
{
final User player = ess.getUser(user);
final String[] split = splitPattern.split(string, 2);
if (split.length < 2)
{
return;
}
if (split[0].equalsIgnoreCase("effect"))
{
pEffectType = Potions.getByName(split[1]);
if (pEffectType != null)
{
if(player != null && player.isAuthorized("essentials.potion." + pEffectType.getName().toLowerCase()))
{
validPotionEffect = true;
canceledEffect = false;
}
else
{
canceledEffect = true;
user.sendMessage(_("invalidPotionEffect", pEffectType.getName().toLowerCase()));
}
}
else
{
user.sendMessage("Invalid potion effect");
canceledEffect = true;
}
}
else if (split[0].equalsIgnoreCase("power"))
{
if (Util.isInt(split[1]))
{
validPotionPower = true;
power = Integer.parseInt(split[1]);
}
}
else if (split[0].equalsIgnoreCase("duration") || split[0].equalsIgnoreCase("dur"))
{
if (Util.isInt(split[1]))
{
validPotionDuration = true;
duration = Integer.parseInt(split[1]) * 20; //Duration is in ticks by default, converted to seconds
}
}
if (isValidPotion() && !canceledEffect)
{
PotionMeta pmeta = (PotionMeta)stack.getItemMeta();
pEffect = pEffectType.createEffect(duration, power);
pmeta.addCustomEffect(pEffect, true);
stack.setItemMeta(pmeta);
resetPotionMeta();
}
}
}
private void parseEnchantmentStrings(final CommandSender user, final boolean allowUnsafe, final String[] split) throws Exception private void parseEnchantmentStrings(final CommandSender user, final boolean allowUnsafe, final String[] split) throws Exception
{ {
Enchantment enchantment = getEnchantment(null, split[0]); Enchantment enchantment = getEnchantment(null, split[0]);

View File

@ -0,0 +1,129 @@
package com.earth2me.essentials;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.bukkit.potion.PotionEffectType;
public class Potions
{
private static final Map<String, PotionEffectType> POTIONS = new HashMap<String, PotionEffectType>();
private static final Map<String, PotionEffectType> ALIASPOTIONS = new HashMap<String, PotionEffectType>();
static
{
POTIONS.put("speed", PotionEffectType.SPEED);
ALIASPOTIONS.put("fast", PotionEffectType.SPEED);
ALIASPOTIONS.put("runfast", PotionEffectType.SPEED);
ALIASPOTIONS.put("sprint", PotionEffectType.SPEED);
ALIASPOTIONS.put("swift", PotionEffectType.SPEED);
POTIONS.put("slowness", PotionEffectType.SLOW);
ALIASPOTIONS.put("slow", PotionEffectType.SLOW);
ALIASPOTIONS.put("sluggish", PotionEffectType.SLOW);
POTIONS.put("haste", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("superpick", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("quickmine", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("digspeed", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("digfast", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("sharp", PotionEffectType.FAST_DIGGING);
POTIONS.put("fatigue", PotionEffectType.SLOW_DIGGING);
ALIASPOTIONS.put("slow", PotionEffectType.SLOW_DIGGING);
ALIASPOTIONS.put("dull", PotionEffectType.SLOW_DIGGING);
POTIONS.put("strength", PotionEffectType.INCREASE_DAMAGE);
ALIASPOTIONS.put("strong", PotionEffectType.INCREASE_DAMAGE);
ALIASPOTIONS.put("bull", PotionEffectType.INCREASE_DAMAGE);
ALIASPOTIONS.put("attack", PotionEffectType.INCREASE_DAMAGE);
POTIONS.put("heal", PotionEffectType.HEAL);
ALIASPOTIONS.put("healthy", PotionEffectType.HEAL);
ALIASPOTIONS.put("instaheal", PotionEffectType.HEAL);
POTIONS.put("harm", PotionEffectType.HARM);
ALIASPOTIONS.put("injure", PotionEffectType.HARM);
ALIASPOTIONS.put("damage", PotionEffectType.HARM);
ALIASPOTIONS.put("inflict", PotionEffectType.HARM);
POTIONS.put("jump", PotionEffectType.JUMP);
ALIASPOTIONS.put("leap", PotionEffectType.JUMP);
POTIONS.put("nausea", PotionEffectType.CONFUSION);
ALIASPOTIONS.put("sick", PotionEffectType.CONFUSION);
ALIASPOTIONS.put("sickness", PotionEffectType.CONFUSION);
ALIASPOTIONS.put("confusion", PotionEffectType.CONFUSION);
POTIONS.put("regeneration", PotionEffectType.REGENERATION);
ALIASPOTIONS.put("regen", PotionEffectType.REGENERATION);
POTIONS.put("resistance", PotionEffectType.DAMAGE_RESISTANCE);
ALIASPOTIONS.put("dmgresist", PotionEffectType.DAMAGE_RESISTANCE);
ALIASPOTIONS.put("armor", PotionEffectType.DAMAGE_RESISTANCE);
ALIASPOTIONS.put("dmgresist", PotionEffectType.DAMAGE_RESISTANCE);
POTIONS.put("fireresist", PotionEffectType.FIRE_RESISTANCE);
ALIASPOTIONS.put("fireresistance", PotionEffectType.FIRE_RESISTANCE);
ALIASPOTIONS.put("resistfire", PotionEffectType.FIRE_RESISTANCE);
POTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
ALIASPOTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
POTIONS.put("invisibility", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("invisible", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("invis", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("vanish", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("disappear", PotionEffectType.INVISIBILITY);
POTIONS.put("blindness", PotionEffectType.BLINDNESS);
ALIASPOTIONS.put("blind", PotionEffectType.BLINDNESS);
POTIONS.put("nightvision", PotionEffectType.NIGHT_VISION);
ALIASPOTIONS.put("vision", PotionEffectType.NIGHT_VISION);
POTIONS.put("hunger", PotionEffectType.HUNGER);
ALIASPOTIONS.put("hungry", PotionEffectType.HUNGER);
ALIASPOTIONS.put("starve", PotionEffectType.HUNGER);
POTIONS.put("weakness", PotionEffectType.WEAKNESS);
ALIASPOTIONS.put("weak", PotionEffectType.WEAKNESS);
POTIONS.put("poison", PotionEffectType.POISON);
ALIASPOTIONS.put("venom", PotionEffectType.POISON);
POTIONS.put("wither", PotionEffectType.WITHER);
ALIASPOTIONS.put("decay", PotionEffectType.WITHER);
}
public static PotionEffectType getByName(String name)
{
PotionEffectType peffect;
if (Util.isInt(name))
{
peffect = PotionEffectType.getById(Integer.parseInt(name));
}
else
{
peffect = PotionEffectType.getByName(name.toUpperCase(Locale.ENGLISH));
}
if (peffect == null)
{
peffect = POTIONS.get(name.toLowerCase(Locale.ENGLISH));
}
if (peffect == null)
{
peffect = ALIASPOTIONS.get(name.toLowerCase(Locale.ENGLISH));
}
return peffect;
}
public static Set<Entry<String, PotionEffectType>> entrySet()
{
return POTIONS.entrySet();
}
}

View File

@ -4,10 +4,7 @@ import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.MetaItemStack; import com.earth2me.essentials.MetaItemStack;
import com.earth2me.essentials.User; import com.earth2me.essentials.User;
import com.earth2me.essentials.Util; import com.earth2me.essentials.Util;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.bukkit.DyeColor;
import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Server; import org.bukkit.Server;
@ -36,20 +33,6 @@ import org.bukkit.util.Vector;
public class Commandfirework extends EssentialsCommand public class Commandfirework extends EssentialsCommand
{ {
private final transient Pattern splitPattern = Pattern.compile("[:+',;.]"); private final transient Pattern splitPattern = Pattern.compile("[:+',;.]");
private final static Map<String, DyeColor> colorMap = new HashMap<String, DyeColor>();
private final static Map<String, FireworkEffect.Type> fireworkShape = new HashMap<String, FireworkEffect.Type>();
static
{
for (DyeColor color : DyeColor.values())
{
colorMap.put(color.name(), color);
}
for (FireworkEffect.Type type : FireworkEffect.Type.values())
{
fireworkShape.put(type.name(), type);
}
}
public Commandfirework() public Commandfirework()
{ {
@ -125,7 +108,6 @@ public class Commandfirework extends EssentialsCommand
final MetaItemStack mStack = new MetaItemStack(stack); final MetaItemStack mStack = new MetaItemStack(stack);
for (String arg : args) for (String arg : args)
{ {
final String[] split = splitPattern.split(arg, 2);
mStack.addFireworkMeta(user, true, arg, ess); mStack.addFireworkMeta(user, true, arg, ess);
} }

View File

@ -0,0 +1,84 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.MetaItemStack;
import com.earth2me.essentials.Potions;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Pattern;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionEffectType;
public class Commandpotion extends EssentialsCommand
{
private final transient Pattern splitPattern = Pattern.compile("[:+',;.]");
public Commandpotion()
{
super("potion");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final ItemStack stack = user.getItemInHand();
if (args.length == 0)
{
final Set<String> potionslist = new TreeSet<String>();
for (Map.Entry<String, PotionEffectType> entry : Potions.entrySet())
{
final String potionName = entry.getValue().getName().toLowerCase(Locale.ENGLISH);
if (potionslist.contains(potionName) || (user.isAuthorized("essentials.potion." + potionName)))
{
potionslist.add(entry.getKey());
}
}
throw new NotEnoughArgumentsException(_("potions", Util.joinList(potionslist.toArray())));
}
if (stack.getType() == Material.POTION)
{
if (args.length > 0)
{
if (args[0].equalsIgnoreCase("clear"))
{
PotionMeta pmeta = (PotionMeta)stack.getItemMeta();
pmeta.clearCustomEffects();
stack.setItemMeta(pmeta);
}
else
{
final MetaItemStack mStack = new MetaItemStack(stack);
for (String arg : args)
{
mStack.addPotionMeta(user, true, arg, ess);
}
if (mStack.completePotion())
{
PotionMeta pmeta = (PotionMeta)mStack.getItemStack().getItemMeta();
stack.setItemMeta(pmeta);
}
else
{
user.sendMessage("Invalid potion");
throw new NotEnoughArgumentsException();
}
}
}
}
else
{
throw new Exception(_("holdPotion"));
}
}
}

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -500,3 +500,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -497,3 +497,6 @@ userAFK=\u00a75{0} \u00a75\u00c3\u00a4r f\u00c3\u00b6r n\u00c3\u00a4rvarande bor
fireworkEffectsCleared=\u00a76Removed all effects from held stack. fireworkEffectsCleared=\u00a76Removed all effects from held stack.
fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle fireworkSyntax=\u00a76Firework parameters:\u00a7c color:<color> [fade:<color>] [shape:<shape>] [effect:<effect>]\n\u00a76To use multiple colors/effects, seperate values with commas: \u00a7cred,blue,pink\n\u00a76Shapes:\u00a7c star, ball, large, creeper, burst \u00a76Effects:\u00a7c trail, twinkle
bed=\u00a7obed\u00a7r bed=\u00a7obed\u00a7r
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
potions=\u00a76Potions:\u00a7r {0}
holdPotion=\u00a74You must be holding a potion to apply effects to it

View File

@ -266,6 +266,10 @@ commands:
description: Pong! description: Pong!
usage: /<command> usage: /<command>
aliases: [pong,echo,echo,eping,epong] aliases: [pong,echo,echo,eping,epong]
potion:
description: Adds custom potion effects to a potion.
usage: /<command> effect:<effect> power:<power> duration:<duration>
aliases: [epotion,elixer,eelixer]
powertool: powertool:
description: Assigns a command to the item in hand. description: Assigns a command to the item in hand.
usage: /<command> [l:|a:|r:|c:|d:][command] [arguments] - {player} can be replaced by name of a clicked player. usage: /<command> [l:|a:|r:|c:|d:][command] [arguments] - {player} can be replaced by name of a clicked player.