Reintroduced DEBUG POTATOOOOEEESSSSS

This commit is contained in:
alisolarflare 2016-11-19 13:52:27 -05:00
parent a400bb9acb
commit ce3101acf5
2 changed files with 23 additions and 24 deletions

View file

@ -21,33 +21,40 @@ public abstract class Insurance {
case Nugget:
insuranceItem = new ItemStack(Material.GOLD_NUGGET);
lore = Arrays.asList(
"This insurance nugget will protect one inventory slot from death! Be careful"
+ "though, insurance is removed whenever you die, with each itemslot costing"
+ "one nugget."
"This insurance nugget will protect ",
"one inventory slot from death! Be careful",
"though, insurance is removed whenever ",
"you die, with each itemslot costing",
"one nugget."
);
break;
case Ingot:
insuranceItem = new ItemStack(Material.GOLD_INGOT);
lore = Arrays.asList(
"This insurance ingot will protect nine inventory slots from death! Be "
+ "careful though, insurance is removed whenever you die, with each "
+ "inventory row costing one ingot."
"This insurance ingot will protect ",
"nine inventory slots from death! Be ",
"careful though, insurance is removed ",
"whenever you die, with each inventory ",
"row costing one ingot."
);
break;
case Block:
insuranceItem = new ItemStack(Material.GOLD_BLOCK);
lore = Arrays.asList(
"This insurance block will give your inventory full protection against death! "
+ "Be careful though, this block will split into ingots, and you'll lose 3"
+ "upon death."
"This insurance block will give your ",
"inventory full protection against death! ",
"Be careful though, this block will split ",
"into ingots, and you'll lose 3 upon ",
"death."
);
break;
default:
lore = Arrays.asList(
"The InsuranceType " + insuranceType.toString() + " is not handled by the " +
"Insurance Class in" + Insurance.class.getPackage().getName() + ". Contact a "+
"developer with a screenshot of this message"
"The InsuranceType " + insuranceType.toString() + " ",
"is not handled by the Insurance Class in: ",
Insurance.class.getPackage().getName() + ".",
"Contact a developer with a screenshot of this message"
);
insuranceItem = BaseCommand.CreateDebugPotato(lore);
}

View file

@ -1,15 +1,11 @@
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;
public class getInsuranceBar extends ModCommand {
@ -17,15 +13,11 @@ public class getInsuranceBar extends ModCommand {
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
Player player = (Player) sender;
if (args.length > 0 && StringUtils.isNumeric(args[0])){
//player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot, Integer.parseInt(args[0])));
player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot, Integer.parseInt(args[0])));
}else{
//player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot));
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);
SendDebugPotato(player, "Hwat the fuck!");
}
return false;
}