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

View file

@ -1,15 +1,11 @@
package alisolarflare.components.insurance; package alisolarflare.components.insurance;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.bukkit.Material;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import alisolarflare.components.ModCommand; import alisolarflare.components.ModCommand;
import alisolarflare.components.insurance.Insurance.InsuranceType;
public class getInsuranceBar extends ModCommand { public class getInsuranceBar extends ModCommand {
@ -17,15 +13,11 @@ public class getInsuranceBar extends ModCommand {
public boolean OnCommand(CommandSender sender, String alias, String[] args) { public boolean OnCommand(CommandSender sender, String alias, String[] args) {
Player player = (Player) sender; Player player = (Player) sender;
if (args.length > 0 && StringUtils.isNumeric(args[0])){ 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{ }else{
//player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot)); player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot));
ItemStack potato = new ItemStack(Material.BAKED_POTATO); SendDebugPotato(player, "Hwat the fuck!");
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; return false;
} }