1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Merge pull request #38 from John000708/master

Removed Deprecated Backpacks
This commit is contained in:
John000708 2016-11-27 22:45:05 +01:00 committed by GitHub
commit 6e2aee324d
3 changed files with 0 additions and 73 deletions

View File

@ -60,14 +60,6 @@ public class SlimefunItems {
public static ItemStack VOIDBAG_BIG = null;
public static ItemStack VOIDBAG_LARGE = null;
public static ItemStack BOUND_VOIDBAG = null;
public static ItemStack DEPRECATED_BACKPACK_SMALL = new CustomItem(Material.CHEST, "&eSmall Backpack", 0, new String[] {"", "&7Size: &e9", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
public static ItemStack DEPRECATED_BACKPACK_MEDIUM = new CustomItem(Material.CHEST, "&eBackpack", 0, new String[] {"", "&7Size: &e18", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
public static ItemStack DEPRECATED_BACKPACK_LARGE = new CustomItem(Material.CHEST, "&eLarge Backpack", 0, new String[] {"", "&7Size: &e27", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
public static ItemStack DEPRECATED_WOVEN_BACKPACK = new CustomItem(Material.CHEST, "&eWoven Backpack", 0, new String[] {"", "&7Size: &e36", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
public static ItemStack DEPRECATED_GILDED_BACKPACK = new CustomItem(Material.CHEST, "&eGilded Backpack", 0, new String[] {"", "&7Size: &e45", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
public static ItemStack DEPRECATED_BOUND_BACKPACK = new CustomItem(Material.ENDER_CHEST, "&cSoulbound Backpack", 0, new String[] {"", "&7Size: &e36", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
public static ItemStack DEPRECATED_COOLER = new CustomItem(Material.CHEST, "&bCooler", 0, new String[] {"&rAllows you to store Juices/Smoothies", "&rand automatically consumes them when you are hungry", "&rand you have this in your Inventory", "", "&7Size: &e27", "&7ID: <ID>", "", "&7&eRight Click&7 to open"});
/* Jetpacks */
public static ItemStack DURALUMIN_JETPACK = new CustomArmor(new CustomItem(new MaterialData(Material.LEATHER_CHESTPLATE), "&9Electric Jetpack &7- &eI", "", "&8\u21E8 &7Material: &bDuralumin", "&c&o&8\u21E8 &e\u26A1 &70 / 20 J", "&8\u21E8 &7Thrust: &c0.35", "", "&7Hold &eShift&7 to use"), Color.SILVER);

View File

@ -70,63 +70,6 @@ public class BackpackListener implements Listener {
if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
ItemStack item = e.getPlayer().getInventory().getItemInMainHand();
Player p = e.getPlayer();
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BACKPACK_SMALL, false)) {
ItemStack stack = SlimefunItems.BACKPACK_SMALL.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BACKPACK_MEDIUM, false)) {
ItemStack stack = SlimefunItems.BACKPACK_MEDIUM.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BACKPACK_LARGE, false)) {
ItemStack stack = SlimefunItems.BACKPACK_LARGE.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_WOVEN_BACKPACK, false)) {
ItemStack stack = SlimefunItems.WOVEN_BACKPACK.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_GILDED_BACKPACK, false)) {
ItemStack stack = SlimefunItems.GILDED_BACKPACK.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BOUND_BACKPACK, false)) {
ItemStack stack = SlimefunItems.BOUND_BACKPACK.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_COOLER, false)) {
ItemStack stack = SlimefunItems.COOLER.clone();
ItemMeta im = stack.getItemMeta();
im.setLore(item.getItemMeta().getLore());
stack.setItemMeta(im);
p.getInventory().setItemInMainHand(stack);
e.setCancelled(true);
}
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.BACKPACK_SMALL, false)) {
e.setCancelled(true);
if (Slimefun.hasUnlocked(p, SlimefunItems.BACKPACK_SMALL, true)) {

View File

@ -85,14 +85,6 @@ public class ToolListener implements Listener {
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.BOUND_BACKPACK, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.COOLER, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.ENDER_BACKPACK, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BACKPACK_SMALL, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BACKPACK_MEDIUM, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BACKPACK_LARGE, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_WOVEN_BACKPACK, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_GILDED_BACKPACK, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_BOUND_BACKPACK, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.DEPRECATED_COOLER, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.CARBON, false)) e.setCancelled(true);
else if (SlimefunManager.isItemSimiliar(item, SlimefunItems.COMPRESSED_CARBON, false)) e.setCancelled(true);