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<Economy> rsp = (RegisteredServiceProvider<Economy>)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<Double> originalPriceList = this.listOfItemPrices(); ArrayList<Double> priceList = this.listOfItemPrices(); ArrayList<String> 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<Double> originalPriceList = this.listOfItemPrices(); ArrayList<Double> priceList = this.listOfItemPrices(); ArrayList<String> 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<Double> priceList = this.listOfItemPrices(); final ArrayList<String> 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<Double> priceList = this.listOfItemPrices(); final ArrayList<String> 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<String> listItemConfigNames() { final ArrayList<String> itemNames = new ArrayList<String>(); 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<Double> listOfItemPrices() { final ArrayList<Double> itemPrices = new ArrayList<Double>(); 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<Double> originalPriceList = this.listOfItemPrices(); ArrayList<Double> priceList = this.listOfItemPrices(); ArrayList<String> 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 + "] 