From ce3101acf5f6ea07d364a9c57d6309841538d106 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 19 Nov 2016 13:52:27 -0500 Subject: [PATCH] Reintroduced DEBUG POTATOOOOEEESSSSS --- .../components/insurance/Insurance.java | 31 ++++++++++++------- .../components/insurance/getInsuranceBar.java | 16 +++------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/alisolarflare/components/insurance/Insurance.java b/src/alisolarflare/components/insurance/Insurance.java index 10fba5d..a46d861 100644 --- a/src/alisolarflare/components/insurance/Insurance.java +++ b/src/alisolarflare/components/insurance/Insurance.java @@ -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); } diff --git a/src/alisolarflare/components/insurance/getInsuranceBar.java b/src/alisolarflare/components/insurance/getInsuranceBar.java index e58331b..78e859b 100644 --- a/src/alisolarflare/components/insurance/getInsuranceBar.java +++ b/src/alisolarflare/components/insurance/getInsuranceBar.java @@ -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; }