commit b2ad01be7681ffddc1fd938eb2408cb1b0ae2048 Author: Liliesh Date: Wed Mar 18 18:54:23 2026 +0100 Added backup files diff --git a/.classpath b/.classpath new file mode 100755 index 0000000..b76d02c --- /dev/null +++ b/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100755 index 0000000..2b706da --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Inventory AdminShop + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/README.md b/README.md new file mode 100755 index 0000000..d14d7b2 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# inventory-admin-shop +Minecraft server plugin for Minecraft 1.8.7 and newer + +Used APIs: + - Spigot 1.12 + - Vault + +Plugin version: 1.0 diff --git a/bin/v01d/dev/ias/Main.class b/bin/v01d/dev/ias/Main.class new file mode 100755 index 0000000..9d749f0 Binary files /dev/null and b/bin/v01d/dev/ias/Main.class differ diff --git a/config.yml b/config.yml new file mode 100755 index 0000000..b552532 --- /dev/null +++ b/config.yml @@ -0,0 +1,222 @@ +######################### +# Inventory AdminShop # +# Made by: V01D # +# Version: 1.0 # +######################### + +#BUILDING BLOCKS ITEM AMOUNT +Amount: + stone: 32 + granite: 16 + polished-granite: 16 + diorite: 16 + polished-diorite: 16 + andesite: 16 + polished-andesite: 16 + grass: 16 + dirt: 64 + coarse-dirt: 16 + podzol: 16 + cobblestone: 32 + oak-wood-planks: 32 + spruce-wood-planks: 32 + birch-wood-planks: 32 + jungle-wood-planks: 32 + acacia-wood-planks: 32 + dark-oak-wood-planks: 32 + sand: 32 + red-sand: 16 + gravel: 16 + oak-wood: 16 + spruce-wood: 16 + birch-wood: 16 + jungle-wood: 16 + glass: 32 + lapis-lazuli-block: 8 + sandstone: 16 + chiseled-sandstone: 8 + smooth-sandstone: 16 + white-wool: 8 + orange-wool: 8 + magenta-wool: 8 + light-blue-wool: 8 + yellow-wool: 8 + lime-wool: 8 + pink-wool: 8 + gray-wool: 8 + light-gray-wool: 8 + cyan-wool: 8 + purple-wool: 8 + blue-wool: 8 + brown-wool: 8 + green-wool: 8 + red-wool: 8 + black-wool: 8 + gold-block: 5 + iron-block: 5 + stone-slab: 16 + sandstone-slab: 16 + cobblestone-slab: 16 + brick-slab: 16 + stone-brick-slab: 16 + nether-brick-slab: 16 + quartz-slab: 16 + BRICK: 32 + BOOKSHELF: 2 + MOSSY_COBBLESTONE: 8 + OBSIDIAN: 4 + WOOD_STAIRS: 16 + DIAMOND_BLOCK: 1 + COBBLESTONE_STAIRS: 8 + ICE: 6 + SNOW: 12 + CLAY: 12 + PUMPKIN: 1 + NETHERRACK: 16 + SOUL_SAND: 16 + GLOWSTONE: 4 + JACK_O_LANTERN: 1 + STAINED_GLASS_0: 8 + STAINED_GLASS_1: 8 + STAINED_GLASS_2: 8 + STAINED_GLASS_3: 8 + STAINED_GLASS_4: 8 + STAINED_GLASS_5: 8 + STAINED_GLASS_6: 8 + STAINED_GLASS_7: 8 + STAINED_GLASS_8: 8 + STAINED_GLASS_9: 8 + STAINED_GLASS_10: 8 + STAINED_GLASS_11: 8 + STAINED_GLASS_12: 8 + STAINED_GLASS_13: 8 + STAINED_GLASS_14: 8 + STAINED_GLASS_15: 8 + SMOOTH_BRICK_0: 16 + SMOOTH_BRICK_1: 16 + SMOOTH_BRICK_2: 16 + SMOOTH_BRICK_3: 16 + MELON_BLOCK: 1 + BRICK_STAIRS: 32 + SMOOTH_STAIRS: 32 + MYCEL: 8 + NETHER_BRICK: 24 + NETHER_BRICK_STAIRS: 24 + ENDER_STONE: 16 + WOOD_STEP_0: 24 + WOOD_STEP_1: 24 + WOOD_STEP_2: 24 + WOOD_STEP_3: 24 + + +#DECORATION BLOCKS PRICES + oak-sapling: 8 + + +#BUILDING BLOCKS ITEM PRICES +Price: + stone: 5 + granite: 3 + polished-granite: 3 + diorite: 3 + polished-diorite: 3 + andesite: 3 + polished-andesite: 3 + grass: 5 + dirt: 2 + coarse-dirt: 4 + podzol: 5 + cobblestone: 2 + oak-wood-planks: 3 + spruce-wood-planks: 3 + birch-wood-planks: 3 + jungle-wood-planks: 3 + acacia-wood-planks: 3 + dark-oak-wood-planks: 3 + sand: 5 + red-sand: 6 + gravel: 3 + oak-wood: 12 + spruce-wood: 12 + birch-wood: 12 + jungle-wood: 12 + glass: 8 + lapis-lazuli-block: 14 + sandstone: 10 + chiseled-sandstone: 10 + smooth-sandstone: 10 + white-wool: 10 + orange-wool: 15 + magenta-wool: 15 + light-blue-wool: 12 + yellow-wool: 11 + lime-wool: 12 + pink-wool: 11 + gray-wool: 12 + light-gray-wool: 12 + cyan-wool: 12 + purple-wool: 12 + blue-wool: 12 + brown-wool: 12 + green-wool: 12 + red-wool: 12 + black-wool: 12 + gold-block: 25 + iron-block: 20 + stone-slab: 10 + sandstone-slab: 12 + cobblestone-slab: 12 + brick-slab: 12 + stone-brick-slab: 12 + nether-brick-slab: 12 + quartz-slab: 20 + BRICK: 15 + BOOKSHELF: 10 + MOSSY_COBBLESTONE: 12 + OBSIDIAN: 15 + WOOD_STAIRS: 6 + DIAMOND_BLOCK: 90 + COBBLESTONE_STAIRS: 4 + ICE: 12 + SNOW: 5 + CLAY: 5 + PUMKPIN: 5 + NETHERRACK: 4 + SOUL_SAND: 8 + GLOWSTONE: 8 + JACK_O_LANTERN: 2 + STAINED_GLASS_0: 20 + STAINED_GLASS_1: 20 + STAINED_GLASS_2: 20 + STAINED_GLASS_3: 20 + STAINED_GLASS_4: 20 + STAINED_GLASS_5: 20 + STAINED_GLASS_6: 20 + STAINED_GLASS_7: 20 + STAINED_GLASS_8: 20 + STAINED_GLASS_9: 20 + STAINED_GLASS_10: 20 + STAINED_GLASS_11: 20 + STAINED_GLASS_12: 20 + STAINED_GLASS_13: 20 + STAINED_GLASS_14: 20 + STAINED_GLASS_15: 20 + SMOOTH_BRICK_0: 10 + SMOOTH_BRICK_1: 10 + SMOOTH_BRICK_2: 10 + SMOOTH_BRICK_3: 10 + MELON_BLOCK: 2 + BRICK_STAIRS: 16 + SMOOTH_STAIRS: 16 + MYCEL: 32 + NETHER_BRICK: 16 + NETHER_BRICK_STAIRS: 16 + ENDER_STONE: 12 + WOOD_STEP_0: 6 + WOOD_STEP_1: 6 + WOOD_STEP_2: 6 + WOOD_STEP_3: 6 + + +#DECORATION BLOCKS AMOUNT + oak-sapling: 5 \ No newline at end of file diff --git a/plugin.yml b/plugin.yml new file mode 100755 index 0000000..d1f40fc --- /dev/null +++ b/plugin.yml @@ -0,0 +1,23 @@ +name: InventoryAdminShop +main: v01d.dev.ias.Main +author: V01D +version: 1.0 +commands: + invadminshop: + usage: / + description: Views the Plugin Infos + invadminshop-help: + usage: / + description: Views the Plugin Help + permission: invadminshop.help + permission-message: You have not enough permissions to open the Plugin Help + invadminshop-reload: + usage: / + description: Reloads the Plugin Config + permission: invadminshop.reload + permission-message: You have not enough permissions to reload the Plugin Config + adminshop: + usage: / + description: Opens the AdminShop Inventory + permission: invadminshop.open + permission-message: You have not enough permissions to open the AdminShop \ No newline at end of file diff --git a/src/v01d/dev/ias/Main.java b/src/v01d/dev/ias/Main.java new file mode 100755 index 0000000..c19f735 --- /dev/null +++ b/src/v01d/dev/ias/Main.java @@ -0,0 +1,3207 @@ +package v01d.dev.ias; + + +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.plugin.RegisteredServiceProvider; +import org.bukkit.plugin.java.JavaPlugin; + +import net.milkbowl.vault.chat.Chat; +import net.milkbowl.vault.economy.Economy; +import net.milkbowl.vault.economy.EconomyResponse; +import net.milkbowl.vault.permission.Permission; + + + +public class Main +extends JavaPlugin +implements Listener +{ + + //VAULT SECTION + + private static final Logger log = Logger.getLogger("Minecraft"); + private static Economy econ = null; + private static Permission perms = null; + private static Chat chat = null; + + + //INVENTORYS + private Inventory menu = null; + private Inventory build = null; + private Inventory build2 = null; + private Inventory build3 = null; + private Inventory deco = null; + + + public void onEnable() { + //Config + this.saveDefaultConfig(); + + this.getServer().getPluginManager().registerEvents(this, this); + + + //VAULT LOAD + if (!setupEconomy() ) { + log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName())); + getServer().getPluginManager().disablePlugin(this); + return; + } + setupPermissions(); + setupChat(); + } + + private boolean setupEconomy() { + if (getServer().getPluginManager().getPlugin("Vault") == null) { + return false; + } + RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Economy.class); + if (rsp == null) { + return false; + } + econ = rsp.getProvider(); + return econ != null; + } + + private boolean setupChat() { + RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Chat.class); + chat = rsp.getProvider(); + return chat != null; + } + + private boolean setupPermissions() { + RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Permission.class); + perms = rsp.getProvider(); + return perms != null; + + } + + //SERVER CURRENCY + String servercurrency = "Bucks"; + + FileConfiguration cfg = getConfig(); + + //IMPORT BUILDING BLOCK PRICES + int stoneprice = getConfig().getInt("Price.stone"); + int graniteprice = getConfig().getInt("Price.granite"); + int granite2price = getConfig().getInt("Price.polished-granite"); + int dioriteprice = getConfig().getInt("Price.diorite"); + int diorite2price = getConfig().getInt("Price.polished-diorite"); + int andesiteprice = getConfig().getInt("Price.andesite"); + int andesite2price = getConfig().getInt("Price.polished-andesite"); + int grassprice = getConfig().getInt("Price.grass"); + int dirtprice = getConfig().getInt("Price.dirt"); + int dirt2price = getConfig().getInt("Price.coarse-dirt"); + int dirt3price = getConfig().getInt("Price.podzol"); + int cobbleprice = getConfig().getInt("Price.cobblestone"); + int woodprice = getConfig().getInt("Price.oak-wood-planks"); + int wood1price = getConfig().getInt("Price.spruce-wood-planks"); + int wood2price = getConfig().getInt("Price.birch-wood-planks"); + int wood3price = getConfig().getInt("Price.jungle-wood-planks"); + int wood4price = getConfig().getInt("Price.acacia-wood-planks"); + int wood5price = getConfig().getInt("Price.dark-oak-wood-planks"); + int sandprice = getConfig().getInt("Price.sand"); + int sand1price = getConfig().getInt("Price.red-sand"); + int gravelprice = getConfig().getInt("Price.gravel"); + int logprice = getConfig().getInt("Price.oak-wood"); + int log1price = getConfig().getInt("Price.spruce-wood"); + int log2price = getConfig().getInt("Price.birch-wood"); + int log3price = getConfig().getInt("Price.jungle-wood"); + int glassprice = getConfig().getInt("Price.glass"); + int lapisblockprice = getConfig().getInt("Price.lapis-lazuli-block"); + int sandstoneprice = getConfig().getInt("Price.sandstone"); + int sandstone2price = getConfig().getInt("Price.chiseled-sandstone"); + int sandstone3price = getConfig().getInt("Price.smooth-sandstone"); + int woolprice = getConfig().getInt("Price.white-wool"); + int wool1price = getConfig().getInt("Price.orange-wool"); + int wool2price = getConfig().getInt("Price.magenta-wool"); + int wool3price = getConfig().getInt("Price.light-blue-wool"); + int wool4price = getConfig().getInt("Price.yellow-wool"); + int wool5price = getConfig().getInt("Price.lime-wool"); + int wool6price = getConfig().getInt("Price.pink-wool"); + int wool7price = getConfig().getInt("Price.gray-wool"); + int wool8price = getConfig().getInt("Price.light-gray-wool"); + int wool9price = getConfig().getInt("Price.cyan-wool"); + int wool10price = getConfig().getInt("Price.purple-wool"); + int wool11price = getConfig().getInt("Price.blue-wool"); + int wool12price = getConfig().getInt("Price.brown-wool"); + int wool13price = getConfig().getInt("Price.green-wool"); + int wool14price = getConfig().getInt("Price.red-wool"); + int wool15price = getConfig().getInt("Price.black-wool"); + int goldblockprice = getConfig().getInt("Price.gold-block"); + int ironblockprice = getConfig().getInt("Price.iron-block"); + int stoneslabprice = getConfig().getInt("Price.stone-slab"); + int sandstoneslabprice = getConfig().getInt("Price.sandstone-slab"); + int cobblestoneslabprice = getConfig().getInt("Price.cobblestone-slab"); + int brickslabprice = getConfig().getInt("Price.brick-slab"); + int stonebrickslabprice = getConfig().getInt("Price.stone-brick-slab"); + int netherbrickslabprice = getConfig().getInt("Price.nether-brick-slab"); + int quartzslabprice = getConfig().getInt("Price.quartz-slab"); + + + + + + + //IMPORT DECORATION BLOCK PRICES + int saplingprice = getConfig().getInt("Price.oak-sapling"); + + + + //IMPORT BUILDING BLOCK AMOUNT + int stoneamount = getConfig().getInt("Amount.stone"); + int graniteamount = getConfig().getInt("Amount.granite"); + int granite2amount = getConfig().getInt("Amount.polished-granite"); + int dioriteamount = getConfig().getInt("Amount.diorite"); + int diorite2amount = getConfig().getInt("Amount.polished-diorite"); + int andesiteamount = getConfig().getInt("Amount.andesite"); + int andesite2amount = getConfig().getInt("Amount.polished-andesite"); + int grassamount = getConfig().getInt("Amount.grass"); + int dirtamount = getConfig().getInt("Amount.dirt"); + int dirt2amount = getConfig().getInt("Amount.coarse-dirt"); + int dirt3amount = getConfig().getInt("Amount.podzol"); + int cobbleamount = getConfig().getInt("Amount.cobblestone"); + int woodamount = getConfig().getInt("Amount.oak-wood-planks"); + int wood1amount = getConfig().getInt("Amount.spruce-wood-planks"); + int wood2amount = getConfig().getInt("Amount.birch-wood-planks"); + int wood3amount = getConfig().getInt("Amount.jungle-wood-planks"); + int wood4amount = getConfig().getInt("Amount.acacia-wood-planks"); + int wood5amount = getConfig().getInt("Amount.dark-oak-wood-planks"); + int sandamount = getConfig().getInt("Amount.sand"); + int sand1amount = getConfig().getInt("Amount.red-sand"); + int gravelamount = getConfig().getInt("Amount.gravel"); + int logamount = getConfig().getInt("Amount.oak-wood"); + int log1amount = getConfig().getInt("Amount.spruce-wood"); + int log2amount = getConfig().getInt("Amount.birch-wood"); + int log3amount = getConfig().getInt("Amount.jungle-wood"); + int glassamount = getConfig().getInt("Amount.glass"); + int lapisblockamount = getConfig().getInt("Amount.lapis-lazuli-block"); + int sandstoneamount = getConfig().getInt("Amount.sandstone"); + int sandstone2amount = getConfig().getInt("Amount.chiseled-sandstone"); + int sandstone3amount = getConfig().getInt("Amount.smooth-sandstone"); + int woolamount = getConfig().getInt("Amount.white-wool"); + int wool1amount = getConfig().getInt("Amount.orange-wool"); + int wool2amount = getConfig().getInt("Amount.magenta-wool"); + int wool3amount = getConfig().getInt("Amount.light-blue-wool"); + int wool4amount = getConfig().getInt("Amount.yellow-wool"); + int wool5amount= getConfig().getInt("Amount.lime-wool"); + int wool6amount = getConfig().getInt("Amount.pink-wool"); + int wool7amount = getConfig().getInt("Amount.gray-wool"); + int wool8amount = getConfig().getInt("Amount.light-gray-wool"); + int wool9amount = getConfig().getInt("Amount.cyan-wool"); + int wool10amount = getConfig().getInt("Amount.purple-wool"); + int wool11amount = getConfig().getInt("Amount.blue-wool"); + int wool12amount = getConfig().getInt("Amount.brown-wool"); + int wool13amount = getConfig().getInt("Amount.green-wool"); + int wool14amount = getConfig().getInt("Amount.red-wool"); + int wool15amount = getConfig().getInt("Amount.black-wool"); + int goldblockamount = getConfig().getInt("Amount.gold-block"); + int ironblockamount = getConfig().getInt("Amount.iron-block"); + int stoneslabamount = getConfig().getInt("Amount.stone-slab"); + int sandstoneslabamount = getConfig().getInt("Amount.sandstone-slab"); + int cobblestoneslabamount = getConfig().getInt("Amount.cobblestone-slab"); + int brickslabamount = getConfig().getInt("Amount.brick-slab"); + int stonebrickslabamount = getConfig().getInt("Amount.stone-brick-slab"); + int netherbrickslabamount = getConfig().getInt("Amount.nether-brick-slab"); + int quartzslabamount = getConfig().getInt("Amount.quartz-slab"); + + + + + + + //IMPORT DECORATION BLOCKS AMOUNT + int saplingamount = getConfig().getInt("Amount.oak-sapling"); + + //PLUGIN PREFIX + String shopprefix = ChatColor.GRAY + "[" + ChatColor.GOLD + "" + ChatColor.BOLD + "AdminShop" + ChatColor.GRAY + "]"; + + //ITEM CHECKS + + //CHECK MAIN MENU + @SuppressWarnings({ "deprecation", "unused" }) + @EventHandler + public void onInventoryClick(InventoryClickEvent e) { + Player p = (Player) e.getWhoClicked(); + + //INVENTORYS + build = p.getPlayer().getServer().createInventory(null, 54, "§3§lBuilding Blocks §2Page 1"); + build2 = p.getPlayer().getServer().createInventory(null, 54, "§3§lBuilding Blocks §2Page 2"); + build3 = p.getPlayer().getServer().createInventory(null, 54, "§3§lBuilding Blocks §2Page 3"); + deco = p.getPlayer().getServer().createInventory(null, 54, "§3§lDecoration Blocks §2Page 1"); + + + //BUILD INV ITEM LORES + List stoneLore = new ArrayList(); + List graniteLore = new ArrayList(); + List granite2Lore = new ArrayList(); + List dioriteLore = new ArrayList(); + List diorite2Lore = new ArrayList(); + List andesiteLore = new ArrayList(); + List andesite2Lore = new ArrayList(); + List grassLore = new ArrayList(); + List dirtLore = new ArrayList(); + List dirt2Lore = new ArrayList(); + List dirt3Lore = new ArrayList(); + List cobbleLore = new ArrayList(); + List woodLore = new ArrayList(); + List wood1Lore = new ArrayList(); + List wood2Lore = new ArrayList(); + List wood3Lore = new ArrayList(); + List wood4Lore = new ArrayList(); + List wood5Lore = new ArrayList(); + List sandLore = new ArrayList(); + List sand1Lore = new ArrayList(); + List gravelLore = new ArrayList(); + List logLore = new ArrayList(); + List log1Lore = new ArrayList(); + List log2Lore = new ArrayList(); + List log3Lore = new ArrayList(); + List glassLore = new ArrayList(); + List lapisblockLore = new ArrayList(); + List sandstoneLore = new ArrayList(); + List sandstone2Lore = new ArrayList(); + List sandstone3Lore = new ArrayList(); + List woolLore = new ArrayList(); + List wool1Lore = new ArrayList(); + List wool2Lore = new ArrayList(); + List wool3Lore = new ArrayList(); + List wool4Lore = new ArrayList(); + List wool5Lore = new ArrayList(); + List wool6Lore = new ArrayList(); + List wool7Lore = new ArrayList(); + List wool8Lore = new ArrayList(); + List wool9Lore = new ArrayList(); + List wool10Lore = new ArrayList(); + List wool11Lore = new ArrayList(); + List wool12Lore = new ArrayList(); + List wool13Lore = new ArrayList(); + List wool14Lore = new ArrayList(); + List wool15Lore = new ArrayList(); + List goldblockLore = new ArrayList(); + List ironblockLore = new ArrayList(); + List stoneslabLore = new ArrayList(); + List sandstoneslabLore = new ArrayList(); + List cobblestoneslabLore = new ArrayList(); + List brickslabLore = new ArrayList(); + List stonebrickslabLore = new ArrayList(); + List netherbrickslabLore = new ArrayList(); +ew ArrayList(); + List wool8Lore = new ArrayList(); + List wool9Lore = new ArrayList(); + List wool10Lore = new ArrayList(); + List wool11Lore = new ArrayList(); + List wool12Lore = new ArrayList(); + List wool13Lore = new ArrayList(); + List wool14Lore = new ArrayList(); + List wool15Lore = new ArrayList(); + List goldblockLore = new ArrayList(); + List ironblockLore = new ArrayList(); + List stoneslabLore = new ArrayList(); + List sandstoneslabLore = new ArrayList(); + List cobblestoneslabLore = new ArrayList(); + List brickslabLore = new ArrayList(); + List stonebrickslabLore = new ArrayList(); + List quartzslabLore = new ArrayList(); + List bricksLore = new ArrayList(); + List bookshelfLore = new ArrayList(); + List mossstoneLore = new ArrayList(); + List obsidianLore = new ArrayList(); + List woodstairsLore = new ArrayList(); + List diablockLore = new ArrayList(); + List cobblestairsLore = new ArrayList(); + List iceLore = new ArrayList(); + List snowLore = new ArrayList(); + List clayLore = new ArrayList(); + List pumpkinLore = new ArrayList(); + List netherrackLore = new ArrayList(); + List soulsandLore = new ArrayList(); + List glowstoneLore = new ArrayList(); + List pumpkin2Lore = new ArrayList(); + List glass0Lore = new ArrayList(); + List glass1Lore = new ArrayList(); + List glass2Lore = new ArrayList(); + List glass3Lore = new ArrayList(); + List glass4Lore = new ArrayList(); + List glass5Lore = new ArrayList(); + List glass6Lore = new ArrayList(); + List glass7Lore = new ArrayList(); + List glass8Lore = new ArrayList(); + List glass9Lore = new ArrayList(); + List glass10Lore = new ArrayList(); + List glass11Lore = new ArrayList(); + List glass12Lore = new ArrayList(); + List glass13Lore = new ArrayList(); + List glass14Lore = new ArrayList(); + List glass15Lore = new ArrayList(); + List stonebrickLore = new ArrayList(); + List mossstonebrickLore = new ArrayList(); + List crackstonebrickLore = new ArrayList(); + List chistonebrickLore = new ArrayList(); + List melonblockLore = new ArrayList(); + List brickstairLore = new ArrayList(); + List stonebrickstairLore = new ArrayList(); + List myceliumLore = new ArrayList(); + List netherbrickLore = new ArrayList(); + List netherbrickstairLore = new ArrayList(); + List endstoneLore = new ArrayList(); + List woodslabLore = new ArrayList(); + List woodslab1Lore = new ArrayList(); + List woodslab2Lore = new ArrayList(); + List woodslab3Lore = new ArrayList(); + + + + //DECO INV ITEM LORES + List saplingLore = new ArrayList(); + + + //MISC + + //MISC - NONE + ItemStack none = new ItemStack(Material.BLACK_STAINED_GLASS_PANE, 1); + ItemMeta noneMeta = none.getItemMeta(); + noneMeta.setDisplayName("§4"); + none.setItemMeta(noneMeta); + + //MISC - PAGE 1 + ItemStack page1 = new ItemStack(Material.PAPER, 1); + ItemMeta page1Meta = page1.getItemMeta(); + page1Meta.setDisplayName("§lPAGE 1"); + page1.setItemMeta(page1Meta); + + //MISC - PAGE 2 + ItemStack page2 = new ItemStack(Material.PAPER, 2); + ItemMeta page2Meta = page2.getItemMeta(); + page2Meta.setDisplayName("§lPAGE 2"); + page2.setItemMeta(page2Meta); + + //MISC - PAGE 3 + ItemStack page3 = new ItemStack(Material.PAPER, 3); + ItemMeta page3Meta = page3.getItemMeta(); + page3Meta.setDisplayName("§lPAGE §"); + page3.setItemMeta(page3Meta); + + + + //BUTTONS + //BUTTON - NEXT + ItemStack next = new ItemStack(Material.DOUBLE_PLANT, 1); + ItemMeta nextMeta = next.getItemMeta(); + nextMeta.setDisplayName("§lNEXT PAGE"); + next.setItemMeta(nextMeta); + + //BUTTON - PREVIOUS + ItemStack prev = new ItemStack(Material.DOUBLE_PLANT, 1); + ItemMeta prevMeta = prev.getItemMeta(); + prevMeta.setDisplayName("§lPREVIOUS PAGE"); + prev.setItemMeta(prevMeta); + + //BUTTON - MAIN MENU + ItemStack main = new ItemStack(Material.REDSTONE, 1); + ItemMeta mainMeta = main.getItemMeta(); + mainMeta.setDisplayName("§lMAIN MENU"); + main.setItemMeta(mainMeta); + + //BUTTON - EXIT + ItemStack exit = new ItemStack(Material.BARRIER, 1); + ItemMeta exitMeta = exit.getItemMeta(); + exitMeta.setDisplayName("§lEXIT"); + exit.setItemMeta(exitMeta); + + + //BLOCKS + //BLOCK - STONE + ItemStack stone = new ItemStack(Material.STONE, stoneamount); + ItemMeta stoneMeta = stone.getItemMeta(); + stoneMeta.setDisplayName("§bStone"); + stoneLore.add("§2Price: §4" + stoneprice); + stoneLore.add("§2Amount: §4" + stoneamount); + stoneMeta.setLore(stoneLore); + stone.setItemMeta(stoneMeta); + + //BLOCK - GRANITE + ItemStack granite = new ItemStack(Material.STONE, graniteamount, (short)1); + ItemMeta graniteMeta = granite.getItemMeta(); + graniteMeta.setDisplayName("§bGranite"); + graniteLore.add("§2Price: §4" + graniteprice); + graniteLore.add("§2Amount: §4" + graniteamount); + graniteMeta.setLore(graniteLore); + granite.setItemMeta(graniteMeta); + + //BLOCK - POLISHED GRANITE + ItemStack granite2 = new ItemStack(Material.STONE, granite2amount, (short) 2); + ItemMeta granite2Meta = granite2.getItemMeta(); + granite2Meta.setDisplayName("§bPolished Granite"); + granite2Lore.add("§2Price: §4" + granite2price); + granite2Lore.add("§2Amount: §4" + granite2amount); + granite2Meta.setLore(granite2Lore); + granite2.setItemMeta(granite2Meta); + + //BLOCK - DIORITE + ItemStack diorite = new ItemStack(Material.STONE, dioriteamount, (short) 3); + ItemMeta dioriteMeta = diorite.getItemMeta(); + dioriteMeta.setDisplayName("§bDiorite"); + dioriteLore.add("§2Price: §4 " + dioriteprice); + dioriteLore.add("§2Amount: §4 " + dioriteamount); + dioriteMeta.setLore(dioriteLore); + diorite.setItemMeta(dioriteMeta); + + //BLOCK - POLISHED DIORITE + ItemStack diorite2 = new ItemStack(Material.STONE, diorite2amount, (short) 4); + ItemMeta diorite2Meta = diorite2.getItemMeta(); + diorite2Meta.setDisplayName("§bPolished Diorite"); + diorite2Lore.add("§2Price: §4 " + diorite2price); + diorite2Lore.add("§2Amount: §4 " + diorite2amount); + diorite2Meta.setLore(diorite2Lore); + diorite2.setItemMeta(diorite2Meta); + + //BLOCK - ANDESITE + ItemStack andesite = new ItemStack(Material.STONE, andesiteamount, (short) 5); + ItemMeta andesiteMeta = andesite.getItemMeta(); + andesiteMeta.setDisplayName("§bAndesite"); + andesiteLore.add("§2Price: §4 " + andesiteprice); + andesiteLore.add("§2Amount: §4 " + andesiteamount); + andesiteMeta.setLore(andesiteLore); + andesite.setItemMeta(andesiteMeta); + + //BLOCK - POLISHED ANDESITE + ItemStack andesite2 = new ItemStack(Material.STONE , andesite2amount, (short) 6); + ItemMeta andesite2Meta = andesite2.getItemMeta(); + andesite2Meta.setDisplayName("§bPolished Andesite"); + andesite2Lore.add("§2Price: §4 " + andesite2price); + andesite2Lore.add("§2Amount: §4 " + andesite2amount); + andesite2Meta.setLore(andesite2Lore); + andesite2.setItemMeta(andesite2Meta); + + //BLOCK - GRASS + ItemStack grass = new ItemStack(Material.GRASS, grassamount); + ItemMeta grassMeta = grass.getItemMeta(); + grassMeta.setDisplayName("§bGrass Block"); + grassLore.add("§2Price: §4" + grassprice); + grassLore.add("§2Amount: §4" + grassamount); + grassMeta.setLore(grassLore); + grass.setItemMeta(grassMeta); + + //BLOCK - DIRT + ItemStack dirt = new ItemStack(Material.DIRT, dirtamount); + ItemMeta dirtMeta = dirt.getItemMeta(); + dirtMeta.setDisplayName("§bDirt"); + dirtLore.add("§2Price: §4" + dirtprice); + dirtLore.add("§2Price: §4" + dirtamount); + dirtMeta.setLore(dirtLore); + dirt.setItemMeta(dirtMeta); + + //BLOCK - COARSE DIRT + ItemStack dirt2 = new ItemStack(Material.DIRT, dirt2amount, (short) 1); + ItemMeta dirt2Meta = dirt2.getItemMeta(); + dirt2Meta.setDisplayName("§bCoarse Dirt"); + dirt2Lore.add("§2Price: §4" + dirt2price); + dirt2Lore.add("§2Amount: §4" + dirt2amount); + dirt2Meta.setLore(dirt2Lore); + dirt2.setItemMeta(dirt2Meta); + + //BLOCK - PODZOL + ItemStack dirt3 = new ItemStack(Material.DIRT, dirt3amount, (short) 2); + ItemMeta dirt3Meta = dirt3.getItemMeta(); + dirt3Meta.setDisplayName("§bPodzol"); + dirt3Lore.add("§2Price: §4" + dirt3price); + dirt3Lore.add("§2Amount: §4" + dirt3amount); + dirt3Meta.setLore(dirt3Lore); + dirt3.setItemMeta(dirt3Meta); + + //BLOCK - COBBLESTONE + ItemStack cobble = new ItemStack(Material.COBBLESTONE, cobbleamount); + ItemMeta cobbleMeta = cobble.getItemMeta(); + cobbleMeta.setDisplayName("§bCobblestone"); + cobbleLore.add("§2Price: §4" + cobbleprice); + cobbleLore.add("§2Amount: §4" + cobbleamount); + cobbleMeta.setLore(cobbleLore); + cobble.setItemMeta(cobbleMeta); + + //BLOCK - OAK WOOD PLANKS + ItemStack wood = new ItemStack(Material.WOOD, woodamount); + ItemMeta woodMeta = wood.getItemMeta(); + woodMeta.setDisplayName("§bOak Wood Planks"); + woodLore.add("§2Price: §4" + woodprice); + woodLore.add("§2Amount: §4" + woodamount); + woodMeta.setLore(woodLore); + wood.setItemMeta(woodMeta); + + //BLOCK - SPRUCE WOOD PLANKS + ItemStack wood1 = new ItemStack(Material.WOOD, wood1amount, (short) 1); + ItemMeta wood1Meta = wood1.getItemMeta(); + wood1Meta.setDisplayName("§bSpruce Wood Planks"); + wood1Lore.add("§2Price: §4" + wood1price); + wood1Lore.add("§2Amount: §4" + wood1amount); + wood1Meta.setLore(wood1Lore); + wood1.setItemMeta(wood1Meta); + + //BLOCK - BIRCH WOOD PLANKS + ItemStack wood2 = new ItemStack(Material.WOOD, wood2amount, (short) 2); + ItemMeta wood2Meta = wood2.getItemMeta(); + wood2Meta.setDisplayName("§bBirch Wood Planks"); + wood2Lore.add("§2Price: §4" + wood2price); + wood2Lore.add("§2Amount: §4" + wood2amount); + wood2Meta.setLore(wood2Lore); + wood2.setItemMeta(wood2Meta); + + //BLOCK - JUNGLE WOOD PLANKS + ItemStack wood3 = new ItemStack(Material.WOOD, wood3amount, (short) 3); + ItemMeta wood3Meta = wood3.getItemMeta(); + wood3Meta.setDisplayName("§bJungle Wood Planks"); + wood3Lore.add("§2Price: §4" + wood3price); + wood3Lore.add("§2Amount: §4" + wood3amount); + wood3Meta.setLore(wood3Lore); + wood3.setItemMeta(wood3Meta); + + //BLOCK - ACACIA WOOD PLANKS + ItemStack wood4 = new ItemStack(Material.WOOD, wood4amount, (short) 4); + ItemMeta wood4Meta = wood4.getItemMeta(); + wood4Meta.setDisplayName("§bAcacia Wood Planks"); + wood4Lore.add("§2Price: §4" + wood4price); + wood4Lore.add("§2Amount: §4" + wood4amount); + wood4Meta.setLore(wood4Lore); + wood4.setItemMeta(wood4Meta); + + //BLOCK - DARK OAK WOOD PLANKS + ItemStack wood5 = new ItemStack(Material.WOOD, wood5amount, (short) 5); + ItemMeta wood5Meta = wood5.getItemMeta(); + wood5Meta.setDisplayName("§bDark Oak Wood Planks"); + wood5Lore.add("§2Price: §4" + wood5price); + wood5Lore.add("§2Amount: §4" + wood5amount); + wood5Meta.setLore(wood5Lore); + wood5.setItemMeta(wood5Meta); + + //BLOCK - SAND + ItemStack sand = new ItemStack(Material.SAND, sandamount); + ItemMeta sandMeta = sand.getItemMeta(); + sandMeta.setDisplayName("§bSand"); + sandLore.add("§2Price: §4" + sandprice); + sandLore.add("§2Amount: §4" + sandamount); + sandMeta.setLore(sandLore); + sand.setItemMeta(sandMeta); + + //BLOCK - RED SAND + ItemStack sand1 = new ItemStack(Material.SAND, sand1amount, (short) 1); + ItemMeta sand1Meta = sand1.getItemMeta(); + sand1Meta.setDisplayName("§bRed Sand"); + sand1Lore.add("§2Price: §4" + sand1price); + sand1Lore.add("§2Amount: §4" + sand1amount); + sand1Meta.setLore(sand1Lore); + sand1.setItemMeta(sand1Meta); + + //BLOCK - GRAVEL + ItemStack gravel = new ItemStack(Material.GRAVEL, gravelamount); + ItemMeta gravelMeta = gravel.getItemMeta(); + gravelMeta.setDisplayName("§bGravel"); + gravelLore.add("§2Price: §4" + gravelprice); + gravelLore.add("§2Amount: §4" + gravelamount); + gravelMeta.setLore(gravelLore); + gravel.setItemMeta(gravelMeta); + + //BLOCK - OAK WOOD + ItemStack log = new ItemStack(Material.LOG, logamount, (short) 0); + ItemMeta logMeta = log.getItemMeta(); + logMeta.setDisplayName("§bOak Wood"); + logLore.add("§2Price: §4" + logprice); + logLore.add("§2Amount: §4" + logamount); + logMeta.setLore(logLore); + log.setItemMeta(logMeta); + + //BLOCK - SPRUCE WOOD + ItemStack log1 = new ItemStack(Material.LOG, log1amount, (short) 1); + ItemMeta log1Meta = log1.getItemMeta(); + log1Meta.setDisplayName("§bSpruce Wood"); + log1Lore.add("§2Price: §4" + log1price); + log1Lore.add("§2Amount: §4" + log1amount); + log1Meta.setLore(log1Lore); + log1.setItemMeta(log1Meta); + + //BLOCK - BIRCH WOOD + ItemStack log2 = new ItemStack(Material.LOG, log2amount, (short) 2); + ItemMeta log2Meta = log2.getItemMeta(); + log2Meta.setDisplayName("§bBirch Wood"); + log2Lore.add("§2Price: §4" + log2price); + log2Lore.add("§2Amount: §4" + log2amount); + log2Meta.setLore(log2Lore); + log2.setItemMeta(log2Meta); + + //BLOCK - JUNGLE WOOD + ItemStack log3 = new ItemStack(Material.LOG, log3amount, (short) 3); + ItemMeta log3Meta = log3.getItemMeta(); + log3Meta.setDisplayName("§bJungle Wood"); + log3Lore.add("§2Price: §4" + log3price); + log3Lore.add("§2Amount: §4" + log3amount); + log3Meta.setLore(log3Lore); + log3.setItemMeta(log3Meta); + + //BLOCK - GLASS + ItemStack glass = new ItemStack(Material.GLASS, glassamount); + ItemMeta glassMeta = glass.getItemMeta(); + glassMeta.setDisplayName("§bGlass"); + glassLore.add("§2Price: §4" + glassprice); + glassLore.add("§2Amount: §4" + glassamount); + glassMeta.setLore(glassLore); + glass.setItemMeta(glassMeta); + + //BLOCK - LAPIS LAZULI + ItemStack lapisblock = new ItemStack(Material.LAPIS_BLOCK, lapisblockamount); + ItemMeta lapisblockMeta = lapisblock.getItemMeta(); + lapisblockMeta.setDisplayName("§bLapis Lazuli Block"); + lapisblockLore.add("§2Price: §4" + lapisblockprice); + lapisblockLore.add("§2Amount: §4" + lapisblockamount); + lapisblockMeta.setLore(lapisblockLore); + lapisblock.setItemMeta(lapisblockMeta); + + //BLOCK - SANDSTONE + ItemStack sandstone = new ItemStack(Material.SANDSTONE, sandstoneamount); + ItemMeta sandstoneMeta = sandstone.getItemMeta(); + sandstoneMeta.setDisplayName("§bSandstone"); + sandstoneLore.add("§2Price: §4" + sandstoneprice); + sandstoneLore.add("§2Amount: §4" + sandstoneamount); + sandstoneMeta.setLore(sandstoneLore); + sandstone.setItemMeta(sandstoneMeta); + + //BLOCK - CHISELED SANDSTONE + ItemStack sandstone2 = new ItemStack(Material.SANDSTONE, sandstone2amount, (short) 1); + ItemMeta sandstone2Meta = sandstone2.getItemMeta(); + sandstone2Meta.setDisplayName("§bChiseled Sandstone"); + sandstone2Lore.add("§2Price: §4" + sandstone2price); + sandstone2Lore.add("§2Amount: §4" + sandstone2amount); + sandstone2Meta.setLore(sandstone2Lore); + sandstone2.setItemMeta(sandstone2Meta); + + //BLOCK - SMOOTH SANDSTONE + ItemStack sandstone3 = new ItemStack(Material.SANDSTONE, sandstone3amount, (short) 2); + ItemMeta sandstone3Meta = sandstone3.getItemMeta(); + sandstone3Meta.setDisplayName("§bSmooth Sandstone"); + sandstone3Lore.add("§2Price: §4" + sandstone3price); + sandstone3Lore.add("§2Amount: §4" + sandstone3amount); + sandstone3Meta.setLore(sandstone3Lore); + sandstone3.setItemMeta(sandstone3Meta); + + //BLOCK - WHITE WOOL + ItemStack wool = new ItemStack(Material.WOOL, woolamount); + ItemMeta woolMeta = wool.getItemMeta(); + woolMeta.setDisplayName("§bWhite Wool"); + woolLore.add("§2Price: §4" + woolprice); + woolLore.add("§2Amount: §4" + woolamount); + woolMeta.setLore(woolLore); + wool.setItemMeta(woolMeta); + + //BLOCK - ORANGE WOOL + ItemStack wool1 = new ItemStack(Material.WOOL, wool1amount, (short) 1); + ItemMeta wool1Meta = wool1.getItemMeta(); + wool1Meta.setDisplayName("§bOrange Wool"); + wool1Lore.add("§2Price: §4" + wool1price); + wool1Lore.add("§2Amount: §4" + wool1amount); + wool1Meta.setLore(wool1Lore); + wool1.setItemMeta(wool1Meta); + + //BLOCK - MAGENTA WOOL + ItemStack wool2 = new ItemStack(Material.WOOL, wool2amount, (short) 2); + ItemMeta wool2Meta = wood2.getItemMeta(); + wool2Meta.setDisplayName("§bMagenta Wool"); + wool2Lore.add("§2Price: §4" + wool2price); + wool2Lore.add("§2Amount: §4" + wool2amount); + wool2Meta.setLore(wool2Lore); + wool2.setItemMeta(wool2Meta); + + //BLOCK - LIGHT BLUE WOOL + ItemStack wool3 = new ItemStack(Material.WOOL, wool3amount, (short) 3); + ItemMeta wool3Meta = wool3.getItemMeta(); + wool3Meta.setDisplayName("§bLight Blue Wool"); + wool3Lore.add("§2Price: §4" + wool3price); + wool3Lore.add("§2Price: §4" + wool3amount); + wool3Meta.setLore(wool3Lore); + wool3.setItemMeta(wool3Meta); + + //BLOCK - YELLOW WOOL + ItemStack wool4 = new ItemStack(Material.WOOL, wool4amount, (short) 4); + ItemMeta wool4Meta = wool4.getItemMeta(); + wool4Meta.setDisplayName("§bYellow Wool"); + wool4Lore.add("§2Price: §4" + wool4price); + wool4Lore.add("§2Price: §4" + wool4amount); + wool4Meta.setLore(wool4Lore); + wool4.setItemMeta(wool4Meta); + + //BLOCK - LIME WOOL + ItemStack wool5 = new ItemStack(Material.WOOL, wool5amount, (short) 5); + ItemMeta wool5Meta = wool5.getItemMeta(); + wool5Meta.setDisplayName("§bLime Wool"); + wool5Lore.add("§2price: §4" + wool5price); + wool5Lore.add("§2Amount: §4" + wool5amount); + wool5Meta.setLore(wool5Lore); + wool5.setItemMeta(wool5Meta); + + //BLOCK - PINK WOOL + ItemStack wool6 = new ItemStack(Material.WOOL, wool6amount, (short) 6); + ItemMeta wool6Meta = wool6.getItemMeta(); + wool6Meta.setDisplayName("§bPink Wool"); + wool6Lore.add("§2Price: §4" + wool6price); + wool6Lore.add("§2Amount: §4" + wool6amount); + wool6Meta.setLore(wool6Lore); + wool6.setItemMeta(wool6Meta); + + //BLOCK - GRAY WOOL + ItemStack wool7 = new ItemStack(Material.WOOL, wool7amount, (short) 7); + ItemMeta wool7Meta = wool7.getItemMeta(); + wool7Meta.setDisplayName("§bGray Wool"); + wool7Lore.add("§2Price: §4" + wool7price); + wool7Lore.add("§2Amount: §4" + wool7amount); + wool7Meta.setLore(wool7Lore); + wool7.setItemMeta(wool7Meta); + + //BLOCK - LIGHT GRAY WOOL + ItemStack wool8 = new ItemStack(Material.WOOL, wool8amount, (short) 8); + ItemMeta wool8Meta = wool8.getItemMeta(); + wool8Meta.setDisplayName("§bLight Gray Wool"); + wool8Lore.add("§2Pirce: §4" + wool8price); + wool8Lore.add("§2Amount: §4" + wool8amount); + wool8Meta.setLore(wool8Lore); + wool8.setItemMeta(wool8Meta); + + //BLOCK - CYAN WOOL + ItemStack wool9 = new ItemStack(Material.WOOL, wool9amount, (short) 9); + ItemMeta wool9Meta = wool9.getItemMeta(); + wool9Meta.setDisplayName("§bCyan Wool"); + wool9Lore.add("§2Price: §4" + wool9price); + wool9Lore.add("§2Amount: §4" + wool9amount); + wool9Meta.setLore(wool9Lore); + wool9.setItemMeta(wool9Meta); + + //BLOCK - PURPLE WOOL + ItemStack wool10 = new ItemStack(Material.WOOL, wool10amount, (short) 10); + ItemMeta wool10Meta = wool10.getItemMeta(); + wool10Meta.setDisplayName("§bPurple Wool"); + wool10Lore.add("§2Price: §4" + wool10price); + wool10Lore.add("§2Amount: §4" + wool10amount); + wool10Meta.setLore(wool10Lore); + wool10.setItemMeta(wool10Meta); + + //BLOCK - BLUE WOOL + ItemStack wool11 = new ItemStack(Material.WOOL, wool11amount, (short) 11); + ItemMeta wool11Meta = wool11.getItemMeta(); + wool11Meta.setDisplayName("§bBlue Wool"); + wool11Lore.add("§2Price: §4" + wool11price); + wool11Lore.add("§2Amount: §4" + wool11amount); + wool11Meta.setLore(wool11Lore); + wool11.setItemMeta(wool11Meta); + + //BLOCK - BROWN WOOL + ItemStack wool12 = new ItemStack(Material.WOOL, wool12amount, (short) 12); + ItemMeta wool12Meta = wool12.getItemMeta(); + wool12Meta.setDisplayName("§bBrown Wool"); + wool12Lore.add("§2Price: §4" + wool12price); + wool12Lore.add("§2Amount: §4" + wool12amount); + wool12Meta.setLore(wool12Lore); + wool12.setItemMeta(wool12Meta); + + //BLOCK - GREEN WOOL + ItemStack wool13 = new ItemStack(Material.WOOL, wool13amount, (short) 13); + ItemMeta wool13Meta = wool13.getItemMeta(); + wool13Meta.setDisplayName("§bGreen Wool"); + wool13Lore.add("§2Price: §4" + wool13price); + wool13Lore.add("§2Amount: §4" + wool13amount); + wool13Meta.setLore(wool13Lore); + wool13.setItemMeta(wool13Meta); + + //BLOCK - RED WOOL + ItemStack wool14 = new ItemStack(Material.WOOL , wool14amount, (short) 14); + ItemMeta wool14Meta = wool14.getItemMeta(); + wool14Meta.setDisplayName("§bRed Wool"); + wool14Lore.add("§2Price: §4" + wool14price); + wool14Lore.add("§2Amount: §4" + wool14amount); + wool14Meta.setLore(wool14Lore); + wool14.setItemMeta(wool14Meta); + + //BLOCK - BLACK WOOL + ItemStack wool15 = new ItemStack(Material.WOOL, wool15amount, (short) 15); + ItemMeta wool15Meta = wool15.getItemMeta(); + wool15Meta.setDisplayName("§bBlack Wool"); + wool15Lore.add("§2Price: §4" + wool15price); + wool15Lore.add("§2Amount: §4" + wool15amount); + wool15Meta.setLore(wool15Lore); + wool15.setItemMeta(wool15Meta); + + //BLOCK - GOLD BLOCK + ItemStack goldblock = new ItemStack(Material.GOLD_BLOCK, goldblockamount); + ItemMeta goldblockMeta = goldblock.getItemMeta(); + goldblockMeta.setDisplayName("§bGold Block"); + goldblockLore.add("§2Price: §4" + goldblockprice); + goldblockLore.add("§2Amount: §4" + goldblockamount); + goldblockMeta.setLore(goldblockLore); + goldblock.setItemMeta(goldblockMeta); + + //BLOCK - IRON BLOCK + ItemStack ironblock = new ItemStack(Material.IRON_BLOCK, ironblockamount); + ItemMeta ironblockMeta = ironblock.getItemMeta(); + ironblockMeta.setDisplayName("§bIron Block"); + ironblockLore.add("§2Price: §4" + ironblockprice); + ironblockLore.add("§2Amount: §4" + ironblockamount); + ironblockMeta.setLore(ironblockLore); + ironblock.setItemMeta(ironblockMeta); + + //BLOCK - STONE SLAB + ItemStack stoneslab = new ItemStack(Material.STEP, stoneslabamount, (short) 0); + ItemMeta stoneslabMeta = stoneslab.getItemMeta(); + stoneslabMeta.setDisplayName("§bStone Slab"); + stoneslabLore.add("§2Price: §4" + stoneslabprice); + stoneslabLore.add("§2Amount: §4" + stoneslabamount); + stoneslabMeta.setLore(stoneslabLore); + stoneslab.setItemMeta(stoneslabMeta); + + //BLOCK - SANDSTONE SLAB + ItemStack sandstoneslab = new ItemStack(Material.STEP, sandstoneslabamount, (short) 1); + ItemMeta sandstoneslabMeta = sandstoneslab.getItemMeta(); + sandstoneslabMeta.setDisplayName("§bSandstone Slab"); + sandstoneslabLore.add("§2Price: §4" + sandstoneslabprice); + sandstoneslabLore.add("§2Amount: §4" + sandstoneslabamount); + sandstoneslabMeta.setLore(sandstoneslabLore); + sandstoneslab.setItemMeta(sandstoneslabMeta); + + //BLOCK - COBBLESTONE SLAB + ItemStack cobblestoneslab = new ItemStack(Material.STEP, cobblestoneslabamount, (short) 3); + ItemMeta cobblestoneslabMeta = cobblestoneslab.getItemMeta(); + cobblestoneslabMeta.setDisplayName("§bCobblestone Slab"); + cobblestoneslabLore.add("§2Price: §4" + cobblestoneslabprice); + cobblestoneslabLore.add("§2Amount: §4" + cobblestoneslabamount); + cobblestoneslabMeta.setLore(cobblestoneslabLore); + cobblestoneslab.setItemMeta(cobblestoneslabMeta); + + //BLOCK - BRICKSLAB + ItemStack brickslab = new ItemStack(Material.STEP, brickslabamount, (short) 4); + ItemMeta brickslabMeta = brickslab.getItemMeta(); + brickslabMeta.setDisplayName("§bBrick Slab"); + brickslabLore.add("§2Price: §4" + brickslabprice); + brickslabLore.add("§2Amount: §4" + brickslabamount); + brickslabMeta.setLore(brickslabLore); + brickslab.setItemMeta(brickslabMeta); + + //BLOCK - STONE BRICK SLAB + ItemStack stonebrickslab = new ItemStack(Material.STEP, stonebrickslabamount, (short) 5); + ItemMeta stonebrickslabMeta = stonebrickslab.getItemMeta(); + stonebrickslabMeta.setDisplayName("§bStone Brick Slab"); + stonebrickslabLore.add("§2Price: §4" + stonebrickslabprice); + stonebrickslabLore.add("§2Amount: §4" + stonebrickslabamount); + stonebrickslabMeta.setLore(stonebrickslabLore); + stonebrickslab.setItemMeta(stonebrickslabMeta); + + //BLOCK - NETHER BRICK SLAB + ItemStack netherbrickslab = new ItemStack(Material.STEP, netherbrickslabamount, (short) 6); + ItemMeta netherbrickslabMeta = netherbrickslab.getItemMeta(); + netherbrickslabMeta.setDisplayName("§bNether Brick Slab"); + netherbrickslabLore.add("§2Price: §4" + netherbrickslabprice); + netherbrickslabLore.add("§2Amount: §4" + netherbrickslabamount); + netherbrickslabMeta.setLore(netherbrickslabLore); + netherbrickslab.setItemMeta(netherbrickslabMeta); + + //BLOCK - QUUART SLAB + ItemStack quartzslab = new ItemStack(Material.STEP, quartzslabamount, (short) 7); + ItemMeta quartzslabMeta = quartzslab.getItemMeta(); + quartzslabMeta.setDisplayName("§bQuartz Slab"); + quartzslabLore.add("§2Price: §4" + quartzslabprice); + quartzslabLore.add("§2Amount: §4" + quartzslabamount); + quartzslabMeta.setLore(quartzslabLore); + quartzslab.setItemMeta(quartzslabMeta); + + //BLOCK - BRICKS + ItemStack bricks = new ItemStack(Material.BRICK, cfg.getInt("Amount.BRICK")); + ItemMeta bricksMeta = bricks.getItemMeta(); + bricksMeta.setDisplayName("§bBricks"); + bricksLore.add("§2Price: §4" + cfg.getInt("Price.BRICK")); + bricksLore.add("§2Amount: §4" + cfg.getInt("Amount.BRICK")); + bricksMeta.setLore(bricksLore); + bricks.setItemMeta(bricksMeta); + + //BLOCK - BOOKSHELF + ItemStack bookshelf = new ItemStack(Material.BOOKSHELF, cfg.getInt("Amount.BOOKSHELF")); + ItemMeta bookshelfMeta = bookshelf.getItemMeta(); + bookshelfMeta.setDisplayName("§bBookshelf"); + bookshelfLore.add("§2Price: §4" + cfg.getInt("Price.BOOKSHELF")); + bookshelfLore.add("§2Amount: §4" + cfg.getInt("Amount.BOOKSHELF")); + bookshelfMeta.setLore(bookshelfLore); + bookshelf.setItemMeta(bookshelfMeta); + + //BLOCK - MOSS STONE + ItemStack mossstone = new ItemStack(Material.MOSSY_COBBLESTONE, cfg.getInt("Amount.MOSSY_COBBLESTONE")); + ItemMeta mossstoneMeta = mossstone.getItemMeta(); + mossstoneMeta.setDisplayName("§bMossy Cobblestone"); + mossstoneLore.add("§2Price: §4" + cfg.getInt("Price.MOSSY_COBBLESTONE")); + mossstoneLore.add("§2Amount: §4" + cfg.getInt("Amount.MOSSY_COBBLESTONE")); + mossstoneMeta.setLore(mossstoneLore); + mossstone.setItemMeta(mossstoneMeta); + + //BLOCK - OBSIDIAN + ItemStack obsidian = new ItemStack(Material.OBSIDIAN, cfg.getInt("Amount.OBISIDAN")); + ItemMeta obsidianMeta = obsidian.getItemMeta(); + obsidianMeta.setDisplayName("§bObsidian"); + obsidianLore.add("§2Price: §4" + cfg.getInt("Price.OBSIDIAN")); + obsidianLore.add("§2Amount: §4" + cfg.getInt("Amount.OBSIDIAN")); + obsidianMeta.setLore(obsidianLore); + obsidian.setItemMeta(obsidianMeta); + + //BLOCK - OAK WOOD STAIRS + ItemStack woodstairs = new ItemStack(Material.WOOD_STAIRS, cfg.getInt("Amount.WOOD_STAIRS")); + ItemMeta woodstairsMeta = woodstairs.getItemMeta(); + woodstairsMeta.setDisplayName("§bOak Wood Stairs"); + woodstairsLore.add("§2Price: §4" + cfg.getInt("Price.WOOD_STAIRS")); + woodstairsLore.add("§2Amount: §4" + cfg.getInt("Amount.WOOD_STAIRS")); + woodstairsMeta.setLore(woodstairsLore); + woodstairs.setItemMeta(woodstairsMeta); + + //BLOCK - DIAMOND BLOCK + ItemStack diablock = new ItemStack(Material.DIAMOND_BLOCK, cfg.getInt("Amount.DIAMOND_BLOCK")); + ItemMeta diablockMeta = diablock.getItemMeta(); + diablockMeta.setDisplayName("§bDiamond Block"); + diablockLore.add("§2Price: §4" + cfg.getInt("Price.DIAMOND_BLOCK")); + diablockLore.add("§2Amount: §4" + cfg.getInt("Amount.DIAMOND_BLOCK")); + diablockMeta.setLore(diablockLore); + diablock.setItemMeta(diablockMeta); + + //BLOCK - COBBLESTONE STAIRS + ItemStack cobblestairs = new ItemStack(Material.COBBLESTONE_STAIRS, cfg.getInt("Amount.COBBLESTONE_STAIRS")); + ItemMeta cobblestairsMeta = cobblestairs.getItemMeta(); + cobblestairsMeta.setDisplayName("§bCobblestone Stairs"); + cobblestairsLore.add("§2Price: §4" + cfg.getInt("Price.COBBLESTONE_STAIRS")); + cobblestairsLore.add("§2Amount: §4" + cfg.getInt("Amount.COBBLESTONE_STAIRS")); + cobblestairsMeta.setLore(cobblestairsLore); + cobblestairs.setItemMeta(cobblestairsMeta); + + //BLOCK - ICE + ItemStack ice = new ItemStack(Material.ICE, cfg.getInt("Amount.ICE")); + ItemMeta iceMeta = ice.getItemMeta(); + iceMeta.setDisplayName("§bIce"); + iceLore.add("§2Price: §4" + cfg.getInt("Price.ICE")); + iceLore.add("§2Amount: §4" + cfg.getInt("Amount.ICE")); + iceMeta.setLore(iceLore); + ice.setItemMeta(iceMeta); + + //BLOCK - SNOW + ItemStack snow = new ItemStack(Material.SNOW, cfg.getInt("Amount.SNOW")); + ItemMeta snowMeta = snow.getItemMeta(); + snowMeta.setDisplayName("§bSnow"); + snowLore.add("§2Price: §4" + cfg.getInt("Price.SNOW")); + snowLore.add("§2Amount: §4" + cfg.getInt("Amount.SNOW")); + snowMeta.setLore(snowLore); + snow.setItemMeta(snowMeta); + + //BLOCK - CLAY + ItemStack clay = new ItemStack(Material.CLAY, cfg.getInt("Amount.CLAY")); + ItemMeta clayMeta = clay.getItemMeta(); + clayMeta.setDisplayName("§bClay"); + clayLore.add("§2Price: §4" + cfg.getInt("Price.CLAY")); + clayLore.add("§2Amount: §4" + cfg.getInt("Amount.CLAY")); + clayMeta.setLore(clayLore); + clay.setItemMeta(clayMeta); + + //BLOCK - PUMPKIN + ItemStack pumpkin = new ItemStack(Material.PUMPKIN, cfg.getInt("Amount.PUMPKIN")); + ItemMeta pumpkinMeta = pumpkin.getItemMeta(); + pumpkinMeta.setDisplayName("§bPumpkin"); + pumpkinLore.add("§2Price: §4" + cfg.getInt("Price.PUMPKIN")); + pumpkinLore.add("§2Amount: §4" + cfg.getInt("Amount.PUMPKIN")); + pumpkinMeta.setLore(pumpkinLore); + pumpkin.setItemMeta(pumpkinMeta); + + //BLOCK - NETHERRACK + ItemStack netherrack = new ItemStack(Material.NETHERRACK, cfg.getInt("Amount.NETHERRACK")); + ItemMeta netherrackMeta = netherrack.getItemMeta(); + netherrackMeta.setDisplayName("§bNetherrack"); + netherrackLore.add("§2Price: §4" + cfg.getInt("Price.NETHERRACK")); + netherrackLore.add("§2Amount: §4" + cfg.getInt("Amount.NETHERRACK")); + netherrackMeta.setLore(netherrackLore); + netherrack.setItemMeta(netherrackMeta); + + //BLOCK - SOUL SAND + ItemStack soulsand = new ItemStack(Material.SOUL_SAND, cfg.getInt("Amount.SOUL_SAND")); + ItemMeta soulsandMeta = soulsand.getItemMeta(); + soulsandMeta.setDisplayName("§bSoul Sand"); + soulsandLore.add("§2Price: §4" + cfg.getInt("Price.SOUL_SAND")); + soulsandLore.add("§2Amount: §4" + cfg.getInt("Amount.SOUL_SAND")); + soulsandMeta.setLore(soulsandLore); + soulsand.setItemMeta(soulsandMeta); + + //BLOCK - GLOWSTONE + ItemStack glowstone = new ItemStack(Material.GLOWSTONE, cfg.getInt("Amount.GLOWSTONE")); + ItemMeta glowstoneMeta = glowstone.getItemMeta(); + glowstoneMeta.setDisplayName("§bGlowstone"); + glowstoneLore.add("§2Price: §4" + cfg.getInt("Price.GLOWSTONE")); + glowstoneLore.add("§2Amount: §4" + cfg.getInt("Amount.GLOWSTONE")); + glowstoneMeta.setLore(glowstoneLore); + glowstone.setItemMeta(glowstoneMeta); + + //BLOCK - JACK O' LANTERN + ItemStack pumpkin2 = new ItemStack(Material.JACK_O_LANTERN, cfg.getInt("Amount.JACK_O_LANTERN")); + ItemMeta pumpkin2Meta = pumpkin2.getItemMeta(); + pumpkin2Meta.setDisplayName("§bJack o' Lantern"); + pumpkin2Lore.add("§2Price: §4"+ cfg.getInt("Price.JACK_O_LANTERN")); + pumpkin2Lore.add("§2Amount: §4" + cfg.getInt("Amount.JACK_O_LANTERN")); + pumpkin2Meta.setLore(pumpkin2Lore); + pumpkin2.setItemMeta(pumpkin2Meta); + + //BLOCK - WHITE STAINED GLASS + ItemStack glass0 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_0"), (short) 0); + ItemMeta glass0Meta = glass0.getItemMeta(); + glass0Meta.setDisplayName("§bWhite Stained Glass"); + glass0Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_0")); + glass0Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_0")); + glass0Meta.setLore(glass0Lore); + glass0.setItemMeta(glass0Meta); + + //BLOCK - ORANGE STAINED GLASS + ItemStack glass1 = new ItemStack(Material.STAINED_GLASS,cfg.getInt("Amount.STAINED_GLASS_1"), (short) 1); + ItemMeta glass1Meta = glass1.getItemMeta(); + glass1Meta.setDisplayName("§bOrange Stained Glass"); + glass1Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_1")); + glass1Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_1")); + glass1Meta.setLore(glass1Lore); + glass1.setItemMeta(glass1Meta); + + //BLOCK - MAGENTA STAINED GLASS + ItemStack glass2 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_2"), (short) 2); + ItemMeta glass2Meta = glass2.getItemMeta(); + glass2Meta.setDisplayName("§bMagenta Stained Glass"); + glass2Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_2")); + glass2Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_2")); + glass2Meta.setLore(glass2Lore); + glass2.setItemMeta(glass2Meta); + + //BLOCK - LIGHT BLUE STAINED GLASS + ItemStack glass3 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_3"), (short) 3); + ItemMeta glass3Meta = glass3.getItemMeta(); + glass3Meta.setDisplayName("§bLight Blue Stained Glass"); + glass3Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_3")); + glass3Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_3")); + glass3Meta.setLore(glass3Lore); + glass3.setItemMeta(glass3Meta); + + //BLOCK - YELLOW STAINED GLASS + ItemStack glass4 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_4"), (short) 4); + ItemMeta glass4Meta = glass4.getItemMeta(); + glass4Meta.setDisplayName("§bYellow Stained Glass"); + glass4Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_4")); + glass4Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_4")); + glass4Meta.setLore(glass4Lore); + glass4.setItemMeta(glass4Meta); + + //BLOCK - LIME STAINED GLASS + ItemStack glass5 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_5"), (short) 5); + ItemMeta glass5Meta = glass5.getItemMeta(); + glass5Meta.setDisplayName("§bLime Stained Glass"); + glass5Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_5")); + glass5Lore.add("§2Amount: §b" + cfg.getInt("Amount.STAINED_GLASS_5")); + glass5Meta.setLore(glass5Lore); + glass5.setItemMeta(glass5Meta); + + //BLOCK - PINK STAINED GLASS + ItemStack glass6 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_6"), (short) 6); + ItemMeta glass6Meta = glass6.getItemMeta(); + glass6Meta.setDisplayName("$bPink Stained Glass"); + glass6Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_6")); + glass6Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_6")); + glass6Meta.setLore(glass6Lore); + glass6.setItemMeta(glass6Meta); + + //BLOCK - GRAY STAINED GLASS + ItemStack glass7 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_7"), (short) 7); + ItemMeta glass7Meta = glass7.getItemMeta(); + glass7Meta.setDisplayName("§bGray Stained Glass"); + glass7Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_7")); + glass7Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_7")); + glass7Meta.setLore(glass7Lore); + glass7.setItemMeta(glass7Meta); + + //BLOCK - LIGHT GRAY STAINED GLASS + ItemStack glass8 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_8"), (short) 8); + ItemMeta glass8Meta = glass8.getItemMeta(); + glass8Meta.setDisplayName("§bLight Gray Stained Glass"); + glass8Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_8")); + glass8Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_8")); + glass8Meta.setLore(glass8Lore); + glass8.setItemMeta(glass8Meta); + + //BLOCK - CYAN STAINED GLASS + ItemStack glass9 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_9"), (short) 9); + ItemMeta glass9Meta = glass9.getItemMeta(); + glass9Meta.setDisplayName("§bCyan Stained Glass"); + glass9Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_9")); + glass9Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_9")); + glass9Meta.setLore(glass9Lore); + glass9.setItemMeta(glass9Meta); + + //BLOCK - PURPLE STAINED GLASS + ItemStack glass10 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_10"), (short) 10); + ItemMeta glass10Meta = glass10.getItemMeta(); + glass10Meta.setDisplayName("§bPurple Stained Glass"); + glass10Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_10")); + glass10Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_10")); + glass10Meta.setLore(glass10Lore); + glass10.setItemMeta(glass10Meta); + + //BLOCK - BLUE STAINED GLASS + ItemStack glass11 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_11"), (short) 11); + ItemMeta glass11Meta = glass11.getItemMeta(); + glass11Meta.setDisplayName("§bBlue Stained Glass"); + glass11Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_11")); + glass11Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_11")); + glass11Meta.setLore(glass11Lore); + glass11.setItemMeta(glass11Meta); + + //BLOCK - BROWN STAINED GLASS + ItemStack glass12 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_12"), (short) 12); + ItemMeta glass12Meta = glass12.getItemMeta(); + glass12Meta.setDisplayName("§bBrown Stained Glass"); + glass12Lore.add("§2Price: §4" +cfg.getInt("Price.STAINED_GLASS_12")); + glass12Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_12")); + glass12Meta.setLore(glass12Lore); + glass12.setItemMeta(glass12Meta); + + //BLOCK - GREEN STAINED GLASS + ItemStack glass13 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_13"), (short) 13); + ItemMeta glass13Meta = glass13.getItemMeta(); + glass13Meta.setDisplayName("§bGreen Stained Glass"); + glass13Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_13")); + glass13Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_13")); + glass13Meta.setLore(glass13Lore); + glass13.setItemMeta(glass13Meta); + + //BLOCK - RED STAINED GLASS + ItemStack glass14 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_14"), (short) 14); + ItemMeta glass14Meta = glass14.getItemMeta(); + glass14Meta.setDisplayName("§bRed Staind Glass"); + glass14Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_14")); + glass14Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_15´4")); + glass14Meta.setLore(glass14Lore); + glass14.setItemMeta(glass14Meta); + + //BLOCK - BLACK STIANED GLASS + ItemStack glass15 = new ItemStack(Material.STAINED_GLASS, cfg.getInt("Amount.STAINED_GLASS_15"), (short) 15); + ItemMeta glass15Meta = glass15.getItemMeta(); + glass15Meta.setDisplayName("§bBlack Stained Glass"); + glass15Lore.add("§2Price: §4" + cfg.getInt("Price.STAINED_GLASS_15")); + glass15Lore.add("§2Amount: §4" + cfg.getInt("Amount.STAINED_GLASS_15")); + glass15Meta.setLore(glass15Lore); + glass15.setItemMeta(glass15Meta); + + //BLOCK - STONE BRICKS + ItemStack stonebrick = new ItemStack(Material.SMOOTH_BRICK, cfg.getInt("Amount.SMOOTH_BRICK_0"), (short) 0); + ItemMeta stonebrickMeta = stonebrick.getItemMeta(); + stonebrickMeta.setDisplayName("§bStone Bricks"); + stonebrickLore.add("§2Price: §4" + cfg.getInt("Price.SMOOTH_BRICK_0")); + stonebrickLore.add("§2Amount: §4" + cfg.getInt("Amount.SMOOTH_BRICK_0")); + stonebrickMeta.setLore(stonebrickLore); + stonebrick.setItemMeta(stonebrickMeta); + + //BLOCK - MOSSY STONE BRICKS + ItemStack mossstonebrick = new ItemStack(Material.SMOOTH_BRICK, cfg.getInt("Amount.SMOOTH_BRICK_1"), (short) 1); + ItemMeta mossstonebrickMeta = mossstonebrick.getItemMeta(); + mossstonebrickMeta.setDisplayName("§bMossy Stone Bricks"); + mossstonebrickLore.add("§2Price: §4" + cfg.getInt("Price.SMOOTH_BRICK_1")); + mossstonebrickLore.add("§2Amount: §4" + cfg.getInt("Amount.SMOOTH_BRICK_1")); + mossstonebrickMeta.setLore(mossstonebrickLore); + mossstonebrick.setItemMeta(mossstonebrickMeta); + + //BLOCK - CRACKED STONE BRICKS + ItemStack crackstonebrick = new ItemStack(Material.SMOOTH_BRICK, cfg.getInt("Amount.SMOOTH_BRICK_2"), (short) 2); + ItemMeta crackstonebrickMeta = crackstonebrick.getItemMeta(); + crackstonebrickMeta.setDisplayName("§2Cracked Stone Bricks"); + crackstonebrickLore.add("§2Price: §4" + cfg.getInt("Price.SMOOTH_BRICK_2")); + crackstonebrickLore.add("§2Amount: §4" + cfg.getInt("Amount.SMOOTH_BRICK_2")); + crackstonebrickMeta.setLore(crackstonebrickLore); + crackstonebrick.setItemMeta(crackstonebrickMeta); + + //BLOCK - CHISELED STONE BRICKS + ItemStack chistonebrick = new ItemStack(Material.SMOOTH_BRICK, cfg.getInt("Amount.SMOOTH_BRICK_3"), (short) 3); + ItemMeta chistonebrickMeta = chistonebrick.getItemMeta(); + chistonebrickMeta.setDisplayName("§bChiseled Stone Bricks"); + chistonebrickLore.add("§2Price: §4" + cfg.getInt("Price.SMOOTH_BRICK_3")); + chistonebrickLore.add("§2Amount: §4" + cfg.getInt("Amount.SMOOTH_BRICK_3")); + chistonebrickMeta.setLore(chistonebrickLore); + chistonebrick.setItemMeta(chistonebrickMeta); + + //BLOCK - MELON + ItemStack melonblock = new ItemStack(Material.MELON_BLOCK, cfg.getInt("Amount.MELON_BLOCK")); + ItemMeta melonblockMeta = melonblock.getItemMeta(); + melonblockMeta.setDisplayName("§bMelon"); + melonblockLore.add("§2Price: §4" + cfg.getInt("Price.MELON_BLOCK")); + melonblockLore.add("§2Amount: §4" + cfg.getInt("Amount.MELON_BLOCK")); + melonblockMeta.setLore(melonblockLore); + melonblock.setItemMeta(melonblockMeta); + + //BLOCK - BRICK STAIRS + ItemStack brickstair = new ItemStack(Material.BRICK_STAIRS, cfg.getInt("Amount.BRICK_STAIRS")); + ItemMeta brickstairMeta = brickstair.getItemMeta(); + brickstairMeta.setDisplayName("§bBrick Stairs"); + brickstairLore.add("§2Price: §4" + cfg.getInt("Price.BRICK_STAIRS")); + brickstairLore.add("§2Amount: §4" + cfg.getInt("Amount.BRICK_STAIRS")); + brickstairMeta.setLore(brickstairLore); + brickstair.setItemMeta(brickstairMeta); + + //BLOCK - STONE BRICK STAIRS + ItemStack stonebrickstair = new ItemStack(Material.SMOOTH_STAIRS, cfg.getInt("Amount.SMOOTH_STAIRS")); + ItemMeta stonebrickstairMeta = stonebrickstair.getItemMeta(); + stonebrickstairMeta.setDisplayName("§bStone Brick Stairs"); + stonebrickstairLore.add("§2Price: §4" + cfg.getInt("Price.SMOOTH_STAIRS")); + stonebrickstairLore.add("§2Amount: §4" + cfg.getInt("Amount.SMOOTH_STAIRS")); + stonebrickstairMeta.setLore(stonebrickstairLore); + stonebrickstair.setItemMeta(stonebrickstairMeta); + + //BLOCK - MYCELIUM + ItemStack mycelium = new ItemStack(Material.MYCEL, cfg.getInt("Amount.MYCEL")); + ItemMeta myceliumMeta = mycelium.getItemMeta(); + myceliumMeta.setDisplayName("§bMycelium"); + myceliumLore.add("§2Price: §4" + cfg.getInt("Price.MYCEL")); + myceliumLore.add("§2Amount: §4" + cfg.getInt("Amount.MYCEL")); + myceliumMeta.setLore(myceliumLore); + mycelium.setItemMeta(myceliumMeta); + + //BLOCK - NETHER BRICK + ItemStack netherbrick = new ItemStack(Material.NETHER_BRICK, cfg.getInt("Amount.NETHER_BRICK")); + ItemMeta netherbrickMeta = netherbrick.getItemMeta(); + netherbrickMeta.setDisplayName("§bNether Bricks"); + netherbrickLore.add("§2Price: §4" + cfg.getInt("Price.NETHER_BRICK")); + netherbrickLore.add("§2Amount: §4" + cfg.getInt("Amount.NETHER_BRICK")); + netherbrickMeta.setLore(netherbrickLore); + netherbrick.setItemMeta(netherbrickMeta); + + //NETHER BRICK STAIRS + ItemStack netherbrickstair = new ItemStack(Material.NETHER_BRICK_STAIRS, cfg.getInt("Amount.NETHER_BRICK_STAIRS")); + ItemMeta netherbrickstairMeta = netherbrickstair.getItemMeta(); + netherbrickstairMeta.setDisplayName("§bNether Brick Stairs"); + netherbrickstairLore.add("§2Price: §4" +cfg.getInt("Price.NETHER_BRICK_STAIRS")); + netherbrickstairLore.add("§2Amount: §4" + cfg.getInt("Amount.NETHER_BRICK_STAIRS")); + netherbrickstairMeta.setLore(netherbrickstairLore); + netherbrickstair.setItemMeta(netherbrickstairMeta); + + //BLOCK - END STONE + ItemStack endstone = new ItemStack(Material.ENDER_STONE, cfg.getInt("Amount.ENDER_STONE")); + ItemMeta endstoneMeta = endstone.getItemMeta(); + endstoneMeta.setDisplayName("§bEnd Stone"); + endstoneLore.add("§2Price: §4" + cfg.getInt("Price.ENDER_STONE")); + endstoneLore.add("§2Amount: §4" + cfg.getInt("Amount.ENDER_STONE")); + endstoneMeta.setLore(endstoneLore); + endstone.setItemMeta(endstoneMeta); + + //BLOCK - OAK WOOD SLAB + ItemStack woodslab = new ItemStack(Material.WOOD_STEP, cfg.getInt("Amount.WOOD_STEP_0"), (short) 0); + ItemMeta woodslabMeta = woodslab.getItemMeta(); + woodslabMeta.setDisplayName("§bOak Wood Slab"); + woodslabLore.add("§2Price: §4" + cfg.getInt("Price.WOOD_STEP_0")); + woodslabLore.add("§2Amount: §4" + cfg.getInt("Amount.WOOD_STEP_0")); + woodslabMeta.setLore(woodslabLore); + woodslab.setItemMeta(woodslabMeta); + + //BLOCK - SPRUCE WOOD SLAB + ItemStack woodslab1 = new ItemStack(Material.WOOD_STEP, cfg.getInt("Amount.WOOD_STEP_1"), (short) 1); + ItemMeta woodslab1Meta = woodslab1.getItemMeta(); + woodslab1Meta.setDisplayName("§bSpruce Wood Slab"); + woodslab1Lore.add("§2Price: §4" + cfg.getInt("Price.WOOD_STEP_1")); + woodslab1Lore.add("§2Amount: §4" + cfg.getInt("Amount.WOOD_STEP_1")); + woodslab1Meta.setLore(woodslab1Lore); + woodslab1.setItemMeta(woodslab1Meta); + + //BLOCK - BIRCH WOOD SLAB + ItemStack woodslab2 = new ItemStack(Material.WOOD_STEP, cfg.getInt("Amount.WOOD_STEP_2"), (short) 2); + ItemMeta woodslab2Meta = woodslab2.getItemMeta(); + woodslab2Meta.setDisplayName("§bBirch Wood Slab"); + woodslab2Lore.add("§2Price: §4" + cfg.getInt("Price.WOOD_STEP_2")); + woodslab2Lore.add("§2Amount: §4" + cfg.getInt("Amount.WOOD_STEP_2")); + woodslab2Meta.setLore(woodslab2Lore); + woodslab2.setItemMeta(woodslab2Meta); + + //BLOCK - JUNGLE WOOD SLAB + ItemStack woodslab3 = new ItemStack(Material.WOOD_STEP, cfg.getInt("Amount.WOOD_STEP_3"), (short) 3); + ItemMeta woodslab3Meta = woodslab3.getItemMeta(); + woodslab3Meta.setDisplayName("§bJungle Wood Slab"); + woodslab3Lore.add("§2Price: §4" + cfg.getInt("Price.WOOD_STEP_3")); + woodslab3Lore.add("§2Amount: §4" + cfg.getInt("Amount.WOOD_STEP_3")); + woodslab3Meta.setLore(woodslab3Lore); + woodslab3.setItemMeta(woodslab3Meta); + + + + + //DECO INV ITEMS + //ITEM - OAK SAPLING + ItemStack sapling = new ItemStack(Material.SAPLING, saplingamount); + ItemMeta saplingMeta = sapling.getItemMeta(); + saplingMeta.setDisplayName("§bOak Sapling"); + saplingLore.add("§2Price: §4" + saplingprice); + saplingLore.add("§2Amount: §4" + saplingamount); + saplingMeta.setLore(saplingLore); + sapling.setItemMeta(saplingMeta); + + + + //INV-MENU ADD-ITEMS + //BUILD1 + //LINE 1 + build.setItem(0, stone); + build.setItem(1, granite); + build.setItem(2, granite2); + build.setItem(3, diorite); + build.setItem(4, diorite2); + build.setItem(5, andesite); + build.setItem(6, andesite2); + build.setItem(7, grass); + build.setItem(8, dirt); + //LINE2 + build.setItem(9, dirt2); + build.setItem(10, dirt3); + build.setItem(11, cobble); + build.setItem(12, wood); + build.setItem(13, wood1); + build.setItem(14, wood2); + build.setItem(15, wood3); + build.setItem(16, wood4); + build.setItem(17, wood5); + //LINE3 + build.setItem(18, sand); + build.setItem(19, sand1); + build.setItem(20, gravel); + build.setItem(21, log); + build.setItem(22, log1); + build.setItem(23, log2); + build.setItem(24, log3); + build.setItem(25, glass); + build.setItem(26, lapisblock); + //LINE4 + build.setItem(27, sandstone); + build.setItem(28, sandstone2); + build.setItem(29, sandstone3); + build.setItem(30, wool); + build.setItem(31, wool1); + build.setItem(32, wool2); + build.setItem(33, wool3); + build.setItem(34, wool4); + build.setItem(35, wool5); + //LINE5 + build.setItem(36, none); + build.setItem(37, none); + build.setItem(38, none); + build.setItem(39, none); + build.setItem(40, none); + build.setItem(41, none); + build.setItem(42, none); + build.setItem(43, none); + build.setItem(44, none); + //LINE6 + build.setItem(45, exit); + build.setItem(46, main); + build.setItem(47, none); + build.setItem(48, none); + build.setItem(49, page1); + build.setItem(50, none); + build.setItem(51, none); + build.setItem(52, none); + build.setItem(53, next); + + + //BUILD2 + //LINE1 + build2.setItem(0, wool6); + build2.setItem(1, wool7); + build2.setItem(2, wool8); + build2.setItem(3, wool9); + build2.setItem(4, wool10); + build2.setItem(5, wool11); + build2.setItem(6, wool12); + build2.setItem(7, wool13); + build2.setItem(8, wool14); + //LINE2 + build2.setItem(9, wool15); + build2.setItem(10, goldblock); + build2.setItem(11, ironblock); + build2.setItem(12, stoneslab); + build2.setItem(13, sandstoneslab); + build2.setItem(14, cobblestoneslab); + build2.setItem(15, brickslab); + build2.setItem(16, stonebrickslab); + build2.setItem(17, netherbrickslab); + //LINE3 + build2.setItem(18, quartzslab); + build2.setItem(19, bricks); + build2.setItem(20, bookshelf); + build2.setItem(21, mossstone); + build2.setItem(22, obsidian); + build2.setItem(23, woodstairs); + build2.setItem(24, diablock); + build2.setItem(25, cobblestairs); + build2.setItem(26, ice); + //LINE4 + build2.setItem(27, snow); + build2.setItem(28, clay); + build2.setItem(29, pumpkin); + build2.setItem(30, netherrack); + build2.setItem(31, soulsand); + build2.setItem(32, glowstone); + build2.setItem(33, pumpkin2); + build2.setItem(34, glass0); + build2.setItem(35, glass1); + //LINE5 + build2.setItem(36, none); + build2.setItem(37, none); + build2.setItem(38, none); + build2.setItem(39, none); + build2.setItem(40, none); + build2.setItem(41, none); + build2.setItem(42, none); + build2.setItem(43, none); + build2.setItem(44, none); + //LINE6 + build2.setItem(45, exit); + build2.setItem(46, main); + build2.setItem(47, none); + build2.setItem(48, none); + build2.setItem(49, page2); + build2.setItem(50, none); + build2.setItem(51, none); + build2.setItem(52, prev); + build2.setItem(53, next); + + + //BUILD3 + //LINE1 + build3.setItem(0, glass2); + build3.setItem(1, glass3); + build3.setItem(2, glass4); + build3.setItem(3, glass5); + build3.setItem(4, glass6); + build3.setItem(5, glass7); + build3.setItem(6, glass8); + build3.setItem(7, glass9); + build3.setItem(8, glass10); + //LINE2 + build3.setItem(9, glass11); + build3.setItem(10, glass12); + build3.setItem(11, glass13); + build3.setItem(12, glass14); + build3.setItem(13, glass15); + build3.setItem(14, stonebrick); + build3.setItem(15, mossstonebrick); + build3.setItem(16, crackstonebrick); + build3.setItem(17, chistonebrick); + //LINE3 + build3.setItem(18, melonblock); + build3.setItem(19, brickstair); + build3.setItem(20, stonebrickstair); + build3.setItem(21, mycelium); + build3.setItem(22, netherbrick); + build3.setItem(23, netherbrickstair); + build3.setItem(24, endstone); + build3.setItem(25, woodslab); + build3.setItem(26, woodslab1); + //LINE4 + build3.setItem(27, woodslab2); + build3.setItem(28, woodslab3); + //LINE5 + build3.setItem(36, none); + build3.setItem(37, none); + build3.setItem(38, none); + build3.setItem(39, none); + build3.setItem(40, none); + build3.setItem(41, none); + build3.setItem(42, none); + build3.setItem(43, none); + build3.setItem(44, none); + //LINE6 + build3.setItem(45, exit); + build3.setItem(46, main); + build3.setItem(47, none); + build3.setItem(48, none); + build3.setItem(49, page3); + build3.setItem(50, none); + build3.setItem(51, none); + build3.setItem(52, prev); + build3.setItem(53, next); + + + //DECO INV + //LINE1 + deco.setItem(0, sapling); + + //LINE5 + deco.setItem(36, none); + deco.setItem(37, none); + deco.setItem(38, none); + deco.setItem(39, none); + deco.setItem(40, none); + deco.setItem(41, none); + deco.setItem(42, none); + deco.setItem(43, none); + deco.setItem(44, none); + //LINE6 + deco.setItem(45, exit); + deco.setItem(46, main); + deco.setItem(47, none); + deco.setItem(48, none); + deco.setItem(49, page1); + deco.setItem(50, none); + deco.setItem(51, none); + deco.setItem(52, none); + deco.setItem(53, next); + + //WARP - BUILDING BLOCKS + if (e.getInventory().getName().equalsIgnoreCase("§6§lAdminShop")){ + e.setCancelled(true); + + //INV - BUILDING BLOCKS + if(e.getCurrentItem().getType() == Material.GRASS) + { + p.closeInventory(); + p.openInventory(build); + } + + //INV - DECORATION BLOCKS + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 5) + { + p.closeInventory(); + p.openInventory(deco); + } + + //BUTTON - EXIT + if(e.getCurrentItem().getType() == Material.BARRIER) + { + p.closeInventory(); + } + + //BUTTON - INFOS + if(e.getCurrentItem().getType() == Material.MAP) + { + p.closeInventory(); + p.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "#######################"); + p.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "Inventory AdminShop"); + p.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "Made by: V01D"); + p.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "Version : 1.0"); + p.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "For help use : " + ChatColor.DARK_RED + "" + ChatColor.BOLD + "/invadminshop-help"); + p.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "######################"); + } + } + + //INV - BUILDING BLOCKS 1 + if (e.getInventory().getName().equalsIgnoreCase("§3§lBuilding Blocks §2Page 1")){ + e.setCancelled(true); + + //BUTTONS + //BUTTON - NEXT + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 0 && e.getCurrentItem().getItemMeta().getDisplayName() == "§lNEXT PAGE") + { + p.closeInventory(); + p.openInventory(build2); + } + + //BUTTON - MAIN + if(e.getCurrentItem().getType() == Material.REDSTONE) + { + p.closeInventory(); + p.openInventory(menu); + } + + //BUTTON - EXIT + if(e.getCurrentItem().getType() == Material.BARRIER) + { + p.closeInventory(); + } + + //BLOCKS + //BLOCK - STONE + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 0){ + if(econ.getBalance(p.getName()) < stoneprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, stoneamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), stoneprice); + p.sendMessage(shopprefix + ChatColor.RED + "You buyed " + ChatColor.GREEN + stoneamount + ChatColor.RED + " Stone for " + ChatColor.GREEN + stoneprice + " " + servercurrency); + } + } + + //BLOCK - GRANIT + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 1){ + if(econ.getBalance(p.getName()) < graniteprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, graniteamount, (short)1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), graniteprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + graniteamount + ChatColor.RED + " Granite for " + ChatColor.GREEN + graniteprice + " " + servercurrency); + } + } + + //BLOCK - POLISHED GRANITE + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 2){ + if(econ.getBalance(p.getName()) < granite2amount) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, granite2amount, (short) 2)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), granite2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + granite2amount + ChatColor.RED + " Polished Granite for " + ChatColor.GREEN + granite2price + " " + servercurrency); + } + } + + //BLOCK - DIORITE + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 3){ + if(econ.getBalance(p.getName()) < dioriteprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, dioriteamount, (short) 3)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), dioriteprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + dioriteamount + ChatColor.RED + " Diorite for " + ChatColor.GREEN + dioriteprice + " " + servercurrency); + } + } + + //BLOCK - POLISHED DIORITE + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 4){ + if(econ.getBalance(p.getName()) < diorite2amount) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, diorite2amount, (short) 4)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), diorite2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + diorite2amount + ChatColor.RED + " Polished Diorite for " + ChatColor.GREEN + diorite2price + " " + servercurrency); + } + } + + //BLOCK - ANDESITE + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 5) + { + if(econ.getBalance(p.getName()) < andesiteprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, andesiteamount, (short) 5)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), andesiteprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + andesiteamount + ChatColor.RED + " Andesite for " + ChatColor.GREEN + andesiteprice + " " + servercurrency); + } + } + + //BLOCK - POLISHED ANDESITE + if(e.getCurrentItem().getType() == Material.STONE && e.getCurrentItem().getData().getData() == 6) + { + if(econ.getBalance(p.getName()) < andesite2price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STONE, andesite2amount, (short) 6)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), andesite2amount); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + andesite2amount + ChatColor.RED + " Polished Andesite for " + ChatColor.GREEN + andesite2price + " " + servercurrency); + } + } + + //BLOCK - GRASS + if(e.getCurrentItem().getType() == Material.GRASS) + { + if(econ.getBalance(p.getName()) < grassprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.GRASS, grassamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), grassprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + grassamount + ChatColor.RED + " Grass Block for " + ChatColor.GREEN + grassprice + " " + servercurrency); + } + } + + //BLOCK - DIRT + if(e.getCurrentItem().getType() == Material.DIRT && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < dirtprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.DIRT, dirtamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), dirtprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + dirtamount + ChatColor.RED + " Dirt for " + ChatColor.GREEN + dirtprice + " " + servercurrency); + } + } + + //BLOCK - COARSE DIRT + if(e.getCurrentItem().getType() == Material.DIRT && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < dirt2price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.DIRT, dirt2amount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), dirt2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + dirt2amount + ChatColor.RED + " Coarse Dirt for " + ChatColor.GREEN + dirt2price + " " + servercurrency); + } + } + + //BLOCK - PODZOL + if(e.getCurrentItem().getType() == Material.DIRT && e.getCurrentItem().getData().getData() == 2) + { + if(econ.getBalance(p.getName()) < dirt3amount) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.DIRT, dirt3amount, (short) 2)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), dirt3price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + dirt3amount + ChatColor.RED + " Podzol for " + ChatColor.GREEN + dirt3price + " " + servercurrency); + } + } + + //BLOCK - COBBLESTONE + if(e.getCurrentItem().getType() == Material.COBBLESTONE) + { + if(econ.getBalance(p.getName()) < cobbleprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.COBBLESTONE, cobbleamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), cobbleprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + cobbleamount + ChatColor.RED + " Cobblestone for " + ChatColor.GREEN + cobbleprice + " " + servercurrency); + } + } + + //BLOCK - OAK WOOD PLANKS + if(e.getCurrentItem().getType() == Material.WOOD && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < woodprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOD, woodamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), woodprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + woodamount + ChatColor.RED + " Oak Wood Planks for " + ChatColor.GREEN + woodprice + " " + servercurrency); + } + } + + //BLOCK - SPRUCE WOOD PLANKS + if(e.getCurrentItem().getType() == Material.WOOD && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < wood1price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOD, wood1amount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wood1price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wood1amount + ChatColor.RED + " Spruce Wood Planks for " + ChatColor.GREEN + wood1price + " " + servercurrency); + } + } + + //BLOCK - BIRCH WOOD PLANKS + if(e.getCurrentItem().getType() == Material.WOOD && e.getCurrentItem().getData().getData() == 2) + { + if(econ.getBalance(p.getName()) < wood2price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOD, wood2amount, (short) 2)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wood2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wood2amount + ChatColor.RED + " Birch Wood Planks for " + ChatColor.GREEN + wood2price + " " + servercurrency); + } + } + + //BLOCK - JUNGLE WOOD PLANKS + if(e.getCurrentItem().getType() == Material.WOOD && e.getCurrentItem().getData().getData() == 3) + { + if(econ.getBalance(p.getName()) < wood3price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOD, wood3amount, (short) 3)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wood3price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wood3amount + ChatColor.RED + " Jungle Wood Planks for " + ChatColor.GREEN + wood3price + " " + servercurrency); + } + } + + //BLOCK - ACACIA WOOD PLANKS + if(e.getCurrentItem().getType() == Material.WOOD && e.getCurrentItem().getData().getData() == 4) + { + if(econ.getBalance(p.getName()) < wood4price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOD, wood4amount, (short) 4)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wood4price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wood4amount + ChatColor.RED + " Acacia Wood Planks for " + ChatColor.GREEN + wood4price + " " + servercurrency); + } + } + + //BLOCK - DARK OAK WOOD PLANKS + if(e.getCurrentItem().getType() == Material.WOOD && e.getCurrentItem().getData().getData() == 5) + { + if(econ.getBalance(p.getName()) < wood5price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOD, wood5amount, (short) 5)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wood5price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wood5amount + ChatColor.RED + " Dark Oak Wood Planks for " + ChatColor.GREEN + wood5price + " " + servercurrency); + } + } + + //BLOCK - SAND + if(e.getCurrentItem().getType() == Material.SAND && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < sandprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.SAND, sandamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), sandprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + sandamount + ChatColor.RED + " Sand for " + ChatColor.GREEN + sandprice + " " + servercurrency); + } + } + + //BLOCK - RED SAND + if(e.getCurrentItem().getType() == Material.SAND && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < sand1price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.SAND, sand1amount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), sand1price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + sand1amount + ChatColor.RED + " Red Sand for " + ChatColor.GREEN + sand1price + " " + servercurrency); + } + } + + //BLOCK - GRAVEL + if(e.getCurrentItem().getType() == Material.GRAVEL) + { + if(econ.getBalance(p.getName()) < gravelprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.GRAVEL, gravelamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), gravelprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + gravelamount + ChatColor.RED + " Gravel for " + ChatColor.GREEN + gravelprice + " " + servercurrency); + } + + } + + //BLOCK - OAK WOOD + if(e.getCurrentItem().getType() == Material.LOG && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < logprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.LOG, logamount, (short) 0)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), logprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + logamount + ChatColor.RED + " Oak Wood for " + ChatColor.GREEN + logprice + " " + servercurrency); + } + } + + //BLOCK - SPRUCE WOOD + if(e.getCurrentItem().getType() == Material.LOG && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < log1price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.LOG, log1amount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), log1price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + log1amount + ChatColor.RED + " Spruce Wood for " + ChatColor.GREEN + log1price + " " + servercurrency); + } + } + + //BLOCK - BIRCH WOOD + if(e.getCurrentItem().getType() == Material.LOG && e.getCurrentItem().getData().getData() == 2) + { + if(econ.getBalance(p.getName()) < log2price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.LOG, log2amount, (short) 2)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), log2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + log2amount + ChatColor.RED + " Birch Wood for " + ChatColor.GREEN + log2price + " " + servercurrency); + } + } + + //BLOCK - JUNGLE WOOD + if(e.getCurrentItem().getType() == Material.LOG && e.getCurrentItem().getData().getData() == 3) + { + if(econ.getBalance(p.getName()) < log3price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.LOG, log3amount, (short) 3)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), log3price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + log3amount + ChatColor.RED + " Jungle Wood for " + ChatColor.GREEN + log3price + " " + servercurrency); + } + } + + //BLOCK - GLASS + if(e.getCurrentItem().getType() == Material.GLASS) + { + if(econ.getBalance(p.getName()) < glassprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.GLASS, glassamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), glassprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + glassamount + ChatColor.RED + " Glass for " + ChatColor.GREEN + glassprice + " " + servercurrency); + } + } + + //BLOCK - LAPIS LAZULI + if(e.getCurrentItem().getType() == Material.LAPIS_BLOCK) + { + if(econ.getBalance(p.getName()) < lapisblockprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.LAPIS_BLOCK, lapisblockamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), lapisblockprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + lapisblockamount + ChatColor.RED + " Lapis Lazuli Block for " + ChatColor.GREEN + lapisblockprice + " " + servercurrency); + } + } + + //BLOCK - SANDSTONE + if(e.getCurrentItem().getType() == Material.SANDSTONE && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < sandstoneprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.SANDSTONE, sandstoneamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), sandstoneprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + sandstoneamount + ChatColor.RED + " Sandstone for " + ChatColor.GREEN + sandstoneprice + " " + servercurrency); + } + } + + //BLOCK - CHISELED SANDSTONE + if(e.getCurrentItem().getType() == Material.SANDSTONE && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < sandstone2price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.SANDSTONE, sandstone2amount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), sandstone2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + sandstone2amount + ChatColor.RED + " Chiseled Sandstone for " + ChatColor.GREEN + sandstone2price + " " + servercurrency); + } + } + + //BLOCK - SMOOTH SANDSTONE + if(e.getCurrentItem().getType() == Material.SANDSTONE && e.getCurrentItem().getData().getData() == 2) + { + if(econ.getBalance(p.getName()) < sandstone3price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.SANDSTONE, sandstone3amount, (short) 3)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), sandstone3price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + sandstone3amount + ChatColor.RED + " Smooth Sandstone for " + ChatColor.GREEN + sandstone3price + " " + servercurrency); + } + } + + //BLOCK - WHITE WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < woolprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, woolamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), woolprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + woolamount + ChatColor.RED + " White Wool for " + ChatColor.GREEN + woolprice + " " + servercurrency); + } + } + + //BLOCK - ORANGE WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < wool1price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool1amount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool1price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool1amount + ChatColor.RED + " Orange Wool for " + ChatColor.GREEN + wool1price + " " + servercurrency); + } + } + + //BLOCK - MAGENTA WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 2) + { + if(econ.getBalance(p.getName()) < wool2price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool2amount, (short) 2)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool2price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool2amount + ChatColor.RED + " Magenta Wool for " + ChatColor.GREEN + wool2price + " " + servercurrency); + } + } + + //BLOCK - LIGHT BLUE WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 3) + { + if(econ.getBalance(p.getName()) < wool3price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool3amount, (short) 3)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool3price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool3amount + ChatColor.RED + " Light Blue Wool for " + ChatColor.GREEN + wool3price + " " + servercurrency); + } + } + + //BLOCK - YELLOW WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 4) + { + if(econ.getBalance(p.getName()) < wool4price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool4amount, (short) 4)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool4price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool4amount + ChatColor.RED + " Yellow Wool for " + ChatColor.GREEN + wool4price + " " + servercurrency); + } + } + + //BLOCK - LIME WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 5) + { + if(econ.getBalance(p.getName()) < wool5price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool5amount, (short) 5)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool5price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool5amount + ChatColor.RED + " Lime Wool for " + ChatColor.GREEN + wool5price + " " + servercurrency); + } + } + } + + + + + //BUILD INV 2 + + if (e.getInventory().getName().equalsIgnoreCase("§3§lBuilding Blocks §2Page 2")){ + e.setCancelled(true); + + //BUTTONS + //BUTTON - NEXT + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 0 && e.getCurrentItem().getItemMeta().getDisplayName() == "§lNEXT PAGE") + { + p.closeInventory(); + p.getPlayer().openInventory(build3); + } + + //BUTTON - PREV + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 0 && e.getCurrentItem().getItemMeta().getDisplayName() == "§lPREVIOUS PAGE") + { + p.closeInventory(); + p.getPlayer().openInventory(build); + } + + //BUTTON - MAIN + if(e.getCurrentItem().getType() == Material.REDSTONE) + { + p.closeInventory(); + p.getPlayer().openInventory(menu); + } + + //BUTTON - EXIT + if(e.getCurrentItem().getType() == Material.BARRIER) + { + p.closeInventory(); + } + + + //BLOCKS + //BLOCK - PINK WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 6) + { + if(econ.getBalance(p.getName()) < wool6price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool6amount, (short) 6)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool6price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool6amount + ChatColor.RED + " Pink Wool for " + ChatColor.GREEN + wool6price + " " + servercurrency); + } + } + + + //BLOCK - GRAY WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 7) + { + if(econ.getBalance(p.getName()) < wool7price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool7amount, (short) 7)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool7price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool7amount + ChatColor.RED + " Gray Wool for " + ChatColor.GREEN + wool7price + " " + servercurrency); + } + } + + //BLOCK - LIGHT GRAY WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 8) + { + if(econ.getBalance(p.getName()) < wool8price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool8amount, (short) 8)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool8price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool8amount + ChatColor.RED + " Light Gray Wool for " + ChatColor.GREEN + wool8price + " " + servercurrency); + } + } + + //BLOCK - CYAN WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 9) + { + if(econ.getBalance(p.getName()) < wool9price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool9amount, (short) 9)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool9price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool9amount + ChatColor.RED + " Cyan Wool for " + ChatColor.GREEN + wool9price + " " + servercurrency); + } + } + + //BLOCK - PURPLE WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 10) + { + if(econ.getBalance(p.getName()) < wool10price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool10amount, (short) 10)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool10price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool10amount + ChatColor.RED + " Purple Wool for " + ChatColor.GREEN + wool10price + " " + servercurrency); + } + } + + //BLOCK - BLUE WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 11) + { + if(econ.getBalance(p.getName()) < wool11price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool11amount, (short) 11)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool11price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool11amount + ChatColor.RED + " Blue Wool for " + ChatColor.GREEN + wool11price + " " + servercurrency); + } + } + + //BLOCK - BROWN WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 12) + { + if(econ.getBalance(p.getName()) < wool12price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool12amount, (short) 12)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool12price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool12amount + ChatColor.RED + " Brown Wool for " + ChatColor.GREEN + wool12price + " " + servercurrency); + } + } + + //BLOCK - GREEN WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 13) + { + if(econ.getBalance(p.getName()) < wool13price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool13amount, (short) 13)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool13price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool13amount + ChatColor.RED + " Green Wool for " + ChatColor.GREEN + wool13price + " " + servercurrency); + } + } + + //BLOCK - RED WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 14) + { + if(econ.getBalance(p.getName()) < wool14price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool14amount, (short) 14)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool14price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool14amount + ChatColor.RED + " Red Wool for " + ChatColor.GREEN + wool14price + " " + servercurrency); + } + } + + //BLOCK - BLACK WOOL + if(e.getCurrentItem().getType() == Material.WOOL && e.getCurrentItem().getData().getData() == 15) + { + if(econ.getBalance(p.getName()) < wool15price) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.WOOL, wool15amount, (short) 15)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), wool15price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + wool15amount + ChatColor.RED + " Black Wool for " + ChatColor.GREEN + wool15price + " " + servercurrency); + } + } + + //BLOCK - GOLD BLOCK + if(e.getCurrentItem().getType() == Material.GOLD_BLOCK) + { + if(econ.getBalance(p.getName()) < goldblockprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.GOLD_BLOCK, goldblockamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), goldblockprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + goldblockamount + ChatColor.RED + " Gold Block for " + ChatColor.GREEN + goldblockprice + " " + servercurrency); + } + } + + //BLOCK - IRON BLOCK + if(e.getCurrentItem().getType() == Material.IRON_BLOCK) + { + if(econ.getBalance(p.getName()) < ironblockprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.IRON_BLOCK, ironblockamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), ironblockprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + ironblockamount + ChatColor.RED + " Iron Block for " + ChatColor.GREEN + ironblockprice + " " + servercurrency); + } + } + + //BLOCK - STONE SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < stoneslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, stoneslabamount, (short) 0)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), stoneslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + stoneslabamount + ChatColor.RED + " Stone Slab for " + ChatColor.GREEN + stoneslabprice + " " + servercurrency); + } + } + + //BLOCK - SANDSTONE SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 1) + { + if(econ.getBalance(p.getName()) < sandstoneslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, sandstoneslabamount, (short) 1)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), sandstoneslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + sandstoneslabamount + ChatColor.RED + " Sandstone Slab for " + ChatColor.GREEN + sandstoneslabprice + " " + servercurrency); + } + } + + //BLOCK - COBBLESTONE SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 3) + { + if(econ.getBalance(p.getName()) < cobblestoneslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, cobblestoneslabamount, (short) 3)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), cobblestoneslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + cobblestoneslabamount + ChatColor.RED + " Cobblestone Slab for " + ChatColor.GREEN + cobblestoneslabprice + " " + servercurrency); + } + } + + //BLOCK - BRICK SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 4) + { + if(econ.getBalance(p.getName()) < brickslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, brickslabamount, (short) 4)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), brickslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + brickslabamount + ChatColor.RED + " Brick Slab for " + ChatColor.GREEN + brickslabprice + " " + servercurrency); + } + } + + //BLOCK - STONE BRICK SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 5) + { + if(econ.getBalance(p.getName()) < stonebrickslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, stonebrickslabamount, (short) 5)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), stonebrickslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + stonebrickslabamount + ChatColor.RED + " Stone Brick Slab for " + ChatColor.GREEN + stonebrickslabprice + " " + servercurrency); + } + } + + //BLOCK - NETHER BRICK SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 6) + { + if(econ.getBalance(p.getName()) < netherbrickslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, netherbrickslabamount, (short) 6)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), netherbrickslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + netherbrickslabamount + ChatColor.RED + " Nether Brick Slab for " + ChatColor.GREEN + netherbrickslabprice + " " + servercurrency); + } + } + + //BLOCK - QUARTZ SLAB + if(e.getCurrentItem().getType() == Material.STEP && e.getCurrentItem().getData().getData() == 7) + { + if(econ.getBalance(p.getName()) < quartzslabprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.STEP, quartzslabamount, (short) 7)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), quartzslabprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + quartzslabamount + ChatColor.RED + " Quartz Slab for " + ChatColor.GREEN + quartzslabprice + " " + servercurrency); + } + } + + //BLOCK - BRICKS + if(e.getCurrentItem().getType() == Material.BRICK) + { + checkout(p, Material.BRICK, 999); + + } + + //BLOCK - BOOKSHELF + if(e.getCurrentItem().getType() == Material.BOOKSHELF) + { + checkout(p, Material.BOOKSHELF, 999); + } + + //BLOCK - MOSS STONE + if(e.getCurrentItem().getType() == Material.MOSSY_COBBLESTONE) + { + checkout(p, Material.MOSSY_COBBLESTONE, 999); + } + + //BLOCK - OBSIDIAN + if(e.getCurrentItem().getType() == Material.OBSIDIAN) + { + checkout(p, Material.OBSIDIAN, 999); + } + + //BLOCK - OAK WOOD STAIRS + if(e.getCurrentItem().getType() == Material.WOOD_STAIRS) + { + checkout(p, Material.WOOD_STAIRS, 999); + } + + //BLOCK - DIAMOND BLOCK + if(e.getCurrentItem().getType() == Material.DIAMOND_BLOCK) + { + checkout(p, Material.DIAMOND_BLOCK, 999); + } + + //BLOCK - COBBLESTONE STAIRS + if(e.getCurrentItem().getType() == Material.COBBLESTONE_STAIRS) + { + checkout(p, Material.COBBLESTONE_STAIRS, 999); + } + + //BLOCK - ICE + if(e.getCurrentItem().getType() == Material.ICE) + { + checkout(p, Material.ICE, 999); + } + + //BLOCK - SNOW + if(e.getCurrentItem().getType() == Material.SNOW) + { + checkout(p, Material.SNOW, 999); + } + + //BLOCK - CLAY + if(e.getCurrentItem().getType() == Material.CLAY) + { + checkout(p, Material.CLAY, 999); + } + + //BLOCK - PUMPKIN + if(e.getCurrentItem().getType() == Material.PUMPKIN) + { + checkout(p, Material.PUMPKIN, 999); + } + + //BLOCK - NETHERRACK + if(e.getCurrentItem().getType() == Material.NETHERRACK) + { + checkout(p, Material.NETHERRACK, 999); + } + + //BLOCK - SOUL SAND + if(e.getCurrentItem().getType() == Material.SOUL_SAND) + { + checkout(p, Material.SOUL_SAND, 999); + } + + //BLOCK - GLOWSTONE + if(e.getCurrentItem().getType() == Material.GLOWSTONE) + { + checkout(p, Material.GLOWSTONE, 999); + } + + //BLOCK JACK O' LANTERN + if(e.getCurrentItem().getType() == Material.JACK_O_LANTERN) + { + checkout(p, Material.JACK_O_LANTERN, 999); + } + + //BLOCK - WHITE STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 0) { + checkout(p, Material.STAINED_GLASS, 0); + } + + //BLOCK - ORANGE STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 1) { + checkout(p, Material.STAINED_GLASS, 1); + } + } + + + //BUILD INV 3 + + if (e.getInventory().getName().equalsIgnoreCase("§3§lBuilding Blocks §2Page 3")){ + e.setCancelled(true); + + //BUTTONS + //BUTTON - NEXT + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 0 && e.getCurrentItem().getItemMeta().getDisplayName() == "§lNEXT PAGE") + { + p.closeInventory(); + p.getPlayer().openInventory(build); + } + + //BUTTON - PREV + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 0 && e.getCurrentItem().getItemMeta().getDisplayName() == "§lPREVIOUS PAGE") + { + p.closeInventory(); + p.getPlayer().openInventory(build2); + } + + //BUTTON - MAIN + if(e.getCurrentItem().getType() == Material.REDSTONE) + { + p.closeInventory(); + p.getPlayer().openInventory(menu); + } + + //BUTTON - EXIT + if(e.getCurrentItem().getType() == Material.BARRIER) + { + p.closeInventory(); + } + + + //BLOCKS + //BLOCK - MAGENTA STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 2) + { + checkout(p, Material.STAINED_GLASS, 2); + } + + //BLOCK - LIGHT BLUE STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 3) + { + checkout(p, Material.STAINED_GLASS, 3); + } + + //BLOCK - YELLOW STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 4) + { + checkout(p, Material.STAINED_GLASS, 4); + } + + //BLOCK - LIME STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 5) + { + checkout(p, Material.STAINED_GLASS, 5); + } + + //BLOCK - PINK STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 6) + { + checkout(p, Material.STAINED_GLASS, 6); + } + + //BLOCK - GRAY STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 7) + { + checkout(p, Material.STAINED_GLASS, 7); + } + + //BLOCK - LIGHT GRAY STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 8) + { + checkout(p, Material.STAINED_GLASS, 8); + } + + //BLOCK - CYAN STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 9) + { + + checkout(p, Material.STAINED_GLASS, 9); + } + + //BLOCK - PURPLE STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 10) + { + checkout(p, Material.STAINED_GLASS, 10); + } + + //BLOCK - BLUE STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 11) + { + checkout(p, Material.STAINED_GLASS, 11); + } + + //BLOCK - BROWN STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 12) + { + checkout(p, Material.STAINED_GLASS, 12); + } + + //BLOCK - GREEN STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 13) + { + checkout(p, Material.STAINED_GLASS, 13); + } + + //BLOCK - RED STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 14) + { + checkout(p, Material.STAINED_GLASS, 14); + } + + //BLOCK - BLACK STAINED GLASS + if(e.getCurrentItem().getType() == Material.STAINED_GLASS && e.getCurrentItem().getData().getData() == 15) + { + checkout(p, Material.STAINED_GLASS, 15); + } + + //BLOCK - STONE BRICKS + if(e.getCurrentItem().getType() == Material.SMOOTH_BRICK && e.getCurrentItem().getData().getData() == 0) + { + checkout(p, Material.SMOOTH_BRICK, 0); + } + + //BLOCK - MOSSY STONE BRICKS + if(e.getCurrentItem().getType() == Material.SMOOTH_BRICK && e.getCurrentItem().getData().getData() == 1) + { + checkout(p,Material.SMOOTH_BRICK, 1); + } + + //BLOCK - CRACKED STONE BRICKS + if(e.getCurrentItem().getType() == Material.SMOOTH_BRICK && e.getCurrentItem().getData().getData() == 2) + { + checkout(p, Material.SMOOTH_BRICK, 2); + } + + //BLOCK - CHISELED STONE BRICKS + if(e.getCurrentItem().getType() == Material.SMOOTH_BRICK && e.getCurrentItem().getData().getData() == 3) + { + checkout(p, Material.SMOOTH_BRICK, 3); + } + + //BLOCK - MELON + if(e.getCurrentItem().getType() == Material.MELON_BLOCK) + { + checkout(p, Material.MELON_BLOCK, 999); + } + + //BLOCK - BRICK STAIRS + if(e.getCurrentItem().getType() == Material.BRICK_STAIRS) + { + checkout(p, Material.BRICK_STAIRS, 999); + } + + //BLOCK - STONE BRICK STAIRS + if(e.getCurrentItem().getType() == Material.SMOOTH_STAIRS) + { + checkout(p, Material.SMOOTH_STAIRS, 999); + } + + //BLOCK - MYCELIUM + if(e.getCurrentItem().getType() == Material.MYCEL) + { + checkout(p, Material.MYCEL, 999); + } + + //BLOCK - NETHER BRICK + if(e.getCurrentItem().getType() == Material.NETHER_BRICK) + { + checkout(p, Material.NETHER_BRICK, 999); + } + + //BLOCK - NETHER BRICK STAIRS + if(e.getCurrentItem().getType() == Material.NETHER_BRICK_STAIRS) + { + checkout(p, Material.NETHER_BRICK_STAIRS, 999); + } + + //BLOCK - END STONE + if(e.getCurrentItem().getType() == Material.ENDER_STONE) + { + checkout(p, Material.ENDER_STONE, 999); + } + + //BLOCK . OAK WOOD SLAB + if(e.getCurrentItem().getType() == Material.WOOD_STEP && e.getCurrentItem().getData().getData() == 0) + { + checkout(p, Material.WOOD_STEP, 0); + } + + //BLOCK - SPRUCE WOOD SLAB + if(e.getCurrentItem().getType() == Material.WOOD_STEP && e.getCurrentItem().getData().getData() == 1) + { + checkout(p, Material.WOOD_STEP, 1); + } + + //BLOCK - BIRCH WOOD SLAB + if(e.getCurrentItem().getType() == Material.WOOD_STEP && e.getCurrentItem().getData().getData() == 2) + { + checkout(p, Material.WOOD_STEP, 2); + } + + //BLOCK - Jungle WOOD SLAB + if(e.getCurrentItem().getType() == Material.WOOD_STEP && e.getCurrentItem().getData().getData() == 3) + { + checkout(p, Material.WOOD_STEP, 3); + } + + + } + + + //DECO INV 1 + if(e.getInventory().getName().equalsIgnoreCase("§3§lDecoration Blocks §2Page 1")) + { + e.setCancelled(true); + + //BUTTON - NEXT + if(e.getCurrentItem().getType() == Material.DOUBLE_PLANT && e.getCurrentItem().getData().getData() == 0 && e.getCurrentItem().getItemMeta().getDisplayName() == "§lNEXT PAGE") + { + p.closeInventory(); + p.openInventory(deco); + } + + + //BUTTON - MAIN + if(e.getCurrentItem().getType() == Material.REDSTONE) + { + p.closeInventory(); + p.openInventory(menu); + } + + //BUTTON - EXIT + if(e.getCurrentItem().getType() == Material.BARRIER) + { + p.closeInventory(); + } + + + //DECO ITEMS + //ITEM - OAK SAPLING + if(e.getCurrentItem().getType() == Material.SAPLING && e.getCurrentItem().getData().getData() == 0) + { + if(econ.getBalance(p.getName()) < saplingprice) + { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + p.getInventory().addItem(new ItemStack(Material.SAPLING, saplingamount)); + EconomyResponse r = econ.withdrawPlayer(p.getName(), saplingprice); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.GREEN + saplingamount + ChatColor.RED + " Oak Sapling for " + ChatColor.GREEN + saplingprice + " " + servercurrency); + } + } + } + + + + } + + + + + + + + + @SuppressWarnings("deprecation") + public void checkout(Player p, Material mat, int meta) { + + int price; + int amount; + if(meta == 999) { + price = getConfig().getInt("Price." + mat); + } else { + price = getConfig().getInt("Price." + mat + "_" + meta); + } + if(meta == 999) { + amount = getConfig().getInt("Amount." + mat); + } else { + amount = getConfig().getInt("Amount." + mat + "_" + meta); + } + + String name = check_name(mat, meta); + + if(econ.getBalance(p.getName()) < price) { + p.sendMessage(shopprefix + ChatColor.RED + "You have not enough money to buy this!"); + return; + } else { + if(meta == 999) + { + p.getInventory().addItem(new ItemStack(mat, amount)); + } else { + p.getInventory().addItem(new ItemStack(mat, amount, (short)meta)); + } + EconomyResponse r = econ.withdrawPlayer(p.getName(), price); + p.sendMessage(shopprefix + ChatColor.RED + "You bought " + ChatColor.DARK_GREEN + amount + ChatColor.RED + " " + name + " " + ChatColor.GREEN + price + " " + servercurrency); + } + + } + + public String check_name(Material mat, int meta) { + + String name = ""; + + switch(mat) { + case WOOD_STEP:{ + switch(meta) { + case 0:{ + name = "Oak Wood Slab"; + break; + } + case 1:{ + name = "Spruce Wood Slab"; + break; + } + case 2:{ + name = "Birch Wood Slab"; + break; + } + case 3:{ + name = "Junge Wood Slab"; + break; + } + } + break; + } + case ENDER_STONE:{ + name = "End Stone"; + break; + } + case NETHER_BRICK_STAIRS:{ + name = "Nether Brick Stairs"; + break; + } + case NETHER_BRICK:{ + name = "Nether Brick"; + break; + } + case MYCEL:{ + name = "Mycelium"; + break; + } + case SMOOTH_STAIRS: { + name = "Stone Brick Stairs"; + break; + } + case BRICK_STAIRS:{ + name = "Brick Stairs"; + break; + } + case MELON_BLOCK:{ + name = "Melon Block"; + break; + } + case SMOOTH_BRICK:{ + switch(meta) { + case 3:{ + name = "Chiseled Stone Brick"; + break; + } + case 2:{ + name = "Cracked Stone Brick"; + break; + } + case 1:{ + name = "Mossy Stone Brick"; + break; + } + case 0:{ + name = "Stone Brick"; + break; + } + } + } + case STAINED_GLASS:{ + switch(meta) { + case 15:{ + name = "Black Stained Glass"; + break; + } + case 14:{ + name = "Red Stained Glass"; + break; + } + case 13:{ + name = "Green Stained Glass"; + break; + } + case 12:{ + name = "Brown Stained Glass"; + break; + } + case 11:{ + name = "Blue Stained Glass"; + break; + } + case 10:{ + name = "Purple Stained Glass"; + break; + } + case 9:{ + name = "Cyan Stained Glass"; + break; + } + case 8:{ + name = "Light Gray Stained Glass"; + break; + } + case 7:{ + name = "Gray Stained Glass"; + break; + } + case 6:{ + name = "Pink Stained Glass"; + break; + } + case 5:{ + name = "Line Stained Glass"; + break; + } + case 4:{ + name = "Yellow Stained Glass"; + break; + } + case 3:{ + name = "Light Blue Stained Glass"; + break; + } + case 2:{ + name = "Magenta Stained Glass"; + break; + } + case 1:{ + name = "Orange Stained Glass"; + break; + } + case 0:{ + name = "White Stained Glass"; + break; + } + } + } + case JACK_O_LANTERN:{ + name = "Jack o' Lantern"; + break; + } + case GLOWSTONE:{ + name = "Glowstone"; + break; + } + case SOUL_SAND:{ + name = "Soul Sand"; + break; + } + case NETHERRACK:{ + name = "Netherrack"; + break; + } + case PUMPKIN:{ + name = "Pumpkin"; + break; + } + case CLAY:{ + name = "Clay"; + break; + } + case SNOW:{ + name = "Snow"; + } + case ICE:{ + name = "Ice"; + break; + } + case COBBLESTONE_STAIRS:{ + name = "Cobblestone Stairs"; + break; + } + case DIAMOND_BLOCK:{ + name = "Diamond Block"; + break; + } + case WOOD_STAIRS:{ + name = "Oak Wood Stairs"; + break; + } + case OBSIDIAN:{ + name = "Obsidian"; + break; + } + case MOSSY_COBBLESTONE:{ + name = "Moss Stone"; + break; + } + case BOOKSHELF:{ + name = "Bookshelf"; + break; + } + case BRICK:{ + name = "Bricks"; + break; + } + default:{ + break; + } + } + return name; + } + + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { + + + String cmdprefix = ChatColor.GRAY + "[" + ChatColor.DARK_GREEN + "Inv" + ChatColor.DARK_RED + "AdminShop" + ChatColor.GRAY + "]"; + + //Basic Commands + if(cmd.getName().equals("invadminshop")) + { + + if(args.length > 0) + { + + sender.sendMessage(cmdprefix + ChatColor.RED + "Too many Arguments! Please use /invadminshop"); + + return true; + } + + if(args.length == 0) + { + sender.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "#######################"); + sender.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "InvAdminShop"); + sender.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "Made by: V01D"); + sender.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "Version : 1.0"); + sender.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "For help use : " + ChatColor.DARK_RED + "" + ChatColor.BOLD + "/invadminshop-help"); + sender.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "######################"); + + return true; + } + + + + } + + + if(cmd.getName().equals("invadminshop-help")) + { + if(args.length > 0) + { + + sender.sendMessage(cmdprefix + ChatColor.RED + "Too many Arguments! Please use /invadminshop"); + + return true; + } + + if(args.length == 0) + { + sender.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "#######################"); + sender.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "InvAdminShop Help"); + sender.sendMessage(ChatColor.YELLOW + "" + ChatColor.BOLD + "/invadminshop " + ChatColor.AQUA + "" + ChatColor.BOLD + "Shows the Plugin Info."); + sender.sendMessage(ChatColor.YELLOW + "" + ChatColor.BOLD + "/invadminshop-help " + ChatColor.AQUA + "" + ChatColor.BOLD + "Shows the this Text."); + sender.sendMessage(ChatColor.YELLOW + "" + ChatColor.BOLD + "/invadminshop-reload" + ChatColor.AQUA + "" + ChatColor.BOLD + "Reloads the Plugin."); + sender.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "#######################"); + + return true; + } + } + + + if(cmd.getName().equals("invadminshop-reload")) + { + if(args.length > 0) + { + + sender.sendMessage(cmdprefix + ChatColor.RED + "Too many Arguments! Please use /invadminshop"); + + return true; + } + + if(args.length == 0) + { + + this.reloadConfig(); + sender.sendMessage(cmdprefix + ChatColor.RED + "Reloaded Config."); + + return true; + } + } + + + //MAIN MENU + Player p = (Player) sender; + + + if (cmd.getName().equals("adminshop")) { + + menu = p.getPlayer().getServer().createInventory(null, 36, "§6§lAdminShop"); + List infoLore = new ArrayList(); + + //SHOP-WARP BUILDING BLOCKS + ItemStack build = new ItemStack(Material.GRASS); + ItemMeta buildMeta = build.getItemMeta(); + buildMeta.setDisplayName("§3§lBuilding Blocks"); + build.setItemMeta(buildMeta); + + //SHOP_WARP DECORATION BLOCKS + ItemStack deco = new ItemStack(Material.DOUBLE_PLANT, 1, (short) 5); + ItemMeta decoMeta = deco.getItemMeta(); + decoMeta.setDisplayName("§3§lDecoration Blocks"); + deco.setItemMeta(decoMeta); + + + + //BUTTON - EXIT + ItemStack exit = new ItemStack(Material.BARRIER, 1); + ItemMeta exitMeta = exit.getItemMeta(); + exitMeta.setDisplayName("§4§lEXIT"); + exit.setItemMeta(exitMeta); + + //MISC - NONE + ItemStack none = new ItemStack(Material.STAINED_GLASS_PANE, 1 , (short) 15); + ItemMeta noneMeta = none.getItemMeta(); + noneMeta.setDisplayName("§4"); + none.setItemMeta(noneMeta); + + //MISC - INFO + ItemStack info = new ItemStack(Material.MAP, 1); + ItemMeta infoMeta = info.getItemMeta(); + infoMeta.setDisplayName("§3§lPLUGIN INFOS"); + infoLore.add("§4"); + info.setItemMeta(infoMeta); + + menu.setItem(0, none); + menu.setItem(1, none); + menu.setItem(2, none); + menu.setItem(3, none); + menu.setItem(4, none); + menu.setItem(5, none); + menu.setItem(6, none); + menu.setItem(7, none); + menu.setItem(8, none); + menu.setItem(9, none); + menu.setItem(10, build); + menu.setItem(11, deco); + + menu.setItem(17, none); + menu.setItem(18, none); + menu.setItem(19, none); + menu.setItem(20, none); + + menu.setItem(24, none); + menu.setItem(25, none); + menu.setItem(26, none); + menu.setItem(27, exit); + menu.setItem(28, none); + menu.setItem(29, none); + menu.setItem(30, none); + menu.setItem(31, none); + menu.setItem(32, none); + menu.setItem(33, none); + menu.setItem(34, none); + menu.setItem(35, info); + + + p.getPlayer().openInventory(menu); + + + return true; + } + + + return false; + + } + + +}