Created Potatoes without Static Command

This commit is contained in:
alisolarflare 2016-11-19 12:14:36 -05:00
parent 8ea667ed0b
commit 18c8080951

View file

@ -1,8 +1,13 @@
package alisolarflare.components.insurance;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import alisolarflare.components.ModCommand;
import alisolarflare.components.insurance.Insurance.InsuranceType;
@ -16,6 +21,12 @@ public class getInsuranceBar extends ModCommand {
player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot, Integer.parseInt(args[0])));
}else{
player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot));
ItemStack potato = new ItemStack(Material.BAKED_POTATO);
potato.getItemMeta().setDisplayName("Spicy Debug Potato");
potato.getItemMeta().setLore(Arrays.asList("Hwat the fuck"));
potato.addUnsafeEnchantment(Enchantment.ARROW_FIRE, 10);
player.getInventory().addItem(potato);
}
return false;
}