package net.ultibyte.UltiMarket1; import org.bukkit.plugin.java.*; import java.util.logging.*; import net.milkbowl.vault.economy.*; import net.milkbowl.vault.permission.*; import java.io.*; import org.bukkit.plugin.*; import java.math.*; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.inventory.*; import java.util.*; import org.bukkit.command.*; public final class UltiMarket extends JavaPlugin { private static final Logger log; public static Economy econ; public static Permission perms; boolean didThingsOccur; static { log = Logger.getLogger("Minecraft"); UltiMarket.econ = null; UltiMarket.perms = null; } private void loadConfig() { this.getConfig().options().copyDefaults(true); this.saveConfig(); } public void onEnable() { this.getLogger().info("Yay! UltiMarket hasn't imploded on startup! =D"); if (!this.setupEconomy()) { UltiMarket.log.severe(String.format("UltiMarket has been disabled because you forgot to put Vault in! It's useless without it :(", this.getDescription().getName())); this.getServer().getPluginManager().disablePlugin((Plugin)this); return; } this.loadConfig(); if (this.getConfig().getBoolean("announcemostleastexpensiveitem")) { this.ExpensiveClock(); } if (this.getConfig().getBoolean("randompricechanges")) { this.priceDropClock(); } try { final MetricsLite metrics = new MetricsLite((Plugin)this); metrics.start(); } catch (IOException ex) {} } public void onDisable() { this.getLogger().info("*UltiMarket waves as it fades off your server...*"); } private boolean setupEconomy() { if (this.getServer().getPluginManager().getPlugin("Vault") == null) { return false; } final RegisteredServiceProvider rsp = (RegisteredServiceProvider)this.getServer().getServicesManager().getRegistration((Class)Economy.class); if (rsp == null) { return false; } UltiMarket.econ = (Economy)rsp.getProvider(); return UltiMarket.econ != null; } private void ExpensiveClock() { this.getServer().getScheduler().scheduleSyncDelayedTask((Plugin)this, (Runnable)new Runnable() { @Override public void run() { UltiMarket.this.announceMostExpensive(); UltiMarket.this.CheapClock(); } }, this.getConfig().getLong("amleifrequency") * 60L * 20L); } private void CheapClock() { this.getServer().getScheduler().scheduleSyncDelayedTask((Plugin)this, (Runnable)new Runnable() { @Override public void run() { UltiMarket.this.announceLeastExpensive(); UltiMarket.this.ExpensiveClock(); } }, this.getConfig().getLong("amleifrequency") * 60L * 20L); } private void priceDropClock() { this.getServer().getScheduler().scheduleSyncDelayedTask((Plugin)this, (Runnable)new Runnable() { @Override public void run() { if (MethodsForReference.main(2, 1) == 1) { UltiMarket.this.priceDropper(); UltiMarket.this.priceDropClock(); } else { UltiMarket.this.priceRaiser(); UltiMarket.this.priceDropClock(); } } }, (long)MethodsForReference.main(144000, 20)); } public void announceMostExpensive() { final ArrayList originalPriceList = this.listOfItemPrices(); ArrayList priceList = this.listOfItemPrices(); ArrayList nameList = this.listItemConfigNames(); priceList = MethodsForReference.priceReturningBubblesortHighest(originalPriceList, nameList); nameList = MethodsForReference.nameReturningBubblesortHighest(originalPriceList, nameList); this.getServer().broadcastMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The most " + ChatColor.GOLD + "expensive " + ChatColor.YELLOW + "item " + ChatColor.GREEN + "on the " + ChatColor.AQUA + "market " + ChatColor.GREEN + "at the minute is: " + ChatColor.YELLOW + nameList.get(0) + ChatColor.GREEN + " at " + ChatColor.GOLD + priceList.get(0) + ChatColor.AQUA + " " + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); } private void announceLeastExpensive() { final ArrayList originalPriceList = this.listOfItemPrices(); ArrayList priceList = this.listOfItemPrices(); ArrayList nameList = this.listItemConfigNames(); priceList = MethodsForReference.priceReturningBubblesortLowest(originalPriceList, nameList); nameList = MethodsForReference.nameReturningBubblesortLowest(originalPriceList, nameList); this.getServer().broadcastMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The least " + ChatColor.GOLD + "expensive " + ChatColor.YELLOW + "item " + ChatColor.GREEN + "on the " + ChatColor.AQUA + "market " + ChatColor.GREEN + "at the minute is: " + ChatColor.YELLOW + nameList.get(0) + ChatColor.GREEN + " at " + ChatColor.GOLD + priceList.get(0) + ChatColor.AQUA + " " + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); } private void priceDropper() { final ArrayList priceList = this.listOfItemPrices(); final ArrayList nameList = this.listItemConfigNames(); final int selectedItemListIndex = MethodsForReference.main(0, priceList.size()); final String configName = nameList.get(selectedItemListIndex); final int lowerPercentageBound = this.getConfig().getInt("lowestpricechangepercentage"); final int upperPercentageBound = this.getConfig().getInt("highestpricechangepercentage"); final int intPriceDropPercentage = MethodsForReference.main(lowerPercentageBound, upperPercentageBound); final double priceDropPercentage = intPriceDropPercentage; final double priceDropFraction = (100.0 - priceDropPercentage) / 100.0; double price = this.getConfig().getDouble("items." + configName + ".actualprice"); double originalPrice = this.getConfig().getDouble("items." + configName + ".price"); double newPrice = price * priceDropFraction; double priceDropPercentageDouble = 100.0 - priceDropFraction * 100.0; final BigDecimal bigDec1 = new BigDecimal(priceDropPercentageDouble).setScale(2, RoundingMode.HALF_UP); priceDropPercentageDouble = bigDec1.doubleValue(); final int priceDropPercentageToAnnounce = (int)priceDropPercentageDouble; final BigDecimal bigDec2 = new BigDecimal(newPrice).setScale(2, RoundingMode.HALF_UP); newPrice = bigDec2.doubleValue(); this.getConfig().set("items." + configName + ".actualprice", (Object)newPrice); if (this.getConfig().getDouble("items." + configName + ".actualprice") < this.getConfig().getDouble("minimumprice")) { this.getConfig().set("items." + configName + ".price", (Object)this.getConfig().getDouble("minimumprice")); } else { this.getConfig().set("items." + configName + ".price", (Object)this.getConfig().getDouble("items." + configName + ".actualprice")); } this.saveConfig(); price = this.getConfig().getDouble("items." + configName + ".price"); final BigDecimal bd = new BigDecimal(originalPrice).setScale(2, RoundingMode.HALF_UP); originalPrice = bd.doubleValue(); this.getServer().broadcastMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.YELLOW + configName + ChatColor.GREEN + "'s price has just " + ChatColor.ITALIC + "dropped" + ChatColor.GREEN + " by " + ChatColor.GOLD + priceDropPercentageToAnnounce + "%" + ChatColor.GREEN + " from " + originalPrice + "!"); this.getServer().broadcastMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.YELLOW + configName + ChatColor.GREEN + " is now worth " + ChatColor.GOLD + price + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); } private void priceRaiser() { final ArrayList priceList = this.listOfItemPrices(); final ArrayList nameList = this.listItemConfigNames(); final int selectedItemListIndex = MethodsForReference.main(0, priceList.size()); final String configName = nameList.get(selectedItemListIndex); final int lowerPercentageBound = this.getConfig().getInt("lowestpricechangepercentage"); final int upperPercentageBound = this.getConfig().getInt("highestpricechangepercentage"); final int intPriceRaisePercentage = MethodsForReference.main(lowerPercentageBound, upperPercentageBound); final double priceRaisePercentage = intPriceRaisePercentage; final double priceRaiseFraction = (100.0 + priceRaisePercentage) / 100.0; double price = this.getConfig().getDouble("items." + configName + ".actualprice"); double originalPrice = this.getConfig().getDouble("items." + configName + ".price"); double newPrice = originalPrice * priceRaiseFraction; double priceRaisePercentageDouble = 100.0 * (priceRaiseFraction - 1.0); final BigDecimal bigDec1 = new BigDecimal(priceRaisePercentageDouble).setScale(2, RoundingMode.HALF_UP); priceRaisePercentageDouble = bigDec1.doubleValue(); final int priceRaisePercentageToAnnounce = (int)priceRaisePercentageDouble; final BigDecimal bigDec2 = new BigDecimal(newPrice).setScale(2, RoundingMode.HALF_UP); newPrice = bigDec2.doubleValue(); this.getConfig().set("items." + configName + ".actualprice", (Object)newPrice); if (this.getConfig().getDouble("items." + configName + ".actualprice") < this.getConfig().getDouble("minimumprice")) { this.getConfig().set("items." + configName + ".price", (Object)this.getConfig().getDouble("minimumprice")); } else { this.getConfig().set("items." + configName + ".price", (Object)this.getConfig().getDouble("items." + configName + ".actualprice")); } this.saveConfig(); price = this.getConfig().getDouble("items." + configName + ".price"); final BigDecimal bd = new BigDecimal(originalPrice).setScale(2, RoundingMode.HALF_UP); originalPrice = bd.doubleValue(); this.getServer().broadcastMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.YELLOW + configName + ChatColor.GREEN + "'s price has just " + ChatColor.ITALIC + "risen" + ChatColor.GREEN + " by " + ChatColor.GOLD + priceRaisePercentageToAnnounce + "%" + ChatColor.GREEN + " from " + originalPrice + "!"); this.getServer().broadcastMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.YELLOW + configName + ChatColor.GREEN + " is now worth " + ChatColor.GOLD + price + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); } private boolean isItDurable(final Material material) { return material == Material.IRON_SPADE || material == Material.IRON_PICKAXE || material == Material.IRON_AXE || material == Material.BOW || material == Material.IRON_SWORD || material == Material.WOOD_SWORD || material == Material.WOOD_SPADE || material == Material.WOOD_PICKAXE || material == Material.WOOD_AXE || material == Material.STONE_SWORD || material == Material.STONE_SPADE || material == Material.STONE_PICKAXE || material == Material.STONE_AXE || material == Material.DIAMOND_SWORD || material == Material.DIAMOND_SPADE || material == Material.DIAMOND_PICKAXE || material == Material.DIAMOND_AXE || material == Material.GOLD_SWORD || material == Material.GOLD_SPADE || material == Material.GOLD_PICKAXE || material == Material.GOLD_AXE || material == Material.WOOD_HOE || material == Material.STONE_HOE || material == Material.IRON_HOE || material == Material.DIAMOND_HOE || material == Material.GOLD_HOE || material == Material.LEATHER_HELMET || material == Material.LEATHER_CHESTPLATE || material == Material.LEATHER_LEGGINGS || material == Material.LEATHER_BOOTS || material == Material.CHAINMAIL_HELMET || material == Material.CHAINMAIL_CHESTPLATE || material == Material.CHAINMAIL_BOOTS || material == Material.IRON_HELMET || material == Material.IRON_CHESTPLATE || material == Material.IRON_LEGGINGS || material == Material.IRON_BOOTS || material == Material.DIAMOND_HELMET || material == Material.DIAMOND_CHESTPLATE || material == Material.DIAMOND_LEGGINGS || material == Material.DIAMOND_BOOTS || material == Material.GOLD_HELMET || material == Material.GOLD_CHESTPLATE || material == Material.GOLD_LEGGINGS || material == Material.GOLD_BOOTS || material == Material.FLINT_AND_STEEL || material == Material.IRON_PICKAXE || material == Material.IRON_PICKAXE || material == Material.IRON_PICKAXE; } private ArrayList listItemConfigNames() { final ArrayList itemNames = new ArrayList(); if (!this.getConfig().getBoolean("items.stone.blacklisted")) { itemNames.add("stone"); } if (!this.getConfig().getBoolean("items.dirt.blacklisted")) { itemNames.add("dirt"); } if (!this.getConfig().getBoolean("items.gravel.blacklisted")) { itemNames.add("gravel"); } if (!this.getConfig().getBoolean("items.sand.blacklisted")) { itemNames.add("sand"); } if (!this.getConfig().getBoolean("items.coal.blacklisted")) { itemNames.add("coal"); } if (!this.getConfig().getBoolean("items.grassblock.blacklisted")) { itemNames.add("grassblock"); } if (!this.getConfig().getBoolean("items.iron.blacklisted")) { itemNames.add("iron"); } if (!this.getConfig().getBoolean("items.snowball.blacklisted")) { itemNames.add("snowball"); } if (!this.getConfig().getBoolean("items.redstone.blacklisted")) { itemNames.add("redstone"); } if (!this.getConfig().getBoolean("items.fence.blacklisted")) { itemNames.add("fence"); } if (!this.getConfig().getBoolean("items.gold.blacklisted")) { itemNames.add("gold"); } if (!this.getConfig().getBoolean("items.ice.blacklisted")) { itemNames.add("ice"); } if (!this.getConfig().getBoolean("items.vine.blacklisted")) { itemNames.add("vine"); } if (!this.getConfig().getBoolean("items.lapislazuli.blacklisted")) { itemNames.add("lapislazuli"); } if (!this.getConfig().getBoolean("items.diamond.blacklisted")) { itemNames.add("diamond"); } if (!this.getConfig().getBoolean("items.web.blacklisted")) { itemNames.add("web"); } if (!this.getConfig().getBoolean("items.cobblestone.blacklisted")) { itemNames.add("cobblestone"); } if (!this.getConfig().getBoolean("items.obsidian.blacklisted")) { itemNames.add("obsidian"); } if (!this.getConfig().getBoolean("items.rail.blacklisted")) { itemNames.add("rail"); } if (!this.getConfig().getBoolean("items.mossycobblestone.blacklisted")) { itemNames.add("mossycobblestone"); } if (!this.getConfig().getBoolean("items.fern.blacklisted")) { itemNames.add("fern"); } if (!this.getConfig().getBoolean("items.mycelium.blacklisted")) { itemNames.add("mycelium"); } if (!this.getConfig().getBoolean("items.yellowflower.blacklisted")) { itemNames.add("yellowflower"); } if (!this.getConfig().getBoolean("items.emerald.blacklisted")) { itemNames.add("emerald"); } if (!this.getConfig().getBoolean("items.lilypad.blacklisted")) { itemNames.add("lilypad"); } if (!this.getConfig().getBoolean("items.brownmushroomblock.blacklisted")) { itemNames.add("brownmushroomblock"); } if (!this.getConfig().getBoolean("items.ironbars.blacklisted")) { itemNames.add("ironbars"); } if (!this.getConfig().getBoolean("items.torch.blacklisted")) { itemNames.add("torch"); } if (!this.getConfig().getBoolean("items.rose.blacklisted")) { itemNames.add("rose"); } if (!this.getConfig().getBoolean("items.redmushroomblock.blacklisted")) { itemNames.add("redmushroomblock"); } if (!this.getConfig().getBoolean("items.cactus.blacklisted")) { itemNames.add("cactus"); } if (!this.getConfig().getBoolean("items.mobspawner.blacklisted")) { itemNames.add("mobspawner"); } if (!this.getConfig().getBoolean("items.sugarcane.blacklisted")) { itemNames.add("sugarcane"); } if (!this.getConfig().getBoolean("items.sign.blacklisted")) { itemNames.add("sign"); } if (!this.getConfig().getBoolean("items.glass.blacklisted")) { itemNames.add("glass"); } if (!this.getConfig().getBoolean("items.chest.blacklisted")) { itemNames.add("chest"); } if (!this.getConfig().getBoolean("items.farmland.blacklisted")) { itemNames.add("farmland"); } if (!this.getConfig().getBoolean("items.brownmushroomtopblock.blacklisted")) { itemNames.add("brownmushroomtopblock"); } if (!this.getConfig().getBoolean("items.glasspane.blacklisted")) { itemNames.add("glasspane"); } if (!this.getConfig().getBoolean("items.ladder.blacklisted")) { itemNames.add("ladder"); } if (!this.getConfig().getBoolean("items.glowstone.blacklisted")) { itemNames.add("glowstone"); } if (!this.getConfig().getBoolean("items.netherrack.blacklisted")) { itemNames.add("netherrack"); } if (!this.getConfig().getBoolean("items.soulsand.blacklisted")) { itemNames.add("soulsand"); } if (!this.getConfig().getBoolean("items.stonebrickstairs.blacklisted")) { itemNames.add("stonebrickstairs"); } if (!this.getConfig().getBoolean("items.hugeredmushroomstem.blacklisted")) { itemNames.add("hugeredmushroomstem"); } if (!this.getConfig().getBoolean("items.hugebrownmushroomstem.blacklisted")) { itemNames.add("hugebrownmushroomstem"); } if (!this.getConfig().getBoolean("items.stonestairs.blacklisted")) { itemNames.add("stonestairs"); } if (!this.getConfig().getBoolean("items.oakwoodstairs.blacklisted")) { itemNames.add("oakwoodstairs"); } if (!this.getConfig().getBoolean("items.sandstonestairs.blacklisted")) { itemNames.add("sandstonestairs"); } if (!this.getConfig().getBoolean("items.wooddoor.blacklisted")) { itemNames.add("wooddoor"); } if (!this.getConfig().getBoolean("items.quartzstairs.blacklisted")) { itemNames.add("quartzstairs"); } if (!this.getConfig().getBoolean("items.craftingtable.blacklisted")) { itemNames.add("craftingtable"); } if (!this.getConfig().getBoolean("items.redstonelamp.blacklisted")) { itemNames.add("redstonelamp"); } if (!this.getConfig().getBoolean("items.pumpkin.blacklisted")) { itemNames.add("pumpkin"); } if (!this.getConfig().getBoolean("items.irondoor.blacklisted")) { itemNames.add("irondoor"); } if (!this.getConfig().getBoolean("items.redstonetorch.blacklisted")) { itemNames.add("redstonetorch"); } if (!this.getConfig().getBoolean("items.carrot.blacklisted")) { itemNames.add("carrot"); } if (!this.getConfig().getBoolean("items.stonebutton.blacklisted")) { itemNames.add("stonebutton"); } if (!this.getConfig().getBoolean("items.woddenpressureplate.blacklisted")) { itemNames.add("woodenpressureplate"); } if (!this.getConfig().getBoolean("items.furnace.blacklisted")) { itemNames.add("furnace"); } if (!this.getConfig().getBoolean("items.potato.blacklisted")) { itemNames.add("potato"); } if (!this.getConfig().getBoolean("items.repeater.blacklisted")) { itemNames.add("repeater"); } if (!this.getConfig().getBoolean("items.birchwoodstairs.blacklisted")) { itemNames.add("birchwoodstairs"); } if (!this.getConfig().getBoolean("items.stonepressureplate.blacklisted")) { itemNames.add("stonepressureplate"); } if (!this.getConfig().getBoolean("items.sprucewoodstairs.blacklisted")) { itemNames.add("sprucewoodstairs"); } if (!this.getConfig().getBoolean("items.jukebox.blacklisted")) { itemNames.add("jukebox"); } if (!this.getConfig().getBoolean("items.piston.blacklisted")) { itemNames.add("piston"); } if (!this.getConfig().getBoolean("items.fencegate.blacklisted")) { itemNames.add("fencegate"); } if (!this.getConfig().getBoolean("items.bed.blacklisted")) { itemNames.add("bed"); } if (!this.getConfig().getBoolean("items.lever.blacklisted")) { itemNames.add("lever"); } if (!this.getConfig().getBoolean("items.trapdoor.blacklisted")) { itemNames.add("trapdoor"); } if (!this.getConfig().getBoolean("items.endstone.blacklisted")) { itemNames.add("endstone"); } if (!this.getConfig().getBoolean("items.tripwirehook.blacklisted")) { itemNames.add("tripwirehook"); } if (!this.getConfig().getBoolean("items.junglewoodstairs.blacklisted")) { itemNames.add("junglewoodstairs"); } if (!this.getConfig().getBoolean("items.woodbutton.blacklisted")) { itemNames.add("woodbutton"); } if (!this.getConfig().getBoolean("items.cauldron.blacklisted")) { itemNames.add("cauldron"); } if (!this.getConfig().getBoolean("items.hopper.blacklisted")) { itemNames.add("hopper"); } if (!this.getConfig().getBoolean("items.noteblock.blacklisted")) { itemNames.add("noteblock"); } if (!this.getConfig().getBoolean("items.jackolantern.blacklisted")) { itemNames.add("jackolantern"); } if (!this.getConfig().getBoolean("items.weightedpressureplateheavy.blacklisted")) { itemNames.add("weightedpressureplateheavy"); } if (!this.getConfig().getBoolean("items.weightedpressureplatelight.blacklisted")) { itemNames.add("weightedpressureplatelight"); } if (!this.getConfig().getBoolean("items.expbottle.blacklisted")) { itemNames.add("expbottle"); } if (!this.getConfig().getBoolean("items.tnt.blacklisted")) { itemNames.add("tnt"); } if (!this.getConfig().getBoolean("items.sponge.blacklisted")) { itemNames.add("sponge"); } if (!this.getConfig().getBoolean("items.string.blacklisted")) { itemNames.add("string"); } if (!this.getConfig().getBoolean("items.stick.blacklisted")) { itemNames.add("stick"); } if (!this.getConfig().getBoolean("items.bow.blacklisted")) { itemNames.add("bow"); } if (!this.getConfig().getBoolean("items.dispenser.blacklisted")) { itemNames.add("dispenser"); } if (!this.getConfig().getBoolean("items.poweredrail.blacklisted")) { itemNames.add("poweredrail"); } if (!this.getConfig().getBoolean("items.detectorrail.blacklisted")) { itemNames.add("detectorrail"); } if (!this.getConfig().getBoolean("items.slimeball.blacklisted")) { itemNames.add("slimeball"); } if (!this.getConfig().getBoolean("items.stickypiston.blacklisted")) { itemNames.add("stickypiston"); } if (!this.getConfig().getBoolean("items.brownmushroom.blacklisted")) { itemNames.add("brownmushroom"); } if (!this.getConfig().getBoolean("items.redmushroom.blacklisted")) { itemNames.add("redmushroom"); } if (!this.getConfig().getBoolean("items.clay.blacklisted")) { itemNames.add("clay"); } if (!this.getConfig().getBoolean("items.brick.blacklisted")) { itemNames.add("brick"); } if (!this.getConfig().getBoolean("items.bricks.blacklisted")) { itemNames.add("bricks"); } if (!this.getConfig().getBoolean("items.paper.blacklisted")) { itemNames.add("paper"); } if (!this.getConfig().getBoolean("items.leather.blacklisted")) { itemNames.add("leather"); } if (!this.getConfig().getBoolean("items.book.blacklisted")) { itemNames.add("book"); } if (!this.getConfig().getBoolean("items.bookshelf.blacklisted")) { itemNames.add("bookshelf"); } if (!this.getConfig().getBoolean("items.cobblestonestairs.blacklisted")) { itemNames.add("cobblestonestairs"); } if (!this.getConfig().getBoolean("items.snowblock.blacklisted")) { itemNames.add("snowblock"); } if (!this.getConfig().getBoolean("items.clayblock.blacklisted")) { itemNames.add("clayblock"); } if (!this.getConfig().getBoolean("items.melonblock.blacklisted")) { itemNames.add("melonblock"); } if (!this.getConfig().getBoolean("items.brickstairs.blacklisted")) { itemNames.add("brickstairs"); } if (!this.getConfig().getBoolean("items.netherbrick.blacklisted")) { itemNames.add("netherbrick"); } if (!this.getConfig().getBoolean("items.enchantmenttable.blacklisted")) { itemNames.add("enchantmenttable"); } if (!this.getConfig().getBoolean("items.endportalframe.blacklisted")) { itemNames.add("endportalframe"); } if (!this.getConfig().getBoolean("items.dragonegg.blacklisted")) { itemNames.add("dragonegg"); } if (!this.getConfig().getBoolean("items.netherstar.blacklisted")) { itemNames.add("netherstar"); } if (!this.getConfig().getBoolean("items.beacon.blacklisted")) { itemNames.add("beacon"); } if (!this.getConfig().getBoolean("items.quartz.blacklisted")) { itemNames.add("quartz"); } if (!this.getConfig().getBoolean("items.activatorrail.blacklisted")) { itemNames.add("activatorrail"); } if (!this.getConfig().getBoolean("items.dropper.blacklisted")) { itemNames.add("dropper"); } if (!this.getConfig().getBoolean("items.seeds.blacklisted")) { itemNames.add("seeds"); } if (!this.getConfig().getBoolean("items.wheat.blacklisted")) { itemNames.add("wheat"); } if (!this.getConfig().getBoolean("items.hayblock.blacklisted")) { itemNames.add("hayblock"); } if (!this.getConfig().getBoolean("items.hardclay.blacklisted")) { itemNames.add("hardclay"); } if (!this.getConfig().getBoolean("items.ironspade.blacklisted")) { itemNames.add("ironspade"); } if (!this.getConfig().getBoolean("items.ironpickaxe.blacklisted")) { itemNames.add("ironpickaxe"); } if (!this.getConfig().getBoolean("items.ironaxe.blacklisted")) { itemNames.add("ironaxe"); } if (!this.getConfig().getBoolean("items.flint.blacklisted")) { itemNames.add("flint"); } if (!this.getConfig().getBoolean("items.flintandsteel.blacklisted")) { itemNames.add("flintandsteel"); } if (!this.getConfig().getBoolean("items.apple.blacklisted")) { itemNames.add("apple"); } if (!this.getConfig().getBoolean("items.feather.blacklisted")) { itemNames.add("feather"); } if (!this.getConfig().getBoolean("items.arrow.blacklisted")) { itemNames.add("arrow"); } if (!this.getConfig().getBoolean("items.ironsword.blacklisted")) { itemNames.add("ironsword"); } if (!this.getConfig().getBoolean("items.woodensword.blacklisted")) { itemNames.add("woodensword"); } if (!this.getConfig().getBoolean("items.woodenspade.blacklisted")) { itemNames.add("woodenspade"); } if (!this.getConfig().getBoolean("items.woodenpickaxe.blacklisted")) { itemNames.add("woodenpickaxe"); } if (!this.getConfig().getBoolean("items.woodenaxe.blacklisted")) { itemNames.add("woodenaxe"); } if (!this.getConfig().getBoolean("items.stonesword.blacklisted")) { itemNames.add("stonesword"); } if (!this.getConfig().getBoolean("items.stonespade.blacklisted")) { itemNames.add("stonespade"); } if (!this.getConfig().getBoolean("items.stonepickaxe.blacklisted")) { itemNames.add("stonepickaxe"); } if (!this.getConfig().getBoolean("items.stoneaxe.blacklisted")) { itemNames.add("stoneaxe"); } if (!this.getConfig().getBoolean("items.diamondsword.blacklisted")) { itemNames.add("diamondsword"); } if (!this.getConfig().getBoolean("items.diamondspade.blacklisted")) { itemNames.add("diamondspade"); } if (!this.getConfig().getBoolean("items.diamondpickaxe.blacklisted")) { itemNames.add("diamondpickaxe"); } if (!this.getConfig().getBoolean("items.diamondaxe.blacklisted")) { itemNames.add("diamondaxe"); } if (!this.getConfig().getBoolean("items.bowl.blacklisted")) { itemNames.add("bowl"); } if (!this.getConfig().getBoolean("items.mushroomsoup.blacklisted")) { itemNames.add("mushroomsoup"); } if (!this.getConfig().getBoolean("items.goldsword.blacklisted")) { itemNames.add("goldsword"); } if (!this.getConfig().getBoolean("items.goldspade.blacklisted")) { itemNames.add("goldspade"); } if (!this.getConfig().getBoolean("items.goldpickaxe.blacklisted")) { itemNames.add("goldpickaxe"); } if (!this.getConfig().getBoolean("items.goldaxe.blacklisted")) { itemNames.add("goldaxe"); } if (!this.getConfig().getBoolean("items.gunpowder.blacklisted")) { itemNames.add("gunpowder"); } if (!this.getConfig().getBoolean("items.woodenhoe.blacklisted")) { itemNames.add("woodenhoe"); } if (!this.getConfig().getBoolean("items.stonehoe.blacklisted")) { itemNames.add("stonehoe"); } if (!this.getConfig().getBoolean("items.ironhoe.blacklisted")) { itemNames.add("ironhoe"); } if (!this.getConfig().getBoolean("items.diamondhoe.blacklisted")) { itemNames.add("diamondhoe"); } if (!this.getConfig().getBoolean("items.goldhoe.blacklisted")) { itemNames.add("goldhoe"); } if (!this.getConfig().getBoolean("items.bread.blacklisted")) { itemNames.add("bread"); } if (!this.getConfig().getBoolean("items.leatherhelmet.blacklisted")) { itemNames.add("leatherhelmet"); } if (!this.getConfig().getBoolean("items.leatherchestplate.blacklisted")) { itemNames.add("leatherchestplate"); } if (!this.getConfig().getBoolean("items.leatherpants.blacklisted")) { itemNames.add("leatherpants"); } if (!this.getConfig().getBoolean("items.leatherboots.blacklisted")) { itemNames.add("leatherboots"); } if (!this.getConfig().getBoolean("items.chainmailhelmet.blacklisted")) { itemNames.add("chainmailhelmet"); } if (!this.getConfig().getBoolean("items.chainmailchestplate.blacklisted")) { itemNames.add("chainmailchestplate"); } if (!this.getConfig().getBoolean("items.chainmailpants.blacklisted")) { itemNames.add("chainmailpants"); } if (!this.getConfig().getBoolean("items.chainmailboots.blacklisted")) { itemNames.add("chainmailboots"); } if (!this.getConfig().getBoolean("items.ironhelmet.blacklisted")) { itemNames.add("ironhelmet"); } if (!this.getConfig().getBoolean("items.ironchestplate.blacklisted")) { itemNames.add("ironchestplate"); } if (!this.getConfig().getBoolean("items.ironpants.blacklisted")) { itemNames.add("ironpants"); } if (!this.getConfig().getBoolean("items.ironboots.blacklisted")) { itemNames.add("ironboots"); } if (!this.getConfig().getBoolean("items.diamondhelmet.blacklisted")) { itemNames.add("diamondhelmet"); } if (!this.getConfig().getBoolean("items.diamondchestplate.blacklisted")) { itemNames.add("diamondchestplate"); } if (!this.getConfig().getBoolean("items.diamondpants.blacklisted")) { itemNames.add("diamondpants"); } if (!this.getConfig().getBoolean("items.diamondboots.blacklisted")) { itemNames.add("diamondboots"); } if (!this.getConfig().getBoolean("items.goldhelmet.blacklisted")) { itemNames.add("goldhelmet"); } if (!this.getConfig().getBoolean("items.goldchestplate.blacklisted")) { itemNames.add("goldchestplate"); } if (!this.getConfig().getBoolean("items.goldpants.blacklisted")) { itemNames.add("goldpants"); } if (!this.getConfig().getBoolean("items.goldboots.blacklisted")) { itemNames.add("goldboots"); } if (!this.getConfig().getBoolean("items.porkchop.blacklisted")) { itemNames.add("porkchop"); } if (!this.getConfig().getBoolean("items.cookedpork.blacklisted")) { itemNames.add("cookedpork"); } if (!this.getConfig().getBoolean("items.painting.blacklisted")) { itemNames.add("painting"); } if (!this.getConfig().getBoolean("items.woodendoor.blacklisted")) { itemNames.add("woodendoor"); } if (!this.getConfig().getBoolean("items.bucket.blacklisted")) { itemNames.add("bucket"); } if (!this.getConfig().getBoolean("items.waterbucket.blacklisted")) { itemNames.add("waterbucket"); } if (!this.getConfig().getBoolean("items.lavabucket.blacklisted")) { itemNames.add("lavabucket"); } if (!this.getConfig().getBoolean("items.minecart.blacklisted")) { itemNames.add("minecart"); } if (!this.getConfig().getBoolean("items.saddle.blacklisted")) { itemNames.add("saddle"); } if (!this.getConfig().getBoolean("items.boat.blacklisted")) { itemNames.add("boat"); } if (!this.getConfig().getBoolean("items.milkbucket.blacklisted")) { itemNames.add("milkbucket"); } if (!this.getConfig().getBoolean("items.storagecart.blacklisted")) { itemNames.add("storagecart"); } if (!this.getConfig().getBoolean("items.egg.blacklisted")) { itemNames.add("egg"); } if (!this.getConfig().getBoolean("items.compass.blacklisted")) { itemNames.add("compass"); } if (!this.getConfig().getBoolean("items.fishingrod.blacklisted")) { itemNames.add("fishingrod"); } if (!this.getConfig().getBoolean("items.watch.blacklisted")) { itemNames.add("watch"); } if (!this.getConfig().getBoolean("items.glowstonedust.blacklisted")) { itemNames.add("glowstonedust"); } if (!this.getConfig().getBoolean("items.fish.blacklisted")) { itemNames.add("fish"); } if (!this.getConfig().getBoolean("items.cookedfish.blacklisted")) { itemNames.add("cookedfish"); } if (!this.getConfig().getBoolean("items.bone.blacklisted")) { itemNames.add("bone"); } if (!this.getConfig().getBoolean("items.sugar.blacklisted")) { itemNames.add("sugar"); } if (!this.getConfig().getBoolean("items.cake.blacklisted")) { itemNames.add("cake"); } if (!this.getConfig().getBoolean("items.cocoabeans.blacklisted")) { itemNames.add("cocoabeans"); } if (!this.getConfig().getBoolean("items.cookie.blacklisted")) { itemNames.add("cookie"); } if (!this.getConfig().getBoolean("items.map.blacklisted")) { itemNames.add("map"); } if (!this.getConfig().getBoolean("items.shears.blacklisted")) { itemNames.add("shears"); } if (!this.getConfig().getBoolean("items.melon.blacklisted")) { itemNames.add("melon"); } if (!this.getConfig().getBoolean("items.pumpkinseeds.blacklisted")) { itemNames.add("pumpkinseeds"); } if (!this.getConfig().getBoolean("items.melonseeds.blacklisted")) { itemNames.add("melonseeds"); } if (!this.getConfig().getBoolean("items.rawbeef.blacklisted")) { itemNames.add("rawbeef"); } if (!this.getConfig().getBoolean("items.cookedbeef.blacklisted")) { itemNames.add("cookedbeef"); } if (!this.getConfig().getBoolean("items.rawchicken.blacklisted")) { itemNames.add("rawchicken"); } if (!this.getConfig().getBoolean("items.rottenflesh.blacklisted")) { itemNames.add("rottenflesh"); } if (!this.getConfig().getBoolean("items.enderpearl.blacklisted")) { itemNames.add("enderpearl"); } if (!this.getConfig().getBoolean("items.blazerod.blacklisted")) { itemNames.add("blazerod"); } if (!this.getConfig().getBoolean("items.ghasttear.blacklisted")) { itemNames.add("ghasttear"); } if (!this.getConfig().getBoolean("items.goldnugget.blacklisted")) { itemNames.add("goldnugget"); } if (!this.getConfig().getBoolean("items.glassbottle.blacklisted")) { itemNames.add("glassbottle"); } if (!this.getConfig().getBoolean("items.waterbottle.blacklisted")) { itemNames.add("waterbottle"); } if (!this.getConfig().getBoolean("items.spidereye.blacklisted")) { itemNames.add("spidereye"); } if (!this.getConfig().getBoolean("items.fermentedspidereye.blacklisted")) { itemNames.add("fermentedspidereye"); } if (!this.getConfig().getBoolean("items.blazepowder.blacklisted")) { itemNames.add("blazepowder"); } if (!this.getConfig().getBoolean("items.magmacream.blacklisted")) { itemNames.add("magmacream"); } if (!this.getConfig().getBoolean("items.brewingstand.blacklisted")) { itemNames.add("brewingstand"); } if (!this.getConfig().getBoolean("items.eyeofender.blacklisted")) { itemNames.add("eyeofender"); } if (!this.getConfig().getBoolean("items.glisteringmelon.blacklisted")) { itemNames.add("glisteringmelon"); } if (!this.getConfig().getBoolean("items.firecharge.blacklisted")) { itemNames.add("firecharge"); } if (!this.getConfig().getBoolean("items.bookandquill.blacklisted")) { itemNames.add("bookandquill"); } if (!this.getConfig().getBoolean("items.itemframe.blacklisted")) { itemNames.add("itemframe"); } if (!this.getConfig().getBoolean("items.flowerpot.blacklisted")) { itemNames.add("flowerpot"); } if (!this.getConfig().getBoolean("items.bakedpotato.blacklisted")) { itemNames.add("bakedpotato"); } if (!this.getConfig().getBoolean("items.poisonouspotato.blacklisted")) { itemNames.add("poisonouspotato"); } if (!this.getConfig().getBoolean("items.goldencarrot.blacklisted")) { itemNames.add("goldencarrot"); } if (!this.getConfig().getBoolean("items.carrotonastick.blacklisted")) { itemNames.add("carrotonastick"); } if (!this.getConfig().getBoolean("items.pumpkinpie.blacklisted")) { itemNames.add("pumpkinpie"); } if (!this.getConfig().getBoolean("items.fireworkstar.blacklisted")) { itemNames.add("fireworkstar"); } if (!this.getConfig().getBoolean("items.enchantedbook.blacklisted")) { itemNames.add("enchantedbook"); } if (!this.getConfig().getBoolean("items.redstonecomparator.blacklisted")) { itemNames.add("redstonecomparator"); } if (!this.getConfig().getBoolean("items.tntcart.blacklisted")) { itemNames.add("tntcart"); } if (!this.getConfig().getBoolean("items.hoppercart.blacklisted")) { itemNames.add("hoppercart"); } if (!this.getConfig().getBoolean("items.ironhorsearmor.blacklisted")) { itemNames.add("ironhorsearmor"); } if (!this.getConfig().getBoolean("items.goldhorsearmor.blacklisted")) { itemNames.add("goldhorsearmor"); } if (!this.getConfig().getBoolean("items.diamondhorsearmor.blacklisted")) { itemNames.add("diamondhorsearmor"); } if (!this.getConfig().getBoolean("items.lead.blacklisted")) { itemNames.add("lead"); } if (!this.getConfig().getBoolean("items.nametag.blacklisted")) { itemNames.add("nametag"); } if (!this.getConfig().getBoolean("items.musicdisc13.blacklisted")) { itemNames.add("musicdisc13"); } if (!this.getConfig().getBoolean("items.musicdisccat.blacklisted")) { itemNames.add("musicdisccat"); } if (!this.getConfig().getBoolean("items.musicdiscblocks.blacklisted")) { itemNames.add("musicdiscblocks"); } if (!this.getConfig().getBoolean("items.musicdiscchirp.blacklisted")) { itemNames.add("musicdiscchirp"); } if (!this.getConfig().getBoolean("items.musicdiscfar.blacklisted")) { itemNames.add("musicdiscfar"); } if (!this.getConfig().getBoolean("items.musicdiscmall.blacklisted")) { itemNames.add("musicdiscmall"); } if (!this.getConfig().getBoolean("items.musicdiscmellohi.blacklisted")) { itemNames.add("musicdiscmellohi"); } if (!this.getConfig().getBoolean("items.musicdiscstal.blacklisted")) { itemNames.add("musicdiscstal"); } if (!this.getConfig().getBoolean("items.musicdiscstrad.blacklisted")) { itemNames.add("musicdiscstrad"); } if (!this.getConfig().getBoolean("items.musicdiscward.blacklisted")) { itemNames.add("musicdiscward"); } if (!this.getConfig().getBoolean("items.musicdisc11.blacklisted")) { itemNames.add("musicdisc11"); } if (!this.getConfig().getBoolean("items.musicdiscwait.blacklisted")) { itemNames.add("musicdiscwait"); } if (!this.getConfig().getBoolean("items.enderchest.blacklisted")) { itemNames.add("enderchest"); } if (!this.getConfig().getBoolean("items.daylightsensor.blacklisted")) { itemNames.add("daylightsensor"); } if (!this.getConfig().getBoolean("items.bedrock.blacklisted")) { itemNames.add("bedrock"); } if (!this.getConfig().getBoolean("items.netherwart.blacklisted")) { itemNames.add("netherwart"); } return itemNames; } public ArrayList listOfItemPrices() { final ArrayList itemPrices = new ArrayList(); if (!this.getConfig().getBoolean("items.stone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stone.actualprice")); } if (!this.getConfig().getBoolean("items.dirt.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.dirt.actualprice")); } if (!this.getConfig().getBoolean("items.gravel.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.gravel.actualprice")); } if (!this.getConfig().getBoolean("items.sand.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sand.actualprice")); } if (!this.getConfig().getBoolean("items.coal.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.coal.actualprice")); } if (!this.getConfig().getBoolean("items.grassblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.grassblock.actualprice")); } if (!this.getConfig().getBoolean("items.iron.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.iron.actualprice")); } if (!this.getConfig().getBoolean("items.snowball.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.snowball.actualprice")); } if (!this.getConfig().getBoolean("items.redstone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.redstone.actualprice")); } if (!this.getConfig().getBoolean("items.fence.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fence.actualprice")); } if (!this.getConfig().getBoolean("items.gold.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.gold.actualprice")); } if (!this.getConfig().getBoolean("items.ice.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ice.actualprice")); } if (!this.getConfig().getBoolean("items.vine.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.vine.actualprice")); } if (!this.getConfig().getBoolean("items.lapislazuli.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.lapislazuli.actualprice")); } if (!this.getConfig().getBoolean("items.diamond.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamond.actualprice")); } if (!this.getConfig().getBoolean("items.web.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.web.actualprice")); } if (!this.getConfig().getBoolean("items.cobblestone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cobblestone.actualprice")); } if (!this.getConfig().getBoolean("items.obsidian.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.obsidian.actualprice")); } if (!this.getConfig().getBoolean("items.rail.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.rail.actualprice")); } if (!this.getConfig().getBoolean("items.mossycobblestone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.mossycobblestone.actualprice")); } if (!this.getConfig().getBoolean("items.fern.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fern.actualprice")); } if (!this.getConfig().getBoolean("items.mycelium.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.mycelium.actualprice")); } if (!this.getConfig().getBoolean("items.yellowflower.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.yellowflower.actualprice")); } if (!this.getConfig().getBoolean("items.emerald.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.emerald.actualprice")); } if (!this.getConfig().getBoolean("items.lilypad.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.lilypad.actualprice")); } if (!this.getConfig().getBoolean("items.brownmushroomblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.brownmushroomblock.actualprice")); } if (!this.getConfig().getBoolean("items.ironbars.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironbars.actualprice")); } if (!this.getConfig().getBoolean("items.torch.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.torch.actualprice")); } if (!this.getConfig().getBoolean("items.rose.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.rose.actualprice")); } if (!this.getConfig().getBoolean("items.redmushroomblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.redmushroomblock.actualprice")); } if (!this.getConfig().getBoolean("items.cactus.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cactus.actualprice")); } if (!this.getConfig().getBoolean("items.mobspawner.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.mobspawner.actualprice")); } if (!this.getConfig().getBoolean("items.sugarcane.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sugarcane.actualprice")); } if (!this.getConfig().getBoolean("items.sign.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sign.actualprice")); } if (!this.getConfig().getBoolean("items.glass.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.glass.actualprice")); } if (!this.getConfig().getBoolean("items.chest.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.chest.actualprice")); } if (!this.getConfig().getBoolean("items.farmland.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.farmland.actualprice")); } if (!this.getConfig().getBoolean("items.brownmushroomtopblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.brownmushroomtopblock.actualprice")); } if (!this.getConfig().getBoolean("items.glasspane.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.glasspane.actualprice")); } if (!this.getConfig().getBoolean("items.ladder.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ladder.actualprice")); } if (!this.getConfig().getBoolean("items.glowstone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.glowstone.actualprice")); } if (!this.getConfig().getBoolean("items.netherrack.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.netherrack.actualprice")); } if (!this.getConfig().getBoolean("items.soulsand.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.soulsand.actualprice")); } if (!this.getConfig().getBoolean("items.stonebrickstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonebrickstairs.actualprice")); } if (!this.getConfig().getBoolean("items.hugeredmushroomstem.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.hugeredmushroomstem.actualprice")); } if (!this.getConfig().getBoolean("items.hugebrownmushroomstem.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.hugebrownmushroomstem.actualprice")); } if (!this.getConfig().getBoolean("items.stonestairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonestairs.actualprice")); } if (!this.getConfig().getBoolean("items.oakwoodstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.oakwoodstairs.actualprice")); } if (!this.getConfig().getBoolean("items.sandstonestairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sandstonestairs.actualprice")); } if (!this.getConfig().getBoolean("items.wooddoor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.wooddoor.actualprice")); } if (!this.getConfig().getBoolean("items.quartzstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.quartzstairs.actualprice")); } if (!this.getConfig().getBoolean("items.craftingtable.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.craftingtable.actualprice")); } if (!this.getConfig().getBoolean("items.redstonelamp.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.redstonelamp.actualprice")); } if (!this.getConfig().getBoolean("items.pumpkin.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.pumpkin.actualprice")); } if (!this.getConfig().getBoolean("items.irondoor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.irondoor.actualprice")); } if (!this.getConfig().getBoolean("items.redstonetorch.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.redstonetorch.actualprice")); } if (!this.getConfig().getBoolean("items.carrot.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.carrot.actualprice")); } if (!this.getConfig().getBoolean("items.stonebutton.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonebutton.actualprice")); } if (!this.getConfig().getBoolean("items.woddenpressureplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodenpressureplate.actualprice")); } if (!this.getConfig().getBoolean("items.furnace.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.furnace.actualprice")); } if (!this.getConfig().getBoolean("items.potato.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.potato.actualprice")); } if (!this.getConfig().getBoolean("items.repeater.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.repeater.actualprice")); } if (!this.getConfig().getBoolean("items.birchwoodstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.birchwoodstairs.actualprice")); } if (!this.getConfig().getBoolean("items.stonepressureplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonepressureplate.actualprice")); } if (!this.getConfig().getBoolean("items.sprucewoodstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sprucewoodstairs.actualprice")); } if (!this.getConfig().getBoolean("items.jukebox.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.jukebox.actualprice")); } if (!this.getConfig().getBoolean("items.piston.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.piston.actualprice")); } if (!this.getConfig().getBoolean("items.fencegate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fencegate.actualprice")); } if (!this.getConfig().getBoolean("items.bed.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bed.actualprice")); } if (!this.getConfig().getBoolean("items.lever.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.lever.actualprice")); } if (!this.getConfig().getBoolean("items.trapdoor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.trapdoor.actualprice")); } if (!this.getConfig().getBoolean("items.endstone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.endstone.actualprice")); } if (!this.getConfig().getBoolean("items.tripwirehook.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.tripwirehook.actualprice")); } if (!this.getConfig().getBoolean("items.junglewoodstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.junglewoodstairs.actualprice")); } if (!this.getConfig().getBoolean("items.woodbutton.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodbutton.actualprice")); } if (!this.getConfig().getBoolean("items.cauldron.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cauldron.actualprice")); } if (!this.getConfig().getBoolean("items.hopper.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.hopper.actualprice")); } if (!this.getConfig().getBoolean("items.noteblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.noteblock.actualprice")); } if (!this.getConfig().getBoolean("items.jackolantern.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.jackolantern.actualprice")); } if (!this.getConfig().getBoolean("items.weightedpressureplateheavy.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.weightedpressureplateheavy.actualprice")); } if (!this.getConfig().getBoolean("items.weightedpressureplatelight.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.weightedpressureplatelight.actualprice")); } if (!this.getConfig().getBoolean("items.expbottle.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.expbottle.actualprice")); } if (!this.getConfig().getBoolean("items.tnt.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.tnt.actualprice")); } if (!this.getConfig().getBoolean("items.sponge.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sponge.actualprice")); } if (!this.getConfig().getBoolean("items.string.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.string.actualprice")); } if (!this.getConfig().getBoolean("items.stick.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stick.actualprice")); } if (!this.getConfig().getBoolean("items.bow.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bow.actualprice")); } if (!this.getConfig().getBoolean("items.dispenser.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.dispenser.actualprice")); } if (!this.getConfig().getBoolean("items.poweredrail.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.poweredrail.actualprice")); } if (!this.getConfig().getBoolean("items.detectorrail.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.detectorrail.actualprice")); } if (!this.getConfig().getBoolean("items.slimeball.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.slimeball.actualprice")); } if (!this.getConfig().getBoolean("items.stickypiston.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stickypiston.actualprice")); } if (!this.getConfig().getBoolean("items.brownmushroom.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.brownmushroom.actualprice")); } if (!this.getConfig().getBoolean("items.redmushroom.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.redmushroom.actualprice")); } if (!this.getConfig().getBoolean("items.clay.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.clay.actualprice")); } if (!this.getConfig().getBoolean("items.brick.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.brick.actualprice")); } if (!this.getConfig().getBoolean("items.bricks.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bricks.actualprice")); } if (!this.getConfig().getBoolean("items.paper.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.paper.actualprice")); } if (!this.getConfig().getBoolean("items.leather.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.leather.actualprice")); } if (!this.getConfig().getBoolean("items.book.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.book.actualprice")); } if (!this.getConfig().getBoolean("items.bookshelf.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bookshelf.actualprice")); } if (!this.getConfig().getBoolean("items.cobblestonestairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cobblestonestairs.actualprice")); } if (!this.getConfig().getBoolean("items.snowblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.snowblock.actualprice")); } if (!this.getConfig().getBoolean("items.clayblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.clayblock.actualprice")); } if (!this.getConfig().getBoolean("items.melonblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.melonblock.actualprice")); } if (!this.getConfig().getBoolean("items.brickstairs.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.brickstairs.actualprice")); } if (!this.getConfig().getBoolean("items.netherbrick.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.netherbrick.actualprice")); } if (!this.getConfig().getBoolean("items.enchantmenttable.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.enchantmenttable.actualprice")); } if (!this.getConfig().getBoolean("items.endportalframe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.endportalframe.actualprice")); } if (!this.getConfig().getBoolean("items.dragonegg.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.dragonegg.actualprice")); } if (!this.getConfig().getBoolean("items.netherstar.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.netherstar.actualprice")); } if (!this.getConfig().getBoolean("items.beacon.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.beacon.actualprice")); } if (!this.getConfig().getBoolean("items.quartz.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.quartz.actualprice")); } if (!this.getConfig().getBoolean("items.activatorrail.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.activatorrail.actualprice")); } if (!this.getConfig().getBoolean("items.dropper.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.dropper.actualprice")); } if (!this.getConfig().getBoolean("items.seeds.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.seeds.actualprice")); } if (!this.getConfig().getBoolean("items.wheat.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.wheat.actualprice")); } if (!this.getConfig().getBoolean("items.hayblock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.hayblock.actualprice")); } if (!this.getConfig().getBoolean("items.hardclay.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.hardclay.actualprice")); } if (!this.getConfig().getBoolean("items.ironspade.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironspade.actualprice")); } if (!this.getConfig().getBoolean("items.ironpickaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironpickaxe.actualprice")); } if (!this.getConfig().getBoolean("items.ironaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironaxe.actualprice")); } if (!this.getConfig().getBoolean("items.flint.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.flint.actualprice")); } if (!this.getConfig().getBoolean("items.flintandsteel.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.flintandsteel.actualprice")); } if (!this.getConfig().getBoolean("items.apple.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.apple.actualprice")); } if (!this.getConfig().getBoolean("items.feather.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.feather.actualprice")); } if (!this.getConfig().getBoolean("items.arrow.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.arrow.actualprice")); } if (!this.getConfig().getBoolean("items.ironsword.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironsword.actualprice")); } if (!this.getConfig().getBoolean("items.woodensword.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodensword.actualprice")); } if (!this.getConfig().getBoolean("items.woodenspade.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodenspade.actualprice")); } if (!this.getConfig().getBoolean("items.woodenpickaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodenpickaxe.actualprice")); } if (!this.getConfig().getBoolean("items.woodenaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodenaxe.actualprice")); } if (!this.getConfig().getBoolean("items.stonesword.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonesword.actualprice")); } if (!this.getConfig().getBoolean("items.stonespade.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonespade.actualprice")); } if (!this.getConfig().getBoolean("items.stonepickaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonepickaxe.actualprice")); } if (!this.getConfig().getBoolean("items.stoneaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stoneaxe.actualprice")); } if (!this.getConfig().getBoolean("items.diamondsword.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondsword.actualprice")); } if (!this.getConfig().getBoolean("items.diamondspade.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondspade.actualprice")); } if (!this.getConfig().getBoolean("items.diamondpickaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondpickaxe.actualprice")); } if (!this.getConfig().getBoolean("items.diamondaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondaxe.actualprice")); } if (!this.getConfig().getBoolean("items.bowl.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bowl.actualprice")); } if (!this.getConfig().getBoolean("items.mushroomsoup.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.mushroomsoup.actualprice")); } if (!this.getConfig().getBoolean("items.goldsword.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldsword.actualprice")); } if (!this.getConfig().getBoolean("items.goldspade.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldspade.actualprice")); } if (!this.getConfig().getBoolean("items.goldpickaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldpickaxe.actualprice")); } if (!this.getConfig().getBoolean("items.goldaxe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldaxe.actualprice")); } if (!this.getConfig().getBoolean("items.gunpowder.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.gunpowder.actualprice")); } if (!this.getConfig().getBoolean("items.woodenhoe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodenhoe.actualprice")); } if (!this.getConfig().getBoolean("items.stonehoe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.stonehoe.actualprice")); } if (!this.getConfig().getBoolean("items.ironhoe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironhoe.actualprice")); } if (!this.getConfig().getBoolean("items.diamondhoe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondhoe.actualprice")); } if (!this.getConfig().getBoolean("items.goldhoe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldhoe.actualprice")); } if (!this.getConfig().getBoolean("items.bread.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bread.actualprice")); } if (!this.getConfig().getBoolean("items.leatherhelmet.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.leatherhelmet.actualprice")); } if (!this.getConfig().getBoolean("items.leatherchestplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.leatherchestplate.actualprice")); } if (!this.getConfig().getBoolean("items.leatherpants.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.leatherpants.actualprice")); } if (!this.getConfig().getBoolean("items.leatherboots.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.leatherboots.actualprice")); } if (!this.getConfig().getBoolean("items.chainmailhelmet.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.chainmailhelmet.actualprice")); } if (!this.getConfig().getBoolean("items.chainmailchestplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.chainmailchestplate.actualprice")); } if (!this.getConfig().getBoolean("items.chainmailpants.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.chainmailpants.actualprice")); } if (!this.getConfig().getBoolean("items.chainmailboots.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.chainmailboots.actualprice")); } if (!this.getConfig().getBoolean("items.ironhelmet.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironhelmet.actualprice")); } if (!this.getConfig().getBoolean("items.ironchestplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironchestplate.actualprice")); } if (!this.getConfig().getBoolean("items.ironpants.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironpants.actualprice")); } if (!this.getConfig().getBoolean("items.ironboots.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironboots.actualprice")); } if (!this.getConfig().getBoolean("items.diamondhelmet.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondhelmet.actualprice")); } if (!this.getConfig().getBoolean("items.diamondchestplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondchestplate.actualprice")); } if (!this.getConfig().getBoolean("items.diamondpants.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondpants.actualprice")); } if (!this.getConfig().getBoolean("items.diamondboots.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondboots.actualprice")); } if (!this.getConfig().getBoolean("items.goldhelmet.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldhelmet.actualprice")); } if (!this.getConfig().getBoolean("items.goldchestplate.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldchestplate.actualprice")); } if (!this.getConfig().getBoolean("items.goldpants.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldpants.actualprice")); } if (!this.getConfig().getBoolean("items.goldboots.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldboots.actualprice")); } if (!this.getConfig().getBoolean("items.porkchop.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.porkchop.actualprice")); } if (!this.getConfig().getBoolean("items.cookedpork.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cookedpork.actualprice")); } if (!this.getConfig().getBoolean("items.painting.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.painting.actualprice")); } if (!this.getConfig().getBoolean("items.woodendoor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.woodendoor.actualprice")); } if (!this.getConfig().getBoolean("items.bucket.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bucket.actualprice")); } if (!this.getConfig().getBoolean("items.waterbucket.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.waterbucket.actualprice")); } if (!this.getConfig().getBoolean("items.lavabucket.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.lavabucket.actualprice")); } if (!this.getConfig().getBoolean("items.minecart.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.minecart.actualprice")); } if (!this.getConfig().getBoolean("items.saddle.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.saddle.actualprice")); } if (!this.getConfig().getBoolean("items.boat.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.boat.actualprice")); } if (!this.getConfig().getBoolean("items.milkbucket.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.milkbucket.actualprice")); } if (!this.getConfig().getBoolean("items.storagecart.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.storagecart.actualprice")); } if (!this.getConfig().getBoolean("items.egg.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.egg.actualprice")); } if (!this.getConfig().getBoolean("items.compass.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.compass.actualprice")); } if (!this.getConfig().getBoolean("items.fishingrod.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fishingrod.actualprice")); } if (!this.getConfig().getBoolean("items.watch.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.watch.actualprice")); } if (!this.getConfig().getBoolean("items.glowstonedust.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.glowstonedust.actualprice")); } if (!this.getConfig().getBoolean("items.fish.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fish.actualprice")); } if (!this.getConfig().getBoolean("items.cookedfish.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cookedfish.actualprice")); } if (!this.getConfig().getBoolean("items.bone.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bone.actualprice")); } if (!this.getConfig().getBoolean("items.sugar.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.sugar.actualprice")); } if (!this.getConfig().getBoolean("items.cake.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cake.actualprice")); } if (!this.getConfig().getBoolean("items.cocoabeans.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cocoabeans.actualprice")); } if (!this.getConfig().getBoolean("items.cookie.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cookie.actualprice")); } if (!this.getConfig().getBoolean("items.map.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.map.actualprice")); } if (!this.getConfig().getBoolean("items.shears.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.shears.actualprice")); } if (!this.getConfig().getBoolean("items.melon.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.melon.actualprice")); } if (!this.getConfig().getBoolean("items.pumpkinseeds.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.pumpkinseeds.actualprice")); } if (!this.getConfig().getBoolean("items.melonseeds.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.melonseeds.actualprice")); } if (!this.getConfig().getBoolean("items.rawbeef.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.rawbeef.actualprice")); } if (!this.getConfig().getBoolean("items.cookedbeef.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.cookedbeef.actualprice")); } if (!this.getConfig().getBoolean("items.rawchicken.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.rawchicken.actualprice")); } if (!this.getConfig().getBoolean("items.rottenflesh.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.rottenflesh.actualprice")); } if (!this.getConfig().getBoolean("items.enderpearl.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.enderpearl.actualprice")); } if (!this.getConfig().getBoolean("items.blazerod.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.blazerod.actualprice")); } if (!this.getConfig().getBoolean("items.ghasttear.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ghasttear.actualprice")); } if (!this.getConfig().getBoolean("items.goldnugget.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldnugget.actualprice")); } if (!this.getConfig().getBoolean("items.glassbottle.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.glassbottle.actualprice")); } if (!this.getConfig().getBoolean("items.waterbottle.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.waterbottle.actualprice")); } if (!this.getConfig().getBoolean("items.spidereye.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.spidereye.actualprice")); } if (!this.getConfig().getBoolean("items.fermentedspidereye.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fermentedspidereye.actualprice")); } if (!this.getConfig().getBoolean("items.blazepowder.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.blazepowder.actualprice")); } if (!this.getConfig().getBoolean("items.magmacream.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.magmacream.actualprice")); } if (!this.getConfig().getBoolean("items.brewingstand.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.brewingstand.actualprice")); } if (!this.getConfig().getBoolean("items.eyeofender.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.eyeofender.actualprice")); } if (!this.getConfig().getBoolean("items.glisteringmelon.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.glisteringmelon.actualprice")); } if (!this.getConfig().getBoolean("items.firecharge.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.firecharge.actualprice")); } if (!this.getConfig().getBoolean("items.bookandquill.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bookandquill.actualprice")); } if (!this.getConfig().getBoolean("items.itemframe.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.itemframe.actualprice")); } if (!this.getConfig().getBoolean("items.flowerpot.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.flowerpot.actualprice")); } if (!this.getConfig().getBoolean("items.bakedpotato.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bakedpotato.actualprice")); } if (!this.getConfig().getBoolean("items.poisonouspotato.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.poisonouspotato.actualprice")); } if (!this.getConfig().getBoolean("items.goldencarrot.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldencarrot.actualprice")); } if (!this.getConfig().getBoolean("items.carrotonastick.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.carrotonastick.actualprice")); } if (!this.getConfig().getBoolean("items.pumpkinpie.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.pumpkinpie.actualprice")); } if (!this.getConfig().getBoolean("items.fireworkstar.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.fireworkstar.actualprice")); } if (!this.getConfig().getBoolean("items.enchantedbook.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.enchantedbook.actualprice")); } if (!this.getConfig().getBoolean("items.redstonecomparator.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.redstonecomparator.actualprice")); } if (!this.getConfig().getBoolean("items.tntcart.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.tntcart.actualprice")); } if (!this.getConfig().getBoolean("items.hoppercart.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.hoppercart.actualprice")); } if (!this.getConfig().getBoolean("items.ironhorsearmor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.ironhorsearmor.actualprice")); } if (!this.getConfig().getBoolean("items.goldhorsearmor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.goldhorsearmor.actualprice")); } if (!this.getConfig().getBoolean("items.diamondhorsearmor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.diamondhorsearmor.actualprice")); } if (!this.getConfig().getBoolean("items.lead.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.lead.actualprice")); } if (!this.getConfig().getBoolean("items.nametag.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.nametag.actualprice")); } if (!this.getConfig().getBoolean("items.musicdisc13.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdisc13.actualprice")); } if (!this.getConfig().getBoolean("items.musicdisccat.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdisccat.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscblocks.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscblocks.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscchirp.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscchirp.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscfar.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscfar.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscmall.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscmall.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscmellohi.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscmellohi.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscstal.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscstal.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscstrad.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscstrad.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscward.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscward.actualprice")); } if (!this.getConfig().getBoolean("items.musicdisc11.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdisc11.actualprice")); } if (!this.getConfig().getBoolean("items.musicdiscwait.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.musicdiscwait.actualprice")); } if (!this.getConfig().getBoolean("items.enderchest.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.enderchest.actualprice")); } if (!this.getConfig().getBoolean("items.daylightsensor.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.daylightsensor.actualprice")); } if (!this.getConfig().getBoolean("items.bedrock.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.bedrock.actualprice")); } if (!this.getConfig().getBoolean("items.netherwart.blacklisted")) { itemPrices.add(this.getConfig().getDouble("items.netherwart.actualprice")); } return itemPrices; } private void listItemPrices(final Player player, final String args0) { final ArrayList originalPriceList = this.listOfItemPrices(); ArrayList priceList = this.listOfItemPrices(); ArrayList nameList = this.listItemConfigNames(); if (args0.equalsIgnoreCase("lowest") || args0.equalsIgnoreCase("bottom") || args0.equalsIgnoreCase("cheapest")) { priceList = MethodsForReference.priceReturningBubblesortLowest(originalPriceList, nameList); nameList = MethodsForReference.nameReturningBubblesortLowest(originalPriceList, nameList); player.sendMessage(""); player.sendMessage(ChatColor.GREEN + "---------------------" + ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "---------------------"); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Lowest priced " + ChatColor.YELLOW + "items" + ChatColor.GREEN + ":"); for (int i = 0; i <= 14; ++i) { player.sendMessage(new StringBuilder().append(ChatColor.GREEN).append(i + 1).append(". ").append(ChatColor.YELLOW).append(nameList.get(i)).append(ChatColor.GREEN).append(": ").append(ChatColor.GOLD).append(priceList.get(i)).append(" ").append(ChatColor.AQUA).append(UltiMarket.econ.currencyNamePlural()).toString()); } player.sendMessage(ChatColor.GREEN + "---------------------" + ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "---------------------"); } if (args0.equalsIgnoreCase("highest") || args0.equalsIgnoreCase("top") || args0.equalsIgnoreCase("expensive")) { priceList = MethodsForReference.priceReturningBubblesortHighest(originalPriceList, nameList); nameList = MethodsForReference.nameReturningBubblesortHighest(originalPriceList, nameList); player.sendMessage(""); player.sendMessage(ChatColor.GREEN + "---------------------" + ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "---------------------"); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Highest priced " + ChatColor.YELLOW + "items" + ChatColor.GREEN + ":"); for (int i = 0; i <= 14; ++i) { player.sendMessage(new StringBuilder().append(ChatColor.GREEN).append(i + 1).append(". ").append(ChatColor.YELLOW).append(nameList.get(i)).append(ChatColor.GREEN).append(": ").append(ChatColor.GOLD).append(priceList.get(i)).append(" ").append(ChatColor.AQUA).append(UltiMarket.econ.currencyNamePlural()).toString()); } player.sendMessage(ChatColor.GREEN + "---------------------" + ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "---------------------"); } } private boolean buyMethod(double price, final String Name, final Player player, final String literalName, final int howMany, final String actualPricePath, final String pricePath) { double tempPrice = price; double amountToWithdraw = 0.0; final double initialPlayerBalance = UltiMarket.econ.getBalance(player.getName()); int purchases = 0; boolean isBlacklisted = false; if (this.getConfig().getBoolean(pricePath.replace("price", "blacklisted"))) { isBlacklisted = true; } for (int i = 1; i <= howMany; ++i) { if (tempPrice > this.getConfig().getDouble("minimumprice")) { amountToWithdraw += tempPrice; } else { amountToWithdraw += this.getConfig().getDouble("minimumprice"); } if (!this.getConfig().getBoolean("userandompricechangeamount")) { tempPrice += this.getConfig().getDouble("pricechangeperbuyorsell"); ++purchases; } else { final int lower = this.getConfig().getInt("lowerpricechangeboundary"); final int upper = this.getConfig().getInt("upperpricechangeboundary"); final int randomInt = MethodsForReference.main(upper, lower); tempPrice += randomInt; ++purchases; } } if (!isBlacklisted) { if (UltiMarket.econ.getBalance(player.getName()) >= amountToWithdraw) { UltiMarket.econ.withdrawPlayer(player.getName(), amountToWithdraw); player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.getMaterial(literalName), howMany) }); final double finalPlayerBalance = UltiMarket.econ.getBalance(player.getName()); double totalPrice = initialPlayerBalance - finalPlayerBalance; final BigDecimal bd = new BigDecimal(totalPrice).setScale(2, RoundingMode.HALF_UP); totalPrice = bd.doubleValue(); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + howMany + " " + ChatColor.YELLOW + Name + " bought for " + ChatColor.GOLD + totalPrice + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); price = tempPrice; this.getConfig().set(actualPricePath, (Object)price); final String purchasesPath = pricePath.replace("price", "purchases"); purchases += this.getConfig().getInt(purchasesPath); this.getConfig().set(purchasesPath, (Object)purchases); if (this.getConfig().getDouble(actualPricePath) < this.getConfig().getDouble("minimumprice")) { this.getConfig().set(pricePath, (Object)this.getConfig().getDouble("minimumprice")); } else { this.getConfig().set(pricePath, (Object)this.getConfig().getDouble(actualPricePath)); } } else { final BigDecimal bd2 = new BigDecimal(amountToWithdraw).setScale(2, RoundingMode.HALF_UP); amountToWithdraw = bd2.doubleValue(); double howMuchMore = amountToWithdraw - UltiMarket.econ.getBalance(player.getName()); final BigDecimal bigDec = new BigDecimal(howMuchMore).setScale(2, RoundingMode.HALF_UP); howMuchMore = bigDec.doubleValue(); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You don't have enough " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + " to buy any " + ChatColor.YELLOW + Name + ChatColor.GREEN + "!"); player.sendMessage(ChatColor.GREEN + "You need " + howMuchMore + " more " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); } } else { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You're not allowed to buy " + ChatColor.YELLOW + Name + ChatColor.GREEN + "!"); } this.saveConfig(); return this.didThingsOccur = true; } private boolean sellMethod(double price, final String Name, final Player player, final String literalName, final int howMany, final String actualPricePath, final String pricePath, final String args0) { boolean isEnchanted = false; int sales = 0; boolean isBlacklisted = false; if (this.getConfig().getBoolean(pricePath.replace("price", "blacklisted"))) { isBlacklisted = true; } for (final Integer key : player.getInventory().all(Material.matchMaterial(literalName)).keySet()) { if (!player.getInventory().getItem((int)key).getEnchantments().isEmpty() || player.getInventory().getItem((int)key).getItemMeta().hasDisplayName()) { isEnchanted = true; } if (this.isItDurable(Material.matchMaterial(literalName)) && player.getInventory().getItem((int)key).getDurability() > 0) { isEnchanted = true; } } if (!isEnchanted) { if (!isBlacklisted) { if (player.getInventory().contains(Material.matchMaterial(literalName), howMany)) { player.getInventory().removeItem(new ItemStack[] { new ItemStack(Material.matchMaterial(literalName), howMany) }); final double initialPlayerBalance = UltiMarket.econ.getBalance(player.getName()); double amountToCredit = 0.0; for (int i = 1; i <= howMany; ++i) { if (price > this.getConfig().getDouble("minimumprice")) { amountToCredit += price; } else { amountToCredit = amountToCredit + this.getConfig().getDouble("minimumprice") + this.getConfig().getDouble("pricechangeperbuyorsell"); } UltiMarket.econ.withdrawPlayer(player.getName(), this.getConfig().getDouble("pricechangeperbuyorsell")); if (!this.getConfig().getBoolean("userandompricechangeamount")) { price -= this.getConfig().getDouble("pricechangeperbuyorsell"); ++sales; } else { final int lower = this.getConfig().getInt("lowerpricechangeboundary"); final int upper = this.getConfig().getInt("upperpricechangeboundary"); final int randomInt = MethodsForReference.main(upper, lower); price -= randomInt; ++sales; } } if (amountToCredit >= 0.0) { UltiMarket.econ.depositPlayer(player.getName(), amountToCredit); } final double finalPlayerBalance = UltiMarket.econ.getBalance(player.getName()); double totalGain = finalPlayerBalance - initialPlayerBalance; final BigDecimal bd = new BigDecimal(totalGain).setScale(2, RoundingMode.HALF_UP); totalGain = bd.doubleValue(); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + howMany + " " + ChatColor.YELLOW + Name + ChatColor.GREEN + " sold for " + ChatColor.GOLD + totalGain + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); this.getConfig().set(actualPricePath, (Object)price); final String salesPath = pricePath.replace("price", "sales"); sales += this.getConfig().getInt(salesPath); this.getConfig().set(salesPath, (Object)sales); if (this.getConfig().getDouble(actualPricePath) < 0.0) { this.getConfig().set(pricePath, (Object)this.getConfig().getDouble("minimumprice")); } else { this.getConfig().set(pricePath, (Object)this.getConfig().getDouble(actualPricePath)); } } else { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You don't have " + ChatColor.GOLD + howMany + " " + ChatColor.YELLOW + Name + ChatColor.GREEN + " to sell!"); } } else { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You're not allowed to sell " + ChatColor.YELLOW + Name + ChatColor.GREEN + "!"); } } else if (!args0.equalsIgnoreCase("dontexecutethiscommand")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You can't sell enchanted, named, or damaged " + ChatColor.YELLOW + "items" + ChatColor.GREEN + "!"); } this.saveConfig(); return this.didThingsOccur = true; } public boolean sellWithExtDataMethod(double price, final String Name, final Player player, final String literalName, final int howMany, final String actualPricePath, final String pricePath, final int dataValue, final int id) { boolean isEnchanted = false; boolean itWorked = false; int sales = 0; int tempHowMany = howMany; boolean isItStillOne = false; for (final Integer key : player.getInventory().all(Material.matchMaterial(literalName)).keySet()) { if (!player.getInventory().getItem((int)key).getEnchantments().isEmpty() || player.getInventory().getItem((int)key).getItemMeta().hasDisplayName()) { isEnchanted = true; } if (this.isItDurable(Material.matchMaterial(literalName)) && player.getInventory().getItem((int)key).getDurability() > 0) { isEnchanted = true; } } if (!isEnchanted) { player.sendMessage("isEnchanted is false"); int has = 0; player.sendMessage("has set to 0"); player.sendMessage("theyHaveEnough set to false"); for (final Integer key2 : player.getInventory().all(Material.matchMaterial(literalName)).keySet()) { player.sendMessage("initiated first for loop"); player.sendMessage("about to check inventory slot " + key2); has += MethodsForReference.checkHowMuchTheyHaveExtData(player, id, dataValue, howMany, key2, has); } if (has >= howMany) { player.sendMessage("has >= howMany"); for (final Integer key2 : player.getInventory().all(Material.matchMaterial(literalName)).keySet()) { player.sendMessage("Outer for loop initiated"); if (tempHowMany > 0) { player.sendMessage("tempHowMany has been determined to be > 0"); for (int i = 0; i <= howMany; ++i) { player.sendMessage("Inner for loop initiated"); final int otherTempHowMany = player.getInventory().getItem((int)key2).getAmount(); player.sendMessage("otherTempHowMany set to be " + otherTempHowMany); if (otherTempHowMany == 1) { player.sendMessage("otherTempHowMany is 1"); isItStillOne = true; player.sendMessage("isItStillOne set to true"); } if (otherTempHowMany > 0) { player.sendMessage("otherTempHowMany has been determined to be > 0"); player.getInventory().getItem((int)key2).setAmount(otherTempHowMany - 1); player.sendMessage("amount of item set to " + (otherTempHowMany - 1)); if (isItStillOne) { player.sendMessage("isItStillOne determined to be true"); player.getInventory().clear((int)key2); player.sendMessage("inventory slot " + key2 + " cleared"); isItStillOne = false; player.sendMessage("isItStillOne set to false"); } --tempHowMany; player.sendMessage("tempHowMany decremented"); if (tempHowMany == 0 || player.getInventory().getItem((int)key2) == null) { player.sendMessage("either tempHowMany == 0 or player.getInventory().getItem(key) == null"); player.sendMessage("about to break from inner for loop"); break; } } } itWorked = true; player.sendMessage("itWorked set to true"); } } } if (!itWorked) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + " You don't have " + ChatColor.GOLD + howMany + " " + ChatColor.YELLOW + Name + ChatColor.GREEN + " to sell!"); } else { final double initialPlayerBalance = UltiMarket.econ.getBalance(player.getName()); double amountToCredit = 0.0; for (int j = 1; j <= howMany; ++j) { if (price > this.getConfig().getDouble("minimumprice")) { amountToCredit += price; } else { amountToCredit = amountToCredit + this.getConfig().getDouble("minimumprice") + this.getConfig().getDouble("pricechangeperbuyorsell"); } UltiMarket.econ.withdrawPlayer(player.getName(), this.getConfig().getDouble("pricechangeperbuyorsell")); if (!this.getConfig().getBoolean("userandompricechangeamount")) { price -= this.getConfig().getDouble("pricechangeperbuyorsell"); ++sales; } else { final int lower = this.getConfig().getInt("lowerpricechangeboundary"); final int upper = this.getConfig().getInt("upperpricechangeboundary"); final int randomInt = MethodsForReference.main(upper, lower); price -= randomInt; } } if (amountToCredit >= 0.0) { UltiMarket.econ.depositPlayer(player.getName(), amountToCredit); } final double finalPlayerBalance = UltiMarket.econ.getBalance(player.getName()); double totalGain = finalPlayerBalance - initialPlayerBalance; final BigDecimal bd = new BigDecimal(totalGain).setScale(2, RoundingMode.HALF_UP); totalGain = bd.doubleValue(); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + howMany + " " + ChatColor.YELLOW + Name + ChatColor.GREEN + " sold for " + ChatColor.GOLD + totalGain + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); this.getConfig().set(actualPricePath, (Object)price); final String salesPath = pricePath.replace("price", "sales"); sales += this.getConfig().getInt(salesPath); this.getConfig().set(salesPath, (Object)sales); if (this.getConfig().getDouble(actualPricePath) < 0.0) { this.getConfig().set(pricePath, (Object)this.getConfig().getDouble("minimumprice")); } else { this.getConfig().set(pricePath, (Object)this.getConfig().getDouble(actualPricePath)); } } } else { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You can't sell enchanted, named, or damaged " + ChatColor.YELLOW + "items" + ChatColor.GREEN + "!"); } this.saveConfig(); return this.didThingsOccur = true; } private boolean checkIfInventoryIsEmpty(final Player player) { ItemStack[] contents; for (int length = (contents = player.getInventory().getContents()).length, i = 0; i < length; ++i) { final ItemStack item = contents[i]; if (item != null) { return false; } } return true; } private boolean sellAllMethod(final Player player) { if (!this.checkIfInventoryIsEmpty(player)) { for (int i = 1; i <= 36; ++i) { player.performCommand("sell dontexecutethiscommand"); } return true; } player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "You don't have " + ChatColor.YELLOW + "anything " + ChatColor.GREEN + "to sell!"); return false; } private boolean getPrice(final Player player, final String pricePath, final String Name) { double price = this.getConfig().getDouble(pricePath); final BigDecimal bd = new BigDecimal(price).setScale(2, RoundingMode.HALF_UP); price = bd.doubleValue(); if (price < 0.01) { price = 0.01; } player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.YELLOW + Name + ChatColor.GREEN + " is currently worth " + ChatColor.GOLD + price + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); return this.didThingsOccur = true; } private boolean setPrice(final Player player, final String actualPricePath, final String pricePath, final double newPrice, final String Name) { this.getConfig().set(actualPricePath, (Object)newPrice); this.getConfig().set(pricePath, (Object)newPrice); this.saveConfig(); player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.YELLOW + Name + ChatColor.GREEN + " set to " + ChatColor.GOLD + newPrice + " " + ChatColor.AQUA + UltiMarket.econ.currencyNamePlural() + ChatColor.GREEN + "!"); return this.didThingsOccur = true; } public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args); private boolean overFlowMethod(final String theCommand, final String args0, final String args1, final Player player, final int argsLength) { if (args0.equalsIgnoreCase("arrow") || args0.equalsIgnoreCase("262") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("ARROW")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("ARROW")))) { final double price = this.getConfig().getDouble("items.arrow.actualprice"); final String Name = "Arrow"; final String literalName = "ARROW"; final String actualPricePath = "items.arrow.actualprice"; final String pricePath = "items.arrow.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 262); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamond") || args0.equalsIgnoreCase("264") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND")))) { final double price = this.getConfig().getDouble("items.diamond.actualprice"); final String Name = "Diamond"; final String literalName = "DIAMOND"; final String actualPricePath = "items.diamond.actualprice"; final String pricePath = "items.diamond.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 264); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("iron") || args0.equalsIgnoreCase("265") || args0.equalsIgnoreCase("ironingot") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_INGOT")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_INGOT")))) { final double price = this.getConfig().getDouble("items.iron.actualprice"); final String Name = "Iron"; final String literalName = "IRON_INGOT"; final String actualPricePath = "items.iron.actualprice"; final String pricePath = "items.iron.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 265); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldingot") || args0.equalsIgnoreCase("266") || args0.equalsIgnoreCase("gold") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_INGOT")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_INGOT")))) { final double price = this.getConfig().getDouble("items.gold.actualprice"); final String Name = "Gold"; final String literalName = "GOLD_INGOT"; final String actualPricePath = "items.gold.actualprice"; final String pricePath = "items.gold.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 266); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironsword") || args0.equalsIgnoreCase("267") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_SWORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_SWORD")))) { final double price = this.getConfig().getDouble("items.ironsword.actualprice"); final String Name = "Iron Sword"; final String literalName = "IRON_SWORD"; final String actualPricePath = "items.ironsword.actualprice"; final String pricePath = "items.ironsword.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 267); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("woodensword") || args0.equalsIgnoreCase("268") || args0.equalsIgnoreCase("woodsword") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WOOD_SWORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WOOD_SWORD")))) { final double price = this.getConfig().getDouble("items.woodensword.actualprice"); final String Name = "Wooden Sword"; final String literalName = "WOOD_SWORD"; final String actualPricePath = "items.woodensword.actualprice"; final String pricePath = "items.woodensword.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 268); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("woodenspade") || args0.equalsIgnoreCase("269") || args0.equalsIgnoreCase("woodspade") || args0.equalsIgnoreCase("woodenshovel") || args0.equalsIgnoreCase("woodshovel") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WOOD_SPADE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WOOD_SPADE")))) { final double price = this.getConfig().getDouble("items.woodenspade.actualprice"); final String Name = "Wooden Spade"; final String literalName = "WOOD_SPADE"; final String actualPricePath = "items.woodenspade.actualprice"; final String pricePath = "items.woodenspade.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 269); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("woodenpickaxe") || args0.equalsIgnoreCase("270") || args0.equalsIgnoreCase("woodpickaxe") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WOOD_PICKAXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WOOD_PICKAXE")))) { final double price = this.getConfig().getDouble("items.woodenpickaxe.actualprice"); final String Name = "Wooden Pickaxe"; final String literalName = "WOOD_PICKAXE"; final String actualPricePath = "items.woodenpickaxe.actualprice"; final String pricePath = "items.woodenpickaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 270); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { player.sendMessage("You said buy"); this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } } if (args0.equalsIgnoreCase("woodenaxe") || args0.equalsIgnoreCase("271") || args0.equalsIgnoreCase("woodaxe") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WOOD_AXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WOOD_AXE")))) { final double price = this.getConfig().getDouble("items.woodenaxe.actualprice"); final String Name = "Wooden Axe"; final String literalName = "WOOD_AXE"; final String actualPricePath = "items.woodenaxe.actualprice"; final String pricePath = "items.woodenaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 271); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("stonesword") || args0.equalsIgnoreCase("272") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STONE_SWORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STONE_SWORD")))) { final double price = this.getConfig().getDouble("items.stonesword.actualprice"); final String Name = "Stone Sword"; final String literalName = "STONE_SWORD"; final String actualPricePath = "items.stonesword.actualprice"; final String pricePath = "items.stonesword.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 272); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("stonespade") || args0.equalsIgnoreCase("273") || args0.equalsIgnoreCase("stoneshovel") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STONE_SPADE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STONE_SPADE")))) { final double price = this.getConfig().getDouble("items.stonespade.actualprice"); final String Name = "Stone Spade"; final String literalName = "STONE_SPADE"; final String actualPricePath = "items.stonespade.actualprice"; final String pricePath = "items.stonespade.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 273); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("stonepickaxe") || args0.equalsIgnoreCase("274") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STONE_PICKAXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STONE_PICKAXE")))) { final double price = this.getConfig().getDouble("items.stonepickaxe.actualprice"); final String Name = "Stone Pickaxe"; final String literalName = "STONE_PICKAXE"; final String actualPricePath = "items.stonepickaxe.actualprice"; final String pricePath = "items.stonepickaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 274); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("stoneaxe") || args0.equalsIgnoreCase("275") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STONE_AXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STONE_AXE")))) { final double price = this.getConfig().getDouble("items.stoneaxe.actualprice"); final String Name = "Stone Axe"; final String literalName = "STONE_AXE"; final String actualPricePath = "items.stoneaxe.actualprice"; final String pricePath = "items.stoneaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 275); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondsword") || args0.equalsIgnoreCase("276") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_SWORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_SWORD")))) { final double price = this.getConfig().getDouble("items.diamondsword.actualprice"); final String Name = "Diamond Sword"; final String literalName = "DIAMOND_SWORD"; final String actualPricePath = "items.diamondsword.actualprice"; final String pricePath = "items.diamondsword.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 276); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondspade") || args0.equalsIgnoreCase("277") || args0.equalsIgnoreCase("diamondshovel") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STONE_SWORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STONE_SWORD")))) { final double price = this.getConfig().getDouble("items.diamondspade.actualprice"); final String Name = "Diamond Spade"; final String literalName = "DIAMOND_SPADE"; final String actualPricePath = "items.diamondspade.actualprice"; final String pricePath = "items.diamondspade.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 277); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondpickaxe") || args0.equalsIgnoreCase("278") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_PICKAXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_PICKAXE")))) { final double price = this.getConfig().getDouble("items.diamondpickaxe.actualprice"); final String Name = "Diamond Pickaxe"; final String literalName = "DIAMOND_PICKAXE"; final String actualPricePath = "items.diamondpickaxe.actualprice"; final String pricePath = "items.diamondpickaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 278); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondaxe") || args0.equalsIgnoreCase("279") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_AXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_AXE")))) { final double price = this.getConfig().getDouble("items.diamondaxe.actualprice"); final String Name = "Diamond Axe"; final String literalName = "DIAMOND_AXE"; final String actualPricePath = "items.diamondaxe.actualprice"; final String pricePath = "items.diamondaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 279); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("stick") || args0.equalsIgnoreCase("280") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STICK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STICK")))) { final double price = this.getConfig().getDouble("items.stick.actualprice"); final String Name = "Stick"; final String literalName = "STICK"; final String actualPricePath = "items.stick.actualprice"; final String pricePath = "items.stick.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 280); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bowl") || args0.equalsIgnoreCase("281") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BOWL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BOWL")))) { final double price = this.getConfig().getDouble("items.bowl.actualprice"); final String Name = "Bowl"; final String literalName = "BOWL"; final String actualPricePath = "items.bowl.actualprice"; final String pricePath = "items.bowl.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 281); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("mushroomsoup") || args0.equalsIgnoreCase("282") || args0.equalsIgnoreCase("mushroomstew") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MUSHROOM_SOUP")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MUSHROOM_SOUP")))) { final double price = this.getConfig().getDouble("items.mushroomsoup.actualprice"); final String Name = "Mushroom Soup"; final String literalName = "MUSHROOM_SOUP"; final String actualPricePath = "items.mushroomsoup.actualprice"; final String pricePath = "items.mushroomsoup.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 282); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldsword") || args0.equalsIgnoreCase("283") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_SWORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_SWORD")))) { final double price = this.getConfig().getDouble("items.goldsword.actualprice"); final String Name = "Gold Sword"; final String literalName = "GOLD_SWORD"; final String actualPricePath = "items.goldsword.actualprice"; final String pricePath = "items.goldsword.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 283); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldspade") || args0.equalsIgnoreCase("284") || args0.equalsIgnoreCase("goldshovel") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_SPADE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_SPADE")))) { final double price = this.getConfig().getDouble("items.goldspade.actualprice"); final String Name = "Gold Spade"; final String literalName = "GOLD_SPADE"; final String actualPricePath = "items.goldspade.actualprice"; final String pricePath = "items.goldspade.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 284); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldpickaxe") || args0.equalsIgnoreCase("285") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_PICKAXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_PICKAXE")))) { final double price = this.getConfig().getDouble("items.goldpickaxe.actualprice"); final String Name = "Gold Pickaxe"; final String literalName = "GOLD_PICKAXE"; final String actualPricePath = "items.goldpickaxe.actualprice"; final String pricePath = "items.goldpickaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 285); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldaxe") || args0.equalsIgnoreCase("286") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_AXE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_AXE")))) { final double price = this.getConfig().getDouble("items.goldaxe.actualprice"); final String Name = "Gold Axe"; final String literalName = "GOLD_AXE"; final String actualPricePath = "items.goldaxe.actualprice"; final String pricePath = "items.goldaxe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 286); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("string") || args0.equalsIgnoreCase("287") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STRING")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STRING")))) { final double price = this.getConfig().getDouble("items.string.actualprice"); final String Name = "String"; final String literalName = "STRING"; final String actualPricePath = "items.string.actualprice"; final String pricePath = "items.string.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 287); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("feather") || args0.equalsIgnoreCase("288") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("FEATHER")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("FEATHER")))) { final double price = this.getConfig().getDouble("items.feather.actualprice"); final String Name = "Feather"; final String literalName = "FEATHER"; final String actualPricePath = "items.feather.actualprice"; final String pricePath = "items.feather.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 288); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("gunpowder") || args0.equalsIgnoreCase("289") || args0.equalsIgnoreCase("sulphur") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SULPHUR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SULPHUR")))) { final double price = this.getConfig().getDouble("items.gunpowder.actualprice"); final String Name = "Gunpowder"; final String literalName = "SULPHUR"; final String actualPricePath = "items.gunpowder.actualprice"; final String pricePath = "items.gunpowder.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 289); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("woodhoe") || args0.equalsIgnoreCase("290") || args0.equalsIgnoreCase("woodenhoe") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WOOD_HOE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WOOD_HOE")))) { final double price = this.getConfig().getDouble("items.woodenhoe.actualprice"); final String Name = "Wooden Hoe"; final String literalName = "WOOD_HOE"; final String actualPricePath = "items.woodenhoe.actualprice"; final String pricePath = "items.woodenhoe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 290); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("stonehoe") || args0.equalsIgnoreCase("291") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STONE_HOE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STONE_HOE")))) { final double price = this.getConfig().getDouble("items.stonehoe.actualprice"); final String Name = "Stone Hoe"; final String literalName = "STONE_HOE"; final String actualPricePath = "items.stonehoe.actualprice"; final String pricePath = "items.stonehoe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 291); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironhoe") || args0.equalsIgnoreCase("292") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_HOE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_HOE")))) { final double price = this.getConfig().getDouble("items.ironhoe.actualprice"); final String Name = "Iron Hoe"; final String literalName = "IRON_HOE"; final String actualPricePath = "items.ironhoe.actualprice"; final String pricePath = "items.ironhoe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 292); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondhoe") || args0.equalsIgnoreCase("293") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_HOE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_HOE")))) { final double price = this.getConfig().getDouble("items.diamondhoe.actualprice"); final String Name = "Diamond Hoe"; final String literalName = "DIAMOND_HOE"; final String actualPricePath = "items.diamodnhoe.actualprice"; final String pricePath = "items.diamondhoe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 293); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldhoe") || args0.equalsIgnoreCase("294") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_HOE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_HOE")))) { final double price = this.getConfig().getDouble("items.goldhoe.actualprice"); final String Name = "Gold Hoe"; final String literalName = "GOLD_HOE"; final String actualPricePath = "items.goldhoe.actualprice"; final String pricePath = "items.goldhoe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 294); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("seeds") || args0.equalsIgnoreCase("295") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SEEDS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SEEDS")))) { final double price = this.getConfig().getDouble("items.seeds.actualprice"); final String Name = "Seeds"; final String literalName = "SEEDS"; final String actualPricePath = "items.seeds.actualprice"; final String pricePath = "items.seeds.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 295); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("wheat") || args0.equalsIgnoreCase("296") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WHEAT")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WHEAT")))) { final double price = this.getConfig().getDouble("items.wheat.actualprice"); final String Name = "Wheat"; final String literalName = "WHEAT"; final String actualPricePath = "items.wheat.actualprice"; final String pricePath = "items.wheat.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 296); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bread") || args0.equalsIgnoreCase("297") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BREAD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BREAD")))) { final double price = this.getConfig().getDouble("items.bread.actualprice"); final String Name = "Bread"; final String literalName = "BREAD"; final String actualPricePath = "items.bread.actualprice"; final String pricePath = "items.bread.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 297); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("leatherhelmet") || args0.equalsIgnoreCase("298") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LEATHER_HELMET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LEATHER_HELMET")))) { final double price = this.getConfig().getDouble("items.leatherhelmet.actualprice"); final String Name = "Leather Helmet"; final String literalName = "LEATHER_HELMET"; final String actualPricePath = "items.leatherhelmet.actualprice"; final String pricePath = "items.leatherhelmet.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 298); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("leatherchestplate") || args0.equalsIgnoreCase("299") || args0.equalsIgnoreCase("leathertunic") || args0.equalsIgnoreCase("leathertop") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LEATHER_CHESTPLATE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LEATHER_CHESTPLATE")))) { final double price = this.getConfig().getDouble("items.leatherchestplate.actualprice"); final String Name = "Leather Chestplate"; final String literalName = "LEATHER_CHESTPLATE"; final String actualPricePath = "items.leatherchestplate.actualprice"; final String pricePath = "items.leatherchestplate.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 299); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("leatherpants") || args0.equalsIgnoreCase("300") || args0.equalsIgnoreCase("leatherleggings") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LEATHER_LEGGINGS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LEATHER_LEGGINGS")))) { final double price = this.getConfig().getDouble("items.leatherpants.actualprice"); final String Name = "Leather Pants"; final String literalName = "LEATHER_LEGGINGS"; final String actualPricePath = "items.leatherpants.actualprice"; final String pricePath = "items.leatherpants.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 300); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("letherboots") || args0.equalsIgnoreCase("301") || args0.equalsIgnoreCase("leathershoes") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LEATHER_BOOTS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LEATHER_BOOTS")))) { final double price = this.getConfig().getDouble("items.leatherbots.actualprice"); final String Name = "Leather Boots"; final String literalName = "LEATHER_BOOTS"; final String actualPricePath = "items.leatherboots.actualprice"; final String pricePath = "items.leatherboots.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 301); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("chainmailhelmet") || args0.equalsIgnoreCase("302") || args0.equalsIgnoreCase("chainmailhat") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CHAINMAIL_HELMET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CHAINMAIL_HELMET")))) { final double price = this.getConfig().getDouble("items.chainmailhelmet.actualprice"); final String Name = "Chainmail Helmet"; final String literalName = "CHAINMAIL_HELMET"; final String actualPricePath = "items.chainmailhelmet.actualprice"; final String pricePath = "items.chainmailhelmet.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 302); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("chainmailchestplate") || args0.equalsIgnoreCase("303") || args0.equalsIgnoreCase("clainmailtop") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CHAINMAIL_CHESTPLATE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CHAINMAIL_CHESTPLATE")))) { final double price = this.getConfig().getDouble("items.chainmailchestplate.actualprice"); final String Name = "Chainmail Chestplate"; final String literalName = "CHAINMAIL_CHESTPLATE"; final String actualPricePath = "items.chainmailchestplate.actualprice"; final String pricePath = "items.chainmailchestplate.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 303); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("chainmailpants") || args0.equalsIgnoreCase("304") || args0.equalsIgnoreCase("chainmailleggings") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CHAINMAIL_LEGGINGS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CHAINMAIL_LEGGINGS")))) { final double price = this.getConfig().getDouble("items.chainmailpants.actualprice"); final String Name = "Chainmail Pants"; final String literalName = "CHAINMAIL_LEGGINGS"; final String actualPricePath = "items.chainmailpants.actualprice"; final String pricePath = "items.chainmailpants.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 304); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("chainmailboots") || args0.equalsIgnoreCase("305") || args0.equalsIgnoreCase("chainmailshoes") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CHAINMAIL_BOOTS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CHAINMAIL_BOOTS")))) { final double price = this.getConfig().getDouble("items.chainmailboots.actualprice"); final String Name = "Chainmail Boots"; final String literalName = "CHAINMAIL_BOOTS"; final String actualPricePath = "items.chainmailboots.actualprice"; final String pricePath = "items.chainmailboots.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 305); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironhelmet") || args0.equalsIgnoreCase("306") || args0.equalsIgnoreCase("ironhat") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_HELMET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_HELMET")))) { final double price = this.getConfig().getDouble("items.ironhelmet.actualprice"); final String Name = "Iron Helmet"; final String literalName = "IRON_HELMET"; final String actualPricePath = "items.ironhelmet.actualprice"; final String pricePath = "items.ironhelmet.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 306); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironchestplate") || args0.equalsIgnoreCase("307") || args0.equalsIgnoreCase("irontunic") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_CHESTPLATE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_CHESTPLATE")))) { final double price = this.getConfig().getDouble("items.ironchestplate.actualprice"); final String Name = "Iron Chestplate"; final String literalName = "IRON_CHESTPLATE"; final String actualPricePath = "items.ironchestplate.actualprice"; final String pricePath = "items.ironchestplate.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 307); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironpants") || args0.equalsIgnoreCase("308") || args0.equalsIgnoreCase("ironleggings") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_LEGGINGS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_LEGGINGS")))) { final double price = this.getConfig().getDouble("items.ironpants.actualprice"); final String Name = "Iron Pants"; final String literalName = "IRON_LEGGINGS"; final String actualPricePath = "items.ironpants.actualprice"; final String pricePath = "items.ironpants.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 308); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironboots") || args0.equalsIgnoreCase("309") || args0.equalsIgnoreCase("ironshoes") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_BOOTS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_BOOTS")))) { final double price = this.getConfig().getDouble("items.ironboots.actualprice"); final String Name = "Iron Boots"; final String literalName = "IRON_BOOTS"; final String actualPricePath = "items.ironboots.actualprice"; final String pricePath = "items.ironboots.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 309); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondhelmet") || args0.equalsIgnoreCase("310") || args0.equalsIgnoreCase("diamondhat") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_HELMET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_HELMET")))) { final double price = this.getConfig().getDouble("items.diamondhelmet.actualprice"); final String Name = "Diamond Helmet"; final String literalName = "DIAMOND_HELMET"; final String actualPricePath = "items.diamondhelmet.actualprice"; final String pricePath = "items.diamondhelmet.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 310); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondchestplate") || args0.equalsIgnoreCase("311") || args0.equalsIgnoreCase("diamondtunic") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_CHESTPLATE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_CHESTPLATE")))) { final double price = this.getConfig().getDouble("items.diamondchestplate.actualprice"); final String Name = "Diamond Chestplate"; final String literalName = "DIAMOND_CHESTPLATE"; final String actualPricePath = "items.diamondchestpate.actualprice"; final String pricePath = "items.diamondchestplate.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 311); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondpants") || args0.equalsIgnoreCase("312") || args0.equalsIgnoreCase("diamondleggings") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_LEGGINGS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_LEGGINGS")))) { final double price = this.getConfig().getDouble("items.diamondpants.actualprice"); final String Name = "Diamond Pants"; final String literalName = "DIAMOND_LEGGINGS"; final String actualPricePath = "items.diamondpants.actualprice"; final String pricePath = "items.diamondpants.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 312); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondboots") || args0.equalsIgnoreCase("313") || args0.equalsIgnoreCase("diamondshoes") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_BOOTS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_BOOTS")))) { final double price = this.getConfig().getDouble("items.diamondboots.actualprice"); final String Name = "Diamond Boots"; final String literalName = "DIAMOND_BOOTS"; final String actualPricePath = "items.diamondboots.actualprice"; final String pricePath = "items.diamondboots.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 313); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldhelmet") || args0.equalsIgnoreCase("314") || args0.equalsIgnoreCase("goldhat") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_HELMET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_HELMET")))) { final double price = this.getConfig().getDouble("items.goldhelmet.actualprice"); final String Name = "Gold Helmet"; final String literalName = "GOLD_HELMET"; final String actualPricePath = "items.goldhelmet.actualprice"; final String pricePath = "items.goldhelmet.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 314); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldchestplate") || args0.equalsIgnoreCase("315") || args0.equalsIgnoreCase("goldtunic") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_CHESTPLATE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_CHESTPLATE")))) { final double price = this.getConfig().getDouble("items.goldchestplate.actualprice"); final String Name = "Gold Chestplate"; final String literalName = "GOLD_CHESTPLATE"; final String actualPricePath = "items.goldchestplate.actualprice"; final String pricePath = "items.goldchestplate.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 315); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldpants") || args0.equalsIgnoreCase("316") || args0.equalsIgnoreCase("goldleggings") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_LEGGINGS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_LEGGINGS")))) { final double price = this.getConfig().getDouble("items.goldleggings.actualprice"); final String Name = "Gold Pants"; final String literalName = "GOLD_LEGGINGS"; final String actualPricePath = "items.goldpants.actualprice"; final String pricePath = "items.goldpants.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 316); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldboots") || args0.equalsIgnoreCase("317") || args0.equalsIgnoreCase("goldshoes") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_BOOTS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_BOOTS")))) { final double price = this.getConfig().getDouble("items.goldboots.actualprice"); final String Name = "Gold Boots"; final String literalName = "GOLD_BOOTS"; final String actualPricePath = "items.goldboots.actualprice"; final String pricePath = "items.goldboots.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 317); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("flint") || args0.equalsIgnoreCase("318") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("FLINT")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("FLINT")))) { final double price = this.getConfig().getDouble("items.flint.actualprice"); final String Name = "Flint"; final String literalName = "FLINT"; final String actualPricePath = "items.flint.actualprice"; final String pricePath = "items.flint.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 318); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("porkchop") || args0.equalsIgnoreCase("319") || args0.equalsIgnoreCase("pork") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("PORK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("PORK")))) { final double price = this.getConfig().getDouble("items.porkchop.actualprice"); final String Name = "Porkchop"; final String literalName = "PORK"; final String actualPricePath = "items.porkchop.actualprice"; final String pricePath = "items.porkchop.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 319); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("cookedporkchop") || args0.equalsIgnoreCase("320") || args0.equalsIgnoreCase("cookedpork") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GRILLED_PORK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GRILLED_PORK")))) { final double price = this.getConfig().getDouble("items.cookedpork.actualprice"); final String Name = "Cooked Porkchop"; final String literalName = "GRILLED_PORK"; final String actualPricePath = "items.cookedpork.actualprice"; final String pricePath = "items.cookedpork.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 320); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("painting") || args0.equalsIgnoreCase("321") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("PAINTING")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("PAINTING")))) { final double price = this.getConfig().getDouble("items.painting.actualprice"); final String Name = "Painting"; final String literalName = "PAINTING"; final String actualPricePath = "items.painting.actualprice"; final String pricePath = "items.painting.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 321); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("sign") || args0.equalsIgnoreCase("323") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SIGN")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SIGN")))) { final double price = this.getConfig().getDouble("items.sign.actualprice"); final String Name = "Sign"; final String literalName = "SIGN"; final String actualPricePath = "items.sign.actualprice"; final String pricePath = "items.sign.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 323); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("wooddoor") || args0.equalsIgnoreCase("324") || args0.equalsIgnoreCase("door") || args0.equalsIgnoreCase("woodendoor") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WOOD_DOOR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WOOD_DOOR")))) { final double price = this.getConfig().getDouble("items.woodendoor.actualprice"); final String Name = "Wooden Door"; final String literalName = "WOOD_DOOR"; final String actualPricePath = "items.woodendoor.actualprice"; final String pricePath = "items.woodendoor.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 324); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bucket") || args0.equalsIgnoreCase("325") || args0.equalsIgnoreCase("bukkit") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BUCKET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BUCKET")))) { final double price = this.getConfig().getDouble("items.bucket.actualprice"); final String Name = "Bucket"; final String literalName = "BUCKET"; final String actualPricePath = "items.bucket.actualprice"; final String pricePath = "items.bucket.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 325); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("waterbucket") || args0.equalsIgnoreCase("326") || args0.equalsIgnoreCase("bucketofwater") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WATER_BUCKET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WATER_BUCKET")))) { final double price = this.getConfig().getDouble("items.waterbucket.actualprice"); final String Name = "Water Bucket"; final String literalName = "WATER_BUCKET"; final String actualPricePath = "items.waterbucket.actualprice"; final String pricePath = "items.waterbucket.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 326); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("lavabucket") || args0.equalsIgnoreCase("327") || args0.equalsIgnoreCase("bucketoflava") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LAVA_BUCKET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LAVA_BUCKET")))) { final double price = this.getConfig().getDouble("items.lavabucket.actualprice"); final String Name = "Lava Bucket"; final String literalName = "LAVA_BUCKET"; final String actualPricePath = "items.lavabucket.actualprice"; final String pricePath = "items.lavabucket.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 327); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("minecart") || args0.equalsIgnoreCase("328") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MINECART")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MINECART")))) { final double price = this.getConfig().getDouble("items.minecart.actualprice"); final String Name = "Minecart"; final String literalName = "MINECART"; final String actualPricePath = "items.minecart.actualprice"; final String pricePath = "items.minecart.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 328); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("saddle") || args0.equalsIgnoreCase("329") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SADDLE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SADDLE")))) { final double price = this.getConfig().getDouble("items.saddle.actualprice"); final String Name = "Saddle"; final String literalName = "SADDLE"; final String actualPricePath = "items.saddle.actualprice"; final String pricePath = "items.saddle.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 329); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("irondoor") || args0.equalsIgnoreCase("330") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_DOOR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_DOOR")))) { final double price = this.getConfig().getDouble("items.irondoor.actualprice"); final String Name = "Iron Door"; final String literalName = "IRON_DOOR"; final String actualPricePath = "items.irondoor.actualprice"; final String pricePath = "items.irondoor.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 330); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("redstone") || args0.equalsIgnoreCase("331") || args0.equalsIgnoreCase("redstonedust") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("REDSTONE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("REDSTONE")))) { final double price = this.getConfig().getDouble("items.redstone.actualprice"); final String Name = "Redstone"; final String literalName = "REDSTONE"; final String actualPricePath = "items.redstone.actualprice"; final String pricePath = "items.redstone.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 331); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("snowball") || args0.equalsIgnoreCase("332") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SNOW_BALL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SNOW_BALL")))) { final double price = this.getConfig().getDouble("items.snowball.actualprice"); final String Name = "Snowball"; final String literalName = "SNOW_BALL"; final String actualPricePath = "items.snowball.actualprice"; final String pricePath = "items.snowball.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 332); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("boat") || args0.equalsIgnoreCase("333") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BOAT")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BOAT")))) { final double price = this.getConfig().getDouble("items.boat.actualprice"); final String Name = "Boat"; final String literalName = "BOAT"; final String actualPricePath = "items.boat.actualprice"; final String pricePath = "items.boat.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 333); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("leather") || args0.equalsIgnoreCase("334") || args0.equalsIgnoreCase("cowhide") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LEATHER")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LEATHER")))) { final double price = this.getConfig().getDouble("items.leather.actualprice"); final String Name = "Leather"; final String literalName = "LEATHER"; final String actualPricePath = "items.leather.actualprice"; final String pricePath = "items.leather.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 334); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("milkbucket") || args0.equalsIgnoreCase("335") || args0.equalsIgnoreCase("bucketofmilk") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MILK_BUCKET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MILK_BUCKET")))) { final double price = this.getConfig().getDouble("items.milkbucket.actualprice"); final String Name = "Milk Bucket"; final String literalName = "MILK_BUCKET"; final String actualPricePath = "items.milkbucket.actualprice"; final String pricePath = "items.milkbucket.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 335); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("brick") || args0.equalsIgnoreCase("336") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CLAY_BRICK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CLAY_BRICK")))) { final double price = this.getConfig().getDouble("items.brick.actualprice"); final String Name = "Brick"; final String literalName = "CLAY_BRICK"; final String actualPricePath = "items.brick.actualprice"; final String pricePath = "items.brick.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 336); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("clayball") || args0.equalsIgnoreCase("clay") || args0.equalsIgnoreCase("337") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CLAY_BALL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CLAY_BALL")))) { final double price = this.getConfig().getDouble("items.clay.actualprice"); final String Name = "Clay Ball"; final String literalName = "CLAY_BALL"; final String actualPricePath = "items.clay.actualprice"; final String pricePath = "items.clay.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 337); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("sugarcane") || args0.equalsIgnoreCase("338") || args0.equalsIgnoreCase("reed") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SUGAR_CANE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SUGAR_CANE")))) { final double price = this.getConfig().getDouble("items.sugarcane.actualprice"); final String Name = "Sugar Cane"; final String literalName = "SUGAR_CANE"; final String actualPricePath = "items.sugarcane.actualprice"; final String pricePath = "items.sugarcane.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 338); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("paper") || args0.equalsIgnoreCase("339") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("PAPER")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("PAPER")))) { final double price = this.getConfig().getDouble("items.paper.actualprice"); final String Name = "Paper"; final String literalName = "PAPER"; final String actualPricePath = "items.paper.actualprice"; final String pricePath = "items.paper.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 339); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("book") || args0.equalsIgnoreCase("340") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BOOK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BOOK")))) { final double price = this.getConfig().getDouble("items.book.actualprice"); final String Name = "Book"; final String literalName = "BOOK"; final String actualPricePath = "items.book.actualprice"; final String pricePath = "items.book.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 340); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("slimeball") || args0.equalsIgnoreCase("341") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SLIME_BALL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SLIME_BALL")))) { final double price = this.getConfig().getDouble("items.slimeball.actualprice"); final String Name = "Slime Ball"; final String literalName = "SLIME_BALL"; final String actualPricePath = "items.slimeball.actualprice"; final String pricePath = "items.slimeball.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 341); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("storageminecart") || args0.equalsIgnoreCase("342") || args0.equalsIgnoreCase("storagecart") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("STORAGE_MINECART")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("STORAGE_MINECART")))) { final double price = this.getConfig().getDouble("items.storagecart.actualprice"); final String Name = "Storage Cart"; final String literalName = "STORAGE_MINECART"; final String actualPricePath = "items.storagecart.actualprice"; final String pricePath = "items.storagecart.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 342); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("poweredminecart") || args0.equalsIgnoreCase("343") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("POWERED_MINECART")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("POWERED_MINECART")))) { final double price = this.getConfig().getDouble("items.poweredminecart.actualprice"); final String Name = "Powered Minecart"; final String literalName = "POWERED_MINECART"; final String actualPricePath = "items.poweredminecart.actualprice"; final String pricePath = "items.poweredminecart.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 343); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("egg") || args0.equalsIgnoreCase("344") || args0.equalsIgnoreCase("chickenegg") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("EGG")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("EGG")))) { final double price = this.getConfig().getDouble("items.egg.actualprice"); final String Name = "Egg"; final String literalName = "EGG"; final String actualPricePath = "items.egg.actualprice"; final String pricePath = "items.egg.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 344); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("compass") || args0.equalsIgnoreCase("345") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("COMPASS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("COMPASS")))) { final double price = this.getConfig().getDouble("items.compass.actualprice"); final String Name = "Compass"; final String literalName = "COMPASS"; final String actualPricePath = "items.compass.actualprice"; final String pricePath = "items.compass.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 345); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("fishingrod") || args0.equalsIgnoreCase("346") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("FISHING_ROD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("FISHING_ROD")))) { final double price = this.getConfig().getDouble("items.fishingrod.actualprice"); final String Name = "Fishing Rod"; final String literalName = "FISHING_ROD"; final String actualPricePath = "items.fishingrod.actualprice"; final String pricePath = "items.fishingrod.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 346); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("watch") || args0.equalsIgnoreCase("347") || args0.equalsIgnoreCase("clock") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("WATCH")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("WATCH")))) { final double price = this.getConfig().getDouble("items.watch.actualprice"); final String Name = "Watch"; final String literalName = "WATCH"; final String actualPricePath = "items.watch.actualprice"; final String pricePath = "items.watch.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 347); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("glowstonedust") || args0.equalsIgnoreCase("348") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GLOWSTONE_DUST")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GLOWSTONE_DUST")))) { final double price = this.getConfig().getDouble("items.glowstonedust.actualprice"); final String Name = "Glowstone Dust"; final String literalName = "GLOWSTONE_DUST"; final String actualPricePath = "items.glowstonedust.actualprice"; final String pricePath = "items.glowstonedust.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 348); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("fish") || args0.equalsIgnoreCase("349") || args0.equalsIgnoreCase("rawfish") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RAW_FISH")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RAW_FISH")))) { final double price = this.getConfig().getDouble("items.fish.actualprice"); final String Name = "Fish"; final String literalName = "RAW_FISH"; final String actualPricePath = "items.fish.actualprice"; final String pricePath = "items.fish.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 349); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("cookedfish") || args0.equalsIgnoreCase("350") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("COOKED_FISH")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("COOKED_FISH")))) { final double price = this.getConfig().getDouble("items.cookedfish.actualprice"); final String Name = "Cooked Fish"; final String literalName = "COOKED_FISH"; final String actualPricePath = "items.cookedfish.actualprice"; final String pricePath = "items.cookedfish.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 350); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bone") || args0.equalsIgnoreCase("352") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BONE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BONE")))) { final double price = this.getConfig().getDouble("items.bone.actualprice"); final String Name = "Bone"; final String literalName = "BONE"; final String actualPricePath = "items.bone.actualprice"; final String pricePath = "items.bone.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 352); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("sugar") || args0.equalsIgnoreCase("353") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SUGAR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SUGAR")))) { final double price = this.getConfig().getDouble("items.sugar.actualprice"); final String Name = "Sugar"; final String literalName = "SUGAR"; final String actualPricePath = "items.sugar.actualprice"; final String pricePath = "items.sugar.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 353); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("cake") || args0.equalsIgnoreCase("354") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CAKE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CAKE")))) { final double price = this.getConfig().getDouble("items.cake.actualprice"); final String Name = "Cake"; final String literalName = "CAKE"; final String actualPricePath = "items.cake.actualprice"; final String pricePath = "items.cake.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 354); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bed") || args0.equalsIgnoreCase("355") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BED")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BED")))) { final double price = this.getConfig().getDouble("items.bed.actualprice"); final String Name = "Bed"; final String literalName = "BED"; final String actualPricePath = "items.bed.actualprice"; final String pricePath = "items.bed.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 355); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("repeater") || args0.equalsIgnoreCase("356") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIODE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIODE")))) { final double price = this.getConfig().getDouble("items.repeater.actualprice"); final String Name = "Redstone Repeater"; final String literalName = "DIODE"; final String actualPricePath = "items.repeater.actualprice"; final String pricePath = "items.repeater.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 356); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("cookie") || args0.equalsIgnoreCase("357") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("COOKIE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("COOKIE")))) { final double price = this.getConfig().getDouble("items.cookie.actualprice"); final String Name = "Cookie"; final String literalName = "COOKIE"; final String actualPricePath = "items.cookie.actualprice"; final String pricePath = "items.cookie.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 357); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("map") || args0.equalsIgnoreCase("358") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MAP")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MAP")))) { final double price = this.getConfig().getDouble("items.map.actualprice"); final String Name = "Map"; final String literalName = "MAP"; final String actualPricePath = "items.map.actualprice"; final String pricePath = "items.map.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 358); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("shears") || args0.equalsIgnoreCase("359") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SHEARS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SHEARS")))) { final double price = this.getConfig().getDouble("items.shears.actualprice"); final String Name = "Shears"; final String literalName = "SHEARS"; final String actualPricePath = "items.shears.actualprice"; final String pricePath = "items.shears.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 359); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("melon") || args0.equalsIgnoreCase("360") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MELON")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MELON")))) { final double price = this.getConfig().getDouble("items.melon.actualprice"); final String Name = "Melon (item)"; final String literalName = "MELON"; final String actualPricePath = "items.melon.actualprice"; final String pricePath = "items.melon.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 360); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("pumpkin_seeds") || args0.equalsIgnoreCase("361") || args0.equalsIgnoreCase("pumpkinseeds") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("PUMPKIN_SEEDS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("PUMPKIN_SEEDS")))) { final double price = this.getConfig().getDouble("items.pumpkinseeds.actualprice"); final String Name = "Pumpkin Seeds"; final String literalName = "PUMPKIN_SEEDS"; final String actualPricePath = "items.pumpkinseeds.actualprice"; final String pricePath = "items.pumpkinseeds.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 361); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("melon_seeds") || args0.equalsIgnoreCase("362") || args0.equalsIgnoreCase("melonseeds") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MELON_SEEDS")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MELON_SEEDS")))) { final double price = this.getConfig().getDouble("items.melonseeds.actualprice"); final String Name = "Melon Seeds"; final String literalName = "MELON_SEEDS"; final String actualPricePath = "items.melonseeds.actualprice"; final String pricePath = "items.melonseeds.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 362); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("beef") || args0.equalsIgnoreCase("363") || args0.equalsIgnoreCase("rawbeef") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RAW_BEEF")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RAW_BEEF")))) { final double price = this.getConfig().getDouble("items.rawbeef.actualprice"); final String Name = "Raw Beef"; final String literalName = "RAW_BEEF"; final String actualPricePath = "items.rawbeef.actualprice"; final String pricePath = "items.rawbeef.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 363); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("cooked_beef") || args0.equalsIgnoreCase("364") || args0.equalsIgnoreCase("cookedbeef") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("COOKED_BEEF")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("COOKED_BEEF")))) { final double price = this.getConfig().getDouble("items.cookedbeef.actualprice"); final String Name = "Cooked Beef"; final String literalName = "COOKED_BEEF"; final String actualPricePath = "items.cookedbeef.actualprice"; final String pricePath = "items.cookedbeef.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 364); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("chicken") || args0.equalsIgnoreCase("365") || args0.equalsIgnoreCase("rawchicken") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RAW_CHICKEN")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RAW_CHICKEN")))) { final double price = this.getConfig().getDouble("items.rawchicken.actualprice"); final String Name = "Raw Chicken"; final String literalName = "RAW_CHICKEN"; final String actualPricePath = "items.rawchicken.actualprice"; final String pricePath = "items.rawchicken.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 365); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("cooked_chicken") || args0.equalsIgnoreCase("366") || args0.equals("cookedchicken") || args0.equals("roastchicken") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("COOKED_CHICKEN")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("COOKED_CHICKEN")))) { final double price = this.getConfig().getDouble("items.cookedchicken.actualprice"); final String Name = "Cooked Chicken"; final String literalName = "COOKED_CHICKEN"; final String actualPricePath = "items.cookedchicken.actualprice"; final String pricePath = "items.cookedchicken.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 366); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("rottenflesh") || args0.equalsIgnoreCase("367") || args0.equalsIgnoreCase("rotten_flesh") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("ROTTEN_FLESH")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("ROTTEN_FLESH")))) { final double price = this.getConfig().getDouble("items.rottenflesh.actualprice"); final String Name = "Rotten Flesh"; final String literalName = "ROTTEN_FLESH"; final String actualPricePath = "items.rottenflesh.actualprice"; final String pricePath = "items.rottenflesh.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 367); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("enderpearl") || args0.equalsIgnoreCase("368") || args0.equalsIgnoreCase("ender_pearl") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("ENDER_PEARL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("ENDER_PEARL")))) { final double price = this.getConfig().getDouble("items.enderpearl.actualprice"); final String Name = "Ender Pearl"; final String literalName = "ENDER_PEARL"; final String actualPricePath = "items.enderpearl.actualprice"; final String pricePath = "items.enderpearl.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 368); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("blaze_rod") || args0.equalsIgnoreCase("369") || args0.equalsIgnoreCase("blazerod") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BLAZE_ROD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BLAZE_ROD")))) { final double price = this.getConfig().getDouble("items.blazerod.actualprice"); final String Name = "Blaze Rod"; final String literalName = "BLAZE_ROD"; final String actualPricePath = "items.blazerod.actualprice"; final String pricePath = "items.blazerod.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 369); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ghast_tear") || args0.equalsIgnoreCase("370") || args0.equalsIgnoreCase("ghasttear") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GHAST_TEAR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GHAST_TEAR")))) { final double price = this.getConfig().getDouble("items.ghasttear.actualprice"); final String Name = "Ghast Tear"; final String literalName = "GHAST_TEAR"; final String actualPricePath = "items.ghasttear.actualprice"; final String pricePath = "items.ghasttear.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 370); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("gold_nugget") || args0.equalsIgnoreCase("371") || args0.equalsIgnoreCase("goldnugget") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_NUGGET")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_NUGGET")))) { final double price = this.getConfig().getDouble("items.goldnugget.actualprice"); final String Name = "Gold Nugget"; final String literalName = "GOLD_NUGGET"; final String actualPricePath = "items.goldnugget.actualprice"; final String pricePath = "items.goldnugget.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 371); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("potion") || args0.equalsIgnoreCase("373") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("POTION")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("POTION")))) { final double price = this.getConfig().getDouble("items.potion.actualprice"); final String Name = "Potion"; final String literalName = "POTION"; final String actualPricePath = "items.potion.actualprice"; final String pricePath = "items.potion.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 373); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("glass_bottle") || args0.equalsIgnoreCase("374") || args0.equalsIgnoreCase("glassbottle") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GLASS_BOTTLE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GLASS_BOTTLE")))) { final double price = this.getConfig().getDouble("items.glassbottle.actualprice"); final String Name = "Glass Bottle"; final String literalName = "GLASS_BOTTLE"; final String actualPricePath = "items.glassbottle.actualprice"; final String pricePath = "items.glassbottle.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 374); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("spider_eye") || args0.equalsIgnoreCase("375") || args0.equalsIgnoreCase("spidereye") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SPIDER_EYE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SPIDER_EYE")))) { final double price = this.getConfig().getDouble("items.spidereye.actualprice"); final String Name = "Spider Eye"; final String literalName = "SPIDER_EYE"; final String actualPricePath = "items.spidereye.actualprice"; final String pricePath = "items.spidereye.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 375); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("fermentedspidereye") || args0.equalsIgnoreCase("376") || args0.equalsIgnoreCase("fermented_spider_eye") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("FERMENTED_SPIDER_EYE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("FERMENTED_SPIDER_EYE")))) { final double price = this.getConfig().getDouble("items.fermentedspidereye.actualprice"); final String Name = "Fermented Spider Eye"; final String literalName = "FERMENTED_SPIDER_EYE"; final String actualPricePath = "items.fermentedspidereye.actualprice"; final String pricePath = "items.fermentedspidereye.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 376); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("blaze_powder") || args0.equalsIgnoreCase("377") || args0.equalsIgnoreCase("blazepowder") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BLAZE_POWDER")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BLAZE_POWDER")))) { final double price = this.getConfig().getDouble("items.blazepowder.actualprice"); final String Name = "Blaze Powder"; final String literalName = "BLAZE_POWDER"; final String actualPricePath = "items.blazepowder.actualprice"; final String pricePath = "items.blazepowder.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 377); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("magma_cream") || args0.equalsIgnoreCase("378") || args0.equalsIgnoreCase("magmacream") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("MAGMA_CREAM")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("MAGMA_CREAM")))) { final double price = this.getConfig().getDouble("items.magmacream.actualprice"); final String Name = "Magma Cream"; final String literalName = "MAGMA_CREAM"; final String actualPricePath = "items.magmacream.actualprice"; final String pricePath = "items.magmacream.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 378); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("eye_of_ender") || args0.equalsIgnoreCase("381") || args0.equalsIgnoreCase("eyeofender") || args0.equalsIgnoreCase("endereye") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("EYE_OF_ENDER")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("EYE_OF_ENDER")))) { final double price = this.getConfig().getDouble("items.eyeofender.actualprice"); final String Name = "Eye Of Ender"; final String literalName = "EYE_OF_ENDER"; final String actualPricePath = "items.eyeofender.actualprice"; final String pricePath = "items.eyeofender.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 381); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("glistering_melon") || args0.equalsIgnoreCase("382") || args0.equalsIgnoreCase("glisteringmelon") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("SPECKLED_MELON")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("SPECKLED_MELON")))) { final double price = this.getConfig().getDouble("items.glisteringmelon.actualprice"); final String Name = "Glistering Melon"; final String literalName = "SPECKLED_MELON"; final String actualPricePath = "items.glisteringmelon.actualprice"; final String pricePath = "items.glisteringmelon.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 382); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("xp_bottle") || args0.equalsIgnoreCase("384") || args0.equalsIgnoreCase("xpbottle") || args0.equalsIgnoreCase("expbottle") || args0.equalsIgnoreCase("bottleoenchanting") || args0.equalsIgnoreCase("bottleofenchanting") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("EXP_BOTTLE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("EXP_BOTTLE")))) { final double price = this.getConfig().getDouble("items.expbottle.actualprice"); final String Name = "Bottle O' Enchanting"; final String literalName = "EXP_BOTTLE"; final String actualPricePath = "items.expbottle.actualprice"; final String pricePath = "items.expbottle.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 384); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("firecharge") || args0.equalsIgnoreCase("385") || args0.equalsIgnoreCase("fire_charge") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("FIREBALL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("FIREBALL")))) { final double price = this.getConfig().getDouble("items.firecharge.actualprice"); final String Name = "Fire Charge"; final String literalName = "FIREBALL"; final String actualPricePath = "items.firecharge.actualprice"; final String pricePath = "items.firecharge.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 385); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bookandquill") || args0.equalsIgnoreCase("386") || args0.equalsIgnoreCase("book_and_quill") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BOOK_AND_QUILL")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BOOK_AND_QUILL")))) { final double price = this.getConfig().getDouble("items.bookandquill.actualprice"); final String Name = "Book And Quill"; final String literalName = "BOOK_AND_QUILL"; final String actualPricePath = "items.bookandquill.actualprice"; final String pricePath = "items.bookandquill.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 386); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("emerald") || args0.equalsIgnoreCase("388") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("EMERALD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("EMERALD")))) { final double price = this.getConfig().getDouble("items.emerald.actualprice"); final String Name = "Emerald"; final String literalName = "EMERALD"; final String actualPricePath = "items.emerald.actualprice"; final String pricePath = "items.emerald.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 388); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("item_frame") || args0.equalsIgnoreCase("389") || args0.equalsIgnoreCase("itemframe") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("ITEM_FRAME")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("ITEM_FRAME")))) { final double price = this.getConfig().getDouble("items.itemframe.actualprice"); final String Name = "Item Frame"; final String literalName = "ITEM_FRAME"; final String actualPricePath = "items.itemframe.actualprice"; final String pricePath = "items.itemframe.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 389); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("carrot") || args0.equalsIgnoreCase("391") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CARROT_ITEM")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CARROT_ITEM")))) { final double price = this.getConfig().getDouble("items.carrot.actualprice"); final String Name = "Carrot"; final String literalName = "CARROT_ITEM"; final String actualPricePath = "items.carrot.actualprice"; final String pricePath = "items.carrot.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 391); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("potato") || args0.equalsIgnoreCase("392") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("POTATO_ITEM")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("POTATO")))) { final double price = this.getConfig().getDouble("items.potato.actualprice"); final String Name = "Potato"; final String literalName = "POTATO_ITEM"; final String actualPricePath = "items.potato.actualprice"; final String pricePath = "items.potato.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 392); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("lowest") || args0.equalsIgnoreCase("highest") || args0.equalsIgnoreCase("bottom") || args0.equalsIgnoreCase("cheapest") || args0.equalsIgnoreCase("top") || args0.equalsIgnoreCase("expensive")) { this.listItemPrices(player, args0); } else if (args0 == "dontexecutethiscommand") { this.didThingsOccur = true; } else if (argsLength == 2) { this.overFlowMethod2(theCommand, args0, args1, player, argsLength); } else if (!args0.equalsIgnoreCase("dontexecutethiscommand") && argsLength == 1) { this.overFlowMethod2(theCommand, args0, "1", player, argsLength); } else { this.overFlowMethod2(theCommand, args0, null, player, argsLength); } return true; } private boolean overFlowMethod2(final String theCommand, final String args0, final String args1, final Player player, final int argsLength) { if (args0.equalsIgnoreCase("cookedpotato") || args0.equalsIgnoreCase("393") || args0.equalsIgnoreCase("cooked_potato") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BAKED_POTATO")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BAKED_POTATO")))) { final double price = this.getConfig().getDouble("items.bakedpotato.actualprice"); final String Name = "Baked Potato"; final String literalName = "BAKED_POTATO"; final String actualPricePath = "items.bakedpotato.actualprice"; final String pricePath = "items.bakedpotato.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 393); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldencarrot") || args0.equalsIgnoreCase("396") || args0.equalsIgnoreCase("golden_carrot") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLDEN_CARROT")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLDEN_CARROT")))) { final double price = this.getConfig().getDouble("items.goldencarrot.actualprice"); final String Name = "Golden Carrot"; final String literalName = "GOLDEN_CARROT"; final String actualPricePath = "items.goldencarrot.actualprice"; final String pricePath = "items.goldencarrot.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 396); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("poisonouspotato") || args0.equalsIgnoreCase("394") || args0.equalsIgnoreCase("poisonous_potato") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("POISONOUS_POTATO")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("POISONOUS_POTATO")))) { final double price = this.getConfig().getDouble("items.poisonedpotato.actualprice"); final String Name = "Poisonous Potato"; final String literalName = "POISONOUS_POTATO"; final String actualPricePath = "items.poisonedpotato.actualprice"; final String pricePath = "items.poisonedpotato.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 394); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("carrotonastick") || args0.equalsIgnoreCase("398") || args0.equalsIgnoreCase("carrot_on_a_stick") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("CARROT_STICK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("CARROT_STICK")))) { final double price = this.getConfig().getDouble("items.carrotonastick.actualprice"); final String Name = "Carrot on a Stick"; final String literalName = "CARROT_STICK"; final String actualPricePath = "items.carrotonastick.actualprice"; final String pricePath = "items.carrotonastick.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 398); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("netherstar") || args0.equalsIgnoreCase("399") || args0.equalsIgnoreCase("nether_star") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("NETHER_STAR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("NETHER_STAR")))) { final double price = this.getConfig().getDouble("items.netherstar.actualprice"); final String Name = "Nether Star"; final String literalName = "NETHER_STAR"; final String actualPricePath = "items.netherstar.actualprice"; final String pricePath = "items.netherstar.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 399); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("pumpkinpie") || args0.equalsIgnoreCase("400") || args0.equalsIgnoreCase("pumpkin_pie") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("PUMPKIN_PIE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("PUMPKIN_PIE")))) { final double price = this.getConfig().getDouble("items.pumpkinpie.actualprice"); final String Name = "Pumpkin Pie"; final String literalName = "PUMPKIN_PIE"; final String actualPricePath = "items.pumpkinpie.actualprice"; final String pricePath = "items.pumpkinpie.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 400); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("fireworkcharge") || args0.equalsIgnoreCase("402") || args0.equalsIgnoreCase("firework_charge") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("FIREWORK_CHARGE")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("FIREWORK_CHARGE")))) { final double price = this.getConfig().getDouble("items.fireworkcharge.actualprice"); final String Name = "Firework Charge"; final String literalName = "FIREWORK_CHARGE"; final String actualPricePath = "items.fireworkcharge.actualprice"; final String pricePath = "items.fireworkcharge.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 402); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("redstonecomparator") || args0.equalsIgnoreCase("404") || args0.equalsIgnoreCase("redstone_comparator") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("REDSTONE_COMPARATOR")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("REDSTONE_COMPARATOR")))) { final double price = this.getConfig().getDouble("items.redstonecomparator.actualprice"); final String Name = "Redstone Comparator"; final String literalName = "REDSTONE_COMPARATOR"; final String actualPricePath = "items.redstonecomparator.actualprice"; final String pricePath = "items.redstonecomparator.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 404); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("quartz") || args0.equalsIgnoreCase("406") || args0.equalsIgnoreCase("nether_quartz") || args0.equalsIgnoreCase("netherquartz") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("QUARTZ")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("QUARTZ")))) { final double price = this.getConfig().getDouble("items.quartz.actualprice"); final String Name = "Nether Quartz"; final String literalName = "QUARTZ"; final String actualPricePath = "items.quartz.actualprice"; final String pricePath = "items.quartz.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 406); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("tntcart") || args0.equalsIgnoreCase("407") || args0.equalsIgnoreCase("tnt_cart") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("EXPLOSIVE_MINECART")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("EXPLOSIVE_MINECART")))) { final double price = this.getConfig().getDouble("items.tntcart.actualprice"); final String Name = "TNT Cart"; final String literalName = "EXPLOSIVE_MINECART"; final String actualPricePath = "items.tntcart.actualprice"; final String pricePath = "items.tntcart.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 407); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("hoppercart") || args0.equalsIgnoreCase("408") || args0.equalsIgnoreCase("hopper_cart") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("HOPPER_MINECART")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("HOPPER_MINECART")))) { final double price = this.getConfig().getDouble("items.hoppercart.actualprice"); final String Name = "Hopper Cart"; final String literalName = "HOPPER_MINECART"; final String actualPricePath = "items.hoppercart.actualprice"; final String pricePath = "items.hoppercart.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 408); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("ironhorsearmor") || args0.equalsIgnoreCase("417") || args0.equalsIgnoreCase("iron_horse_armor") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("IRON_BARDING")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("IRON_BARDING")))) { final double price = this.getConfig().getDouble("items.ironhorsearmor.actualprice"); final String Name = "Iron Horse Armor"; final String literalName = "IRON_BARDING"; final String actualPricePath = "items.ironhorsearmor.actualprice"; final String pricePath = "items.ironhorsearmor.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 417); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("goldenhorsearmor") || args0.equalsIgnoreCase("418") || args0.equalsIgnoreCase("golden_horse_armor") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_BARDING")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_BARDING")))) { final double price = this.getConfig().getDouble("items.goldenhorsearmor.actualprice"); final String Name = "Golden Horse Armor"; final String literalName = "GOLD_BARDING"; final String actualPricePath = "items.goldenhorsearmor.actualprice"; final String pricePath = "items.goldenhorsearmor.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 418); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("diamondhorsearmor") || args0.equalsIgnoreCase("419") || args0.equalsIgnoreCase("diamond_horse_armor") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DIAMOND_BARDING")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DIAMOND_BARDING")))) { final double price = this.getConfig().getDouble("items.diamondhorsearmor.actualprice"); final String Name = "Diamond Horse Armor"; final String literalName = "DIAMOND_BARDING"; final String actualPricePath = "items.diamondhorsearmor.actualprice"; final String pricePath = "items.diamondhorsearmor.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 419); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("lead") || args0.equalsIgnoreCase("420") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("LEASH")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("LEASH")))) { final double price = this.getConfig().getDouble("items.lead.actualprice"); final String Name = "Lead"; final String literalName = "LEASH"; final String actualPricePath = "items.lead.actualprice"; final String pricePath = "items.lead.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 420); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("nametag") || args0.equalsIgnoreCase("421") || args0.equalsIgnoreCase("name_tag") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("NAME_TAG")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("NAME_TAG")))) { final double price = this.getConfig().getDouble("items.nametag.actualprice"); final String Name = "Name Tag"; final String literalName = "NAME_TAG"; final String actualPricePath = "items.nametag.actualprice"; final String pricePath = "items.nametag.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 421); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdisc13") || args0.equalsIgnoreCase("2256") || args0.equalsIgnoreCase("music_disc_13") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GOLD_RECORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GOLD_RECORD")))) { final double price = this.getConfig().getDouble("items.musicdisc13.actualprice"); final String Name = "Music Disc (13)"; final String literalName = "GOLD_RECORD"; final String actualPricePath = "items.musicdisc13.actualprice"; final String pricePath = "items.musicdisc13.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2256); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdisccat") || args0.equalsIgnoreCase("2257") || args0.equalsIgnoreCase("music_disc_cat") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("GREEN_RECORD")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("GREEN_RECORD")))) { final double price = this.getConfig().getDouble("items.musicdisccat.actualprice"); final String Name = "Music Disc (cat)"; final String literalName = "GREEN_RECORD"; final String actualPricePath = "items.musicdisccat.actualprice"; final String pricePath = "items.musicdisccat.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2257); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscblocks") || args0.equalsIgnoreCase("2258") || args0.equalsIgnoreCase("music_disc_blocks") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_3")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_3")))) { final double price = this.getConfig().getDouble("items.musicdiscblocks.actualprice"); final String Name = "Music Disc (blocks)"; final String literalName = "RECORD_3"; final String actualPricePath = "items.musicdiscblocks.actualprice"; final String pricePath = "items.musicdiscblocks.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2258); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscchirp") || args0.equalsIgnoreCase("2259") || args0.equalsIgnoreCase("music_disc_chirp") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_4")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_4")))) { final double price = this.getConfig().getDouble("items.musicdiscchirp.actualprice"); final String Name = "Music Disc (chirp)"; final String literalName = "RECORD_4"; final String actualPricePath = "items.musicdiscchirp.actualprice"; final String pricePath = "items.musicdiscchirp.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2259); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscfar") || args0.equalsIgnoreCase("2260") || args0.equalsIgnoreCase("music_disc_far") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_5")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_5")))) { final double price = this.getConfig().getDouble("items.musicdiscfar.actualprice"); final String Name = "Music Disc (far)"; final String literalName = "RECORD_5"; final String actualPricePath = "items.musicdiscfar.actualprice"; final String pricePath = "items.musicdiscfar.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2260); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscmall") || args0.equalsIgnoreCase("2261") || args0.equalsIgnoreCase("music_disc_mall") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_6")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_6")))) { final double price = this.getConfig().getDouble("items.musicdiscmall.actualprice"); final String Name = "Music Disc (mall)"; final String literalName = "RECORD_6"; final String actualPricePath = "items.musicdiscmall.actualprice"; final String pricePath = "items.musicdiscmall.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2261); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscmellohi") || args0.equalsIgnoreCase("2262") || args0.equalsIgnoreCase("music_disc_mellohi") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_7")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_7")))) { final double price = this.getConfig().getDouble("items.musicdiscmellohi.actualprice"); final String Name = "Music Disc (mellohi)"; final String literalName = "RECORD_7"; final String actualPricePath = "items.musicdiscmellohi.actualprice"; final String pricePath = "items.musicdiscmellohi.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2262); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscstal") || args0.equalsIgnoreCase("2263") || args0.equalsIgnoreCase("music_disc_stal") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_8")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_8")))) { final double price = this.getConfig().getDouble("items.musicdiscblocks.actualprice"); final String Name = "Music Disc (stal)"; final String literalName = "RECORD_8"; final String actualPricePath = "items.musicdiscstal.actualprice"; final String pricePath = "items.musicdiscstal.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2263); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscstrad") || args0.equalsIgnoreCase("2264") || args0.equalsIgnoreCase("music_disc_strad") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_9")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_9")))) { final double price = this.getConfig().getDouble("items.musicdiscstrad.actualprice"); final String Name = "Music Disc (strad)"; final String literalName = "RECORD_9"; final String actualPricePath = "items.musicdiscstrad.actualprice"; final String pricePath = "items.musicdiscstrad.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2264); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscward") || args0.equalsIgnoreCase("2265") || args0.equalsIgnoreCase("music_disc_ward") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_10")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_10")))) { final double price = this.getConfig().getDouble("items.musicdiscward.actualprice"); final String Name = "Music Disc (ward)"; final String literalName = "RECORD_10"; final String actualPricePath = "items.musicdiscward.actualprice"; final String pricePath = "items.musicdiscward.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2265); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdisc11") || args0.equalsIgnoreCase("2266") || args0.equalsIgnoreCase("music_disc_11") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_11")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_11")))) { final double price = this.getConfig().getDouble("items.musicdisc11.actualprice"); final String Name = "Music Disc (11)"; final String literalName = "RECORD_11"; final String actualPricePath = "items.musicdisc11.actualprice"; final String pricePath = "items.musicdisc11.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2266); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("bedrock") || args0.equalsIgnoreCase("7") || args0.equalsIgnoreCase("adminium") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("BEDROCK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("BEDROCK")))) { final double price = this.getConfig().getDouble("items.bedrock.actualprice"); final String Name = "Bedrock"; final String literalName = "BEDROCK"; final String actualPricePath = "items.bedrock.actualprice"; final String pricePath = "items.bedrock.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 7); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("netherwart") || args0.equalsIgnoreCase("372") || args0.equalsIgnoreCase("netherwarts") || args0.equalsIgnoreCase("115") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("NETHER_STALK")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("NETHER_STALK")))) { final double price = this.getConfig().getDouble("items.netherwart.actualprice"); final String Name = "Nether Wart"; final String literalName = "NETHER_STALK"; final String actualPricePath = "items.netherwart.actualprice"; final String pricePath = "items.netherwart.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 372); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("musicdiscwait") || args0.equalsIgnoreCase("2267") || args0.equalsIgnoreCase("music_disc_wait") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("RECORD_12")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("RECORD_12")))) { final double price = this.getConfig().getDouble("items.musicdiscwait.actualprice"); final String Name = "Music Disc (wait)"; final String literalName = "RECORD_12"; final String actualPricePath = "items.musicdiscwait.actualprice"; final String pricePath = "items.musicdiscwait.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 2267); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (args0.equalsIgnoreCase("dragonegg") || args0.equalsIgnoreCase("122") || args0.equalsIgnoreCase("enderdragonegg") || (args0.equalsIgnoreCase("hand") && player.getInventory().getItemInHand().getType() == Material.getMaterial("DRAGON_EGG")) || (args0.equalsIgnoreCase("dontexecutethiscommand") && player.getInventory().contains(Material.getMaterial("DRAGON_EGG")))) { final double price = this.getConfig().getDouble("items.dragonegg.actualprice"); final String Name = "Dragon Egg"; final String literalName = "DRAGON_EGG"; final String actualPricePath = "items.dragonegg.actualprice"; final String pricePath = "items.dragonegg.price"; int howMany = 1; if (argsLength == 1) { if (args0.equalsIgnoreCase("dontexecutethiscommand") || args0.equalsIgnoreCase("all")) { howMany = MethodsForReference.getAmount(player, 122); } else { howMany = 1; } } else if (MethodsForReference.tryParseInt(args1)) { howMany = Integer.parseInt(args1); } else if (!theCommand.equalsIgnoreCase("setprice")) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The value you put after the item/block name has to be an integer, that is, a number without a point, such as 2 or 43."); } if (theCommand.equalsIgnoreCase("buy")) { this.buyMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath); } if (theCommand.equalsIgnoreCase("sell")) { this.sellMethod(price, Name, player, literalName, howMany, actualPricePath, pricePath, args0); } if (theCommand.equalsIgnoreCase("price")) { this.getPrice(player, pricePath, Name); } if (theCommand.equalsIgnoreCase("setprice")) { if (argsLength == 1) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "Go on... /setprice " + args0 + " what?"); this.didThingsOccur = true; } if (argsLength == 2) { double priceToBeSet = 2.0; try { priceToBeSet = Double.parseDouble(args1); this.setPrice(player, actualPricePath, pricePath, priceToBeSet, literalName); } catch (NumberFormatException NFE) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "The price has to be a number, such as 2.28, or 9, or 130 for example."); this.didThingsOccur = true; } } } } if (!this.didThingsOccur) { player.sendMessage(ChatColor.BLACK + "[" + ChatColor.AQUA + "UltiMarket" + ChatColor.BLACK + "] " + ChatColor.GREEN + "That " + ChatColor.YELLOW + "item " + ChatColor.GREEN + "is not available in " + ChatColor.AQUA + "UltiMarket" + ChatColor.GREEN + "!"); } return true; } }