diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index 71d0e70..19dcb6c 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -289,11 +289,86 @@ public class Main extends JavaPlugin Sarayn_recycling_center.addChest(new Location(Bukkit.getWorld("world"), 1541, 57, 154)); recycling_center_list.add(Sarayn_recycling_center); + //Add Recipe for melon slice crafting. + ShapedRecipe melon_slice = new ShapedRecipe(new ItemStack(Material.MELON, 8)); + melon_slice.shape("a"); + melon_slice.setIngredient('a', Material.MELON_BLOCK); + Bukkit.addRecipe(melon_slice); + + //Add wood slab recombining recipes. + ShapedRecipe oak_planks = new ShapedRecipe(new ItemStack(Material.WOOD, 1, (short) 0)); + oak_planks.shape("aa"); + oak_planks.setIngredient('a', new ItemStack(Material.WOOD_STEP, 1, (short) 0).getData()); + Bukkit.addRecipe(oak_planks); + ShapedRecipe spruce_planks = new ShapedRecipe(new ItemStack(Material.WOOD, 1, (short) 1)); + spruce_planks.shape("aa"); + spruce_planks.setIngredient('a', new ItemStack(Material.WOOD_STEP, 1, (short) 1).getData()); + Bukkit.addRecipe(spruce_planks); + ShapedRecipe birch_planks = new ShapedRecipe(new ItemStack(Material.WOOD, 1, (short) 2)); + birch_planks.shape("aa"); + birch_planks.setIngredient('a', new ItemStack(Material.WOOD_STEP, 1, (short) 2).getData()); + Bukkit.addRecipe(birch_planks); + ShapedRecipe jungle_planks = new ShapedRecipe(new ItemStack(Material.WOOD, 1, (short) 3)); + jungle_planks.shape("aa"); + jungle_planks.setIngredient('a', new ItemStack(Material.WOOD_STEP, 1, (short) 3).getData()); + Bukkit.addRecipe(jungle_planks); + + //Add non-wood slab recombining recipes. + ShapedRecipe stone = new ShapedRecipe(new ItemStack(Material.STONE, 1)); + stone.shape("aa"); + stone.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 0).getData()); + Bukkit.addRecipe(stone); + ShapedRecipe sandstone = new ShapedRecipe(new ItemStack(Material.SANDSTONE, 1)); + sandstone.shape("aa"); + sandstone.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 1).getData()); + Bukkit.addRecipe(sandstone); + ShapedRecipe cobblestone = new ShapedRecipe(new ItemStack(Material.COBBLESTONE, 1)); + cobblestone.shape("aa"); + cobblestone.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 3).getData()); + Bukkit.addRecipe(cobblestone); + ShapedRecipe bricks = new ShapedRecipe(new ItemStack(Material.BRICK, 1)); + bricks.shape("aa"); + bricks.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 4).getData()); + Bukkit.addRecipe(bricks); + ShapedRecipe stone_bricks = new ShapedRecipe(new ItemStack(Material.SMOOTH_BRICK, 1)); + stone_bricks.shape("aa"); + stone_bricks.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 5).getData()); + Bukkit.addRecipe(stone_bricks); + ShapedRecipe nether_bricks = new ShapedRecipe(new ItemStack(Material.NETHER_BRICK, 1)); + nether_bricks.shape("aa"); + nether_bricks.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 6).getData()); + Bukkit.addRecipe(nether_bricks); + ShapedRecipe nether_quartz = new ShapedRecipe(new ItemStack(Material.QUARTZ_BLOCK, 1)); + nether_quartz.shape("aa"); + nether_quartz.setIngredient('a', new ItemStack(Material.STEP, 1, (short) 7).getData()); + Bukkit.addRecipe(nether_quartz); + + //Add Recipes for chain armor crafting. + ShapedRecipe chain_helmet = new ShapedRecipe(new ItemStack(Material.CHAINMAIL_HELMET)); + chain_helmet.shape("aaa","b b"); + chain_helmet.setIngredient('a', Material.IRON_BLOCK); + chain_helmet.setIngredient('b', Material.IRON_INGOT); + Bukkit.addRecipe(chain_helmet); + + ShapedRecipe chain_chestplate = new ShapedRecipe(new ItemStack(Material.CHAINMAIL_CHESTPLATE)); + chain_chestplate.shape("b b","aba","aaa"); + chain_chestplate.setIngredient('a', Material.IRON_BLOCK); + chain_chestplate.setIngredient('b', Material.IRON_INGOT); + Bukkit.addRecipe(chain_chestplate); + + ShapedRecipe chain_leggings = new ShapedRecipe(new ItemStack(Material.CHAINMAIL_LEGGINGS)); + chain_leggings.shape("bbb","a a","a a"); + chain_leggings.setIngredient('a', Material.IRON_BLOCK); + chain_leggings.setIngredient('b', Material.IRON_INGOT); + Bukkit.addRecipe(chain_leggings); + + ShapedRecipe chain_boots = new ShapedRecipe(new ItemStack(Material.CHAINMAIL_BOOTS)); + chain_boots.shape("b a","b a"); + chain_boots.setIngredient('a', Material.IRON_BLOCK); + chain_boots.setIngredient('a', Material.IRON_INGOT); + Bukkit.addRecipe(chain_boots); + //Add Recipes for new Block armor crafting. - ShapedRecipe Melons = new ShapedRecipe(new ItemStack(Material.MELON, 8)); - Melons.shape("a"); - Melons.setIngredient('a', Material.MELON_BLOCK); - Bukkit.addRecipe(Melons); ShapedRecipe iron_helmet = new ShapedRecipe(new ItemStack(Material.IRON_HELMET)); iron_helmet.shape("aaa","a a"); iron_helmet.setIngredient('a', Material.IRON_BLOCK); @@ -342,6 +417,19 @@ public class Main extends JavaPlugin diamond_boots.shape("a a","a a"); diamond_boots.setIngredient('a', Material.DIAMOND_BLOCK); Bukkit.addRecipe(diamond_boots); + + // Add Recipe for fireproof Wooden Slab + ItemStack slab = new ItemStack(Material.STEP, 3, (short) 2); + ItemMeta slab_name = slab.getItemMeta(); + slab_name.setDisplayName(ChatColor.RESET+"Fireproof Wood Slab"); + slab.setItemMeta(slab_name); + ShapedRecipe fireproof_wood_slab = new ShapedRecipe(slab); + fireproof_wood_slab.shape(" a ","bbb"); + fireproof_wood_slab.setIngredient('a', Material.SLIME_BALL); + fireproof_wood_slab.setIngredient('b', Material.WOOD_STEP); + Bukkit.addRecipe(fireproof_wood_slab); + + // Add Recipes for Item cube crafting. ItemStack temp = new ItemStack(Material.CHEST); ItemMeta tempmeta = temp.getItemMeta(); tempmeta.setDisplayName(ChatColor.YELLOW+"Item Cube"); @@ -375,6 +463,23 @@ public class Main extends JavaPlugin item_cube.setIngredient('b', Material.HOPPER); item_cube.setIngredient('c', Material.DIAMOND_BLOCK); Bukkit.addRecipe(item_cube); + temp = new ItemStack(Material.ENDER_CHEST); + tempmeta = temp.getItemMeta(); + tempmeta.setDisplayName(ChatColor.BLUE+"Ender Item Cube"); + templore = new ArrayList(); + templore.add(ChatColor.AQUA+"Contains 27 item slots."); + templore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"Click on an item and then"); + templore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"click the Item Cube to store"); + templore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"it inside. Right-Click the"); + templore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"Item Cube to view its contents."); + tempmeta.setLore(templore); + temp.setItemMeta(tempmeta); + item_cube = new ShapedRecipe(temp); + item_cube.shape("cac","aba","cac"); + item_cube.setIngredient('a', Material.ENDER_CHEST); + item_cube.setIngredient('b', Material.HOPPER); + item_cube.setIngredient('c', Material.EMERALD_BLOCK); + Bukkit.addRecipe(item_cube); DMGCALC = new DamageAPI(); //System.out.println("Running BankEconomy in "+this.getDataFolder().getAbsolutePath()); @@ -518,7 +623,7 @@ public class Main extends JavaPlugin Farmer_job.addData("POTATO", 0.015, 3, 0); Farmer_job.addData("NETHER WART", 0.015, 3, 0); //Farmer_job.addData("PUMPKIN SEEDS", 0.02, 4, 0); - //Farmer_job.addData("PUMPKIN", 0.04, 8, 0); + Farmer_job.addData("PUMPKIN", 0.04, 8, 0); Farmer_job.addData("MELON", 0.05, 10, 0); Farmer_job.addData("SEEDS", 0.0025, 1, 1); Farmer_job.addData("PUMPKIN SEEDS", 0.005, 2, 1); @@ -632,6 +737,10 @@ public class Main extends JavaPlugin Blacksmith_job.addData("WEAK DIAMOND HELMET", 1.15, 480, 0); Blacksmith_job.addData("WEAK DIAMOND LEGGINGS", 1.325, 660, 0); Blacksmith_job.addData("WEAK DIAMOND CHESTPLATE", 1.50, 750, 0); + Blacksmith_job.addData("CHAIN BOOTS", 0.375*5, 80*5, 0); + Blacksmith_job.addData("CHAIN HELMET", 0.50*5, 100*5, 0); + Blacksmith_job.addData("CHAIN LEGGINGS", 0.725*5, 140*5, 0); + Blacksmith_job.addData("CHAIN CHESTPLATE", 0.875*5, 175*5, 0); Blacksmith_job.addData("IRON BOOTS", 0.375*10, 80*10, 0); Blacksmith_job.addData("IRON HELMET", 0.50*10, 100*10, 0); Blacksmith_job.addData("IRON LEGGINGS", 0.725*10, 140*10, 0); @@ -2800,6 +2909,16 @@ public void checkJukeboxes() { } } } + if (items[j].getType()==Material.ENDER_CHEST) { + if (items[j].hasItemMeta() && items[j].getItemMeta().getLore()!=null) { + List loredata = items[j].getItemMeta().getLore(); + for (int m=0;m0)?true:false; @@ -4119,9 +4119,41 @@ public class PlayerListener @EventHandler public void onItemPrepareCraft(PrepareItemCraftEvent e) { CraftingInventory result = e.getInventory(); + + // Disable melon crafting recipe if (result.getResult().getType()==Material.MELON_BLOCK) { result.setResult(new ItemStack(Material.AIR)); } + + // Increase stairs recipe efficiency + if (result.getResult().getType()==Material.WOOD_STAIRS) { + result.setResult(new ItemStack(Material.WOOD_STAIRS, 8)); + } + if (result.getResult().getType()==Material.BIRCH_WOOD_STAIRS) { + result.setResult(new ItemStack(Material.BIRCH_WOOD_STAIRS, 8)); + } + if (result.getResult().getType()==Material.SPRUCE_WOOD_STAIRS) { + result.setResult(new ItemStack(Material.SPRUCE_WOOD_STAIRS, 8)); + } + if (result.getResult().getType()==Material.JUNGLE_WOOD_STAIRS) { + result.setResult(new ItemStack(Material.JUNGLE_WOOD_STAIRS, 8)); + } + if (result.getResult().getType()==Material.BRICK_STAIRS) { + result.setResult(new ItemStack(Material.BRICK_STAIRS, 8)); + } + if (result.getResult().getType()==Material.NETHER_BRICK_STAIRS) { + result.setResult(new ItemStack(Material.NETHER_BRICK_STAIRS, 8)); + } + if (result.getResult().getType()==Material.QUARTZ_STAIRS) { + result.setResult(new ItemStack(Material.QUARTZ_STAIRS, 8)); + } + if (result.getResult().getType()==Material.SANDSTONE_STAIRS) { + result.setResult(new ItemStack(Material.SANDSTONE_STAIRS, 8)); + } + if (result.getResult().getType()==Material.SMOOTH_STAIRS) { + result.setResult(new ItemStack(Material.SMOOTH_STAIRS, 8)); + } + if (result.getResult().getType()==Material.IRON_HELMET || result.getResult().getType()==Material.IRON_CHESTPLATE || result.getResult().getType()==Material.IRON_LEGGINGS || @@ -6588,7 +6620,6 @@ public ItemStack getGoodie() { p.setFireTicks(0); p.setFoodLevel(20); p.setRemainingAir(p.getMaximumAir()); - p.updateInventory(); //An attempt to fix inventory desyncs. this.plugin.REVIVE_EFFECT=90; this.plugin.REVIVE_EFFECT_LOC = p.getLocation(); PersistentExplorerList ev = new PersistentExplorerList(p.getName()); @@ -6601,7 +6632,6 @@ public ItemStack getGoodie() { final EntityDamageEvent f = e; if (e.getEntity().getType()==EntityType.PLAYER) { final Player p = (Player)e.getEntity(); - //Bukkit.broadcastMessage("Player Damaged: "+p.getHealth()+" HP, -"+p.getLastDamageCause().getDamage()+" damage"); if (e.getCause()==DamageCause.ENTITY_EXPLOSION || e.getCause()==DamageCause.BLOCK_EXPLOSION) { e.setDamage(e.getDamage()*2); } @@ -8295,7 +8325,7 @@ public ItemStack getGoodie() { if (e.getItemInHand().hasItemMeta() && e.getItemInHand().getItemMeta().getLore()!=null) { //Check the Lore. for (int i=0;i items = new ArrayList(); + //We need to see if we have the inventory opened already...If so we have to add it to THAT one. + Inventory thisinven=Bukkit.createInventory(event.getWhoClicked(), 27, "Item Cube #"+identifier); + boolean changeinven=false; + if (event.getInventory().getTitle().contains("Item Cube") && event.getInventory().getTitle().length()>0) { + if (Integer.valueOf(event.getInventory().getTitle().substring(event.getInventory().getTitle().indexOf("#")).replace("#", ""))==identifier) { + thisinven=event.getInventory(); + changeinven=true; + } + } + if (!changeinven) { + for (int i=0;i<27;i++) { + //items.add(f.getItemStack("item-"+i)); + if (f.contains("item-"+i)) { + thisinven.addItem(f.getItemStack("item-"+i)); + } + } + } + int countinven = countSpace(thisinven,event.getCursor()); + if (countinven>=event.getCursor().getAmount()) { + //We can simply add it in no problem. + thisinven.addItem(event.getCursor()); + for (int i=0;i0) { + //We can at least fit a few. + int fit = event.getCursor().getAmount()-countinven; + //Leave behind this many. + ItemStack thisitem = event.getCursor(), thisitem2 = event.getCursor(); + thisitem.setAmount(fit); + event.setCursor(thisitem); + //Bukkit.getPlayer("sigonasr2").sendMessage("Cursor gets "+thisitem.getAmount()); + thisitem2.setAmount(countinven); + thisinven.addItem(thisitem2); + //Bukkit.getPlayer("sigonasr2").sendMessage("Item Cube gets "+thisitem2.getAmount()); + for (int i=0;i items = new ArrayList(); + screen=Bukkit.createInventory(event.getWhoClicked(), 27, "Ender Item Cube #"+identifier); + for (int i=0;i<27;i++) { + //items.add(f.getItemStack("item-"+i)); + screen.setItem(i, f.getItemStack("item-"+i)); + } + this.plugin.saveItemCubeConfig(f, identifier); + } if (screen!=null) { event.getWhoClicked().closeInventory(); event.getWhoClicked().openInventory(screen); @@ -9837,7 +9967,7 @@ public ItemStack getGoodie() { if (event.getInventory().getType()==InventoryType.CHEST && !event.getInventory().getName().equalsIgnoreCase("Notification Options")) { //If we click a chest, make sure it's not the same ID chest. if (event.getCurrentItem()!=null) { - if ((event.getCurrentItem().getType()==Material.CHEST || event.getCurrentItem().getType()==Material.TRAPPED_CHEST)) { + if ((event.getCurrentItem().getType()==Material.CHEST || event.getCurrentItem().getType()==Material.TRAPPED_CHEST || event.getCurrentItem().getType()==Material.ENDER_CHEST)) { int identifier=-1; if (event.getCurrentItem().getItemMeta().getLore()!=null) { //Check to see if the Lore contains anything. @@ -10016,6 +10146,22 @@ public ItemStack getGoodie() { this.plugin.gainMoneyExp(p,"Blacksmith",0.35*amount,40*amount); crafteditem=true; } + if (item.getType()==Material.CHAINMAIL_BOOTS) { + this.plugin.gainMoneyExp(p,"Blacksmith",0.375*0.5*amount,80*0.5*amount); + crafteditem=true; + } + if (item.getType()==Material.CHAINMAIL_HELMET) { + this.plugin.gainMoneyExp(p,"Blacksmith",0.50*0.5*amount,100*0.5*amount); + crafteditem=true; + } + if (item.getType()==Material.CHAINMAIL_LEGGINGS) { + this.plugin.gainMoneyExp(p,"Blacksmith",0.725*0.5*amount,140*0.5*amount); + crafteditem=true; + } + if (item.getType()==Material.CHAINMAIL_CHESTPLATE) { + this.plugin.gainMoneyExp(p,"Blacksmith",0.875*0.5*amount,175*0.5*amount); + crafteditem=true; + } if (item.getType()==Material.IRON_BOOTS) { int mult=1; if ((item.getItemMeta().getDisplayName()!=null && !item.getItemMeta().getDisplayName().contains(ChatColor.DARK_AQUA+"Weak ")) || item.getItemMeta().getDisplayName()==null) { @@ -10145,6 +10291,23 @@ public ItemStack getGoodie() { crafteditem=true; } } + /*if (e.getBlock().getType()==Material.PUMPKIN) { + this.plugin.gainMoneyExp(p,"Farmer",0.00,1); + } + if (e.getBlock().getType()==Material.MELON_BLOCK) { + this.plugin.gainMoneyExp(p,"Farmer",0.10,10); + }*/ + if (this.plugin.PlayerinJob(p,"Farmer")) { + boolean crafteditem=false; + if (item.getType()==Material.MELON) { + this.plugin.gainMoneyExp(p,"Farmer",0.10,10); + crafteditem=true; + } + if (item.getType()==Material.PUMPKIN_SEEDS) { + this.plugin.gainMoneyExp(p,"Farmer",0.04,8); + crafteditem=true; + } + } if (this.plugin.PlayerinJob(p,"Cook")) { boolean crafteditem=false; if (item.getType()==Material.BREAD) { @@ -11318,109 +11481,71 @@ public void onEntityExpode(ExplosionPrimeEvent e) { @EventHandler public void onPlayerDeath(PlayerDeathEvent e) { - //Delay this for 5 ticks. See if Fatal Survivor kicked in in time. (Or you got healed). - //Bukkit.broadcastMessage("Player Death: "+e.getEntity().getHealth()+" HP, Last Damage: -"+e.getEntity().getLastDamage()+" from "+e.getEntity().getLastDamageCause()); - //If we have Fatal Survivor, use the force! Otherwise, uh, you're dead. - - final Player p = e.getEntity(); + Player p = e.getEntity(); e.setDeathMessage(e.getDeathMessage().replace(p.getScoreboard().getTeam(p.getName()).getPrefix()+p.getName()+p.getScoreboard().getTeam(p.getName()).getSuffix(),p.getName())); p.getScoreboard().getTeam(p.getName()).setSuffix(""); - boolean survivor=false; - if (this.plugin.PlayerinJob(p, "Explorer")) { - if (this.plugin.getJobLv("Explorer", p)>=10) { - //Check to see if our "fatal s urvivor" effect is available. - for (int i=0;i drops = e.getDrops(); - e.getDrops().clear(); - Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, new Runnable() { - @Override - public void run() { - for (int i=0;i=20) { - finalcost*=0.25; - } - if (mymoney>=mincost) { - p.sendMessage("You died. It will cost you $"+df.format(finalcost)+" to revive. To revive, type /revive me."); - } else { - p.sendMessage("You died. You do not have enough money in your bank to revive."); - p.sendMessage("Cost: $"+df.format(finalcost)+". If you want to revive, type "+ChatColor.AQUA+"/revive me"+ChatColor.WHITE+" when you have enough."); + this.plugin.getLogger().info("Player " + p.getName() + "'s getting withdrawed with " + balance + "$"); + Main.economy.withdrawPlayer(p.getName(), balance); + message = message.replaceAll("%amount", String.valueOf(balance)); } + p.sendMessage(message); } + if (this.plugin.PlayerinJob(p,"Explorer")) { + PersistentExplorerList eve = new PersistentExplorerList(p.getName()); + eve.event=2; + eve.expiretime=Main.SERVER_TICK_TIME+3600; + this.plugin.explorers.add(eve); + } + DecimalFormat df = new DecimalFormat("#0.00"); + double deathX = p.getLocation().getX(); + double deathY = p.getLocation().getY(); + double deathZ = p.getLocation().getZ(); + String deathWorld = p.getLocation().getWorld().getName(); + this.plugin.getAccountsConfig().set(p.getName() + ".deathpointX",Double.valueOf(deathX)); + this.plugin.getAccountsConfig().set(p.getName() + ".deathpointY",Double.valueOf(deathY)); + this.plugin.getAccountsConfig().set(p.getName() + ".deathpointZ",Double.valueOf(deathZ)); + this.plugin.getAccountsConfig().set(p.getName() + ".deathworld",String.valueOf(deathWorld)); + this.plugin.getAccountsConfig().set(p.getName() + ".revived",Boolean.valueOf(false)); + this.plugin.getAccountsConfig().set(p.getName() + ".revivetime",Long.valueOf(Main.SERVER_TICK_TIME)); + this.plugin.saveAccountsConfig(); + double mincost = this.plugin.getConfig().getDouble("revive-cost-rate"); + if (p.getBedSpawnLocation()!=null) { + mincost *= Math.abs(p.getBedSpawnLocation().getX()-deathX)+Math.abs(p.getBedSpawnLocation().getY()-deathY)+Math.abs(p.getBedSpawnLocation().getZ()-deathZ); + } else { + mincost *= Math.abs(Bukkit.getWorld("world").getSpawnLocation().getX()-deathX)+Math.abs(Bukkit.getWorld("world").getSpawnLocation().getY()-deathY)+Math.abs(Bukkit.getWorld("world").getSpawnLocation().getZ()-deathZ); + } + double mymoney = this.plugin.getAccountsConfig().getDouble(p.getName() + ".money"); + double finalcost = (mincost*this.plugin.getConfig().getDouble("revive-cost-rate")) + (mymoney*this.plugin.getConfig().getDouble("revive-cost-tax")); + if (this.plugin.PlayerinJob(p, "Explorer") && this.plugin.getJobLv("Explorer", p)>=20) { + finalcost*=0.25; + } + if (mymoney>=mincost) { + p.sendMessage("You died. It will cost you $"+df.format(finalcost)+" to revive. To revive, type /revive me."); + } else { + p.sendMessage("You died. You do not have enough money in your bank to revive."); + p.sendMessage("Cost: $"+df.format(finalcost)+". If you want to revive, type "+ChatColor.AQUA+"/revive me"+ChatColor.WHITE+" when you have enough."); + } } @EventHandler @@ -11693,14 +11818,15 @@ public void onEntityExpode(ExplosionPrimeEvent e) { } if (e.getAction()==Action.RIGHT_CLICK_AIR) { boolean largechest=false; - boolean smallchest=false; - int identifier=-1; + boolean smallchest=false; + boolean enderchest=false; + int identifier=-1; if (p.getItemInHand()!=null && (p.getItemInHand().getType()==Material.getMaterial(127))) { p.updateInventory(); e.setCancelled(true); return; } - if (p.getItemInHand()!=null && (p.getItemInHand().getType()==Material.CHEST || p.getItemInHand().getType()==Material.TRAPPED_CHEST)) { + if (p.getItemInHand()!=null && (p.getItemInHand().getType()==Material.CHEST || p.getItemInHand().getType()==Material.TRAPPED_CHEST || p.getItemInHand().getType()==Material.ENDER_CHEST)) { if (p.getItemInHand().getItemMeta().getLore()!=null) { //Check to see if the Lore contains anything. for (int i=0;i items = new ArrayList(); + screen=Bukkit.createInventory(p, 27, "Ender Item Cube #"+identifier); + for (int i=0;i<27;i++) { + //items.add(f.getItemStack("item-"+i)); + screen.setItem(i, f.getItemStack("item-"+i)); + } + this.plugin.saveItemCubeConfig(f, identifier); + } if (screen!=null) { p.closeInventory(); p.openInventory(screen);