diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main.class b/BankEconomyMod/bin/me/kaZep/Base/Main.class index 4419ef4..d3013ff 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main.class and b/BankEconomyMod/bin/me/kaZep/Base/Main.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class index d5062d1..5108937 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class index 71300a8..27b1cbb 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class b/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class index 6f923b5..0cb5470 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class and b/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class differ diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index 84e5fdd..160e988 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -12,6 +12,7 @@ import java.util.ConcurrentModificationException; import java.util.Date; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; @@ -569,18 +570,18 @@ public class Main extends JavaPlugin Blacksmith_job.addData("WEAK DIAMOND HELMET", 1.15, 480, 0); Blacksmith_job.addData("WEAK DIAMOND LEGGINGS", 1.325, 660, 0); Blacksmith_job.addData("WEAK DIAMOND CHESTPLATE", 1.50, 750, 0); - Blacksmith_job.addData("IRON BOOTS", 0.375*10, 27*10, 0); - Blacksmith_job.addData("IRON HELMET", 0.50*10, 45*10, 0); - Blacksmith_job.addData("IRON LEGGINGS", 0.725*10, 60*10, 0); - Blacksmith_job.addData("GOLDEN BOOTS", 0.825*10, 50*10, 0); - Blacksmith_job.addData("IRON CHESTPLATE", 0.875*10, 70*10, 0); - Blacksmith_job.addData("GOLDEN HELMET", 0.925*10, 80*10, 0); - Blacksmith_job.addData("DIAMOND BOOTS", 1.0*10, 85*10, 0); - Blacksmith_job.addData("GOLDEN LEGGINGS", 1.025*10, 100*10, 0); - Blacksmith_job.addData("GOLDEN CHESTPLATE", 1.15*10, 130*10, 0); - Blacksmith_job.addData("DIAMOND HELMET", 1.15*10, 125*10, 0); - Blacksmith_job.addData("DIAMOND LEGGINGS", 1.325*10, 145*10, 0); - Blacksmith_job.addData("DIAMOND CHESTPLATE", 1.50*10, 175*10, 0); + Blacksmith_job.addData("IRON BOOTS", 0.375*10, 80*10, 0); + Blacksmith_job.addData("IRON HELMET", 0.50*10, 100*10, 0); + Blacksmith_job.addData("IRON LEGGINGS", 0.725*10, 140*10, 0); + Blacksmith_job.addData("GOLDEN BOOTS", 0.825*10, 120*10, 0); + Blacksmith_job.addData("IRON CHESTPLATE", 0.875*10, 175*10, 0); + Blacksmith_job.addData("GOLDEN HELMET", 0.925*10, 150*10, 0); + Blacksmith_job.addData("DIAMOND BOOTS", 1.0*10, 390*10, 0); + Blacksmith_job.addData("GOLDEN LEGGINGS", 1.025*10, 170*10, 0); + Blacksmith_job.addData("GOLDEN CHESTPLATE", 1.15*10, 192*10, 0); + Blacksmith_job.addData("DIAMOND HELMET", 1.15*10, 480*10, 0); + Blacksmith_job.addData("DIAMOND LEGGINGS", 1.325*10, 660*10, 0); + Blacksmith_job.addData("DIAMOND CHESTPLATE", 1.50*10, 750*10, 0); Blacksmith_job.setBuffData("All crafted items are buffed with a Lv5 enchantment.", "All crafted items are buffed with a Lv10 enchantment.", "Crafting materials have a 30% chance of being preserved.", @@ -591,18 +592,18 @@ public class Main extends JavaPlugin Cook_job.setAction(0, "CRAFT"); Cook_job.setAction(1, "SMELT"); Cook_job.setExp(250, 200, 40, 1.04); - Cook_job.addData("BREAD", 0.0125, 5, 0); - Cook_job.addData("MUSHROOM SOUP", 0.0375, 15, 0); - Cook_job.addData("COOKIE", 0.0675, 25, 0); + Cook_job.addData("BREAD", 0.003125, 1.25, 0); + Cook_job.addData("COOKIE", 0.016875, 1.50, 0); + Cook_job.addData("MUSHROOM SOUP", 0.009375, 3.75, 0); + Cook_job.addData("PUMPKIN PIE", 0.0375, 15, 0); Cook_job.addData("GOLDEN CARROT", 0.0875, 35, 0); + Cook_job.addData("CAKE", 0.10625, 21.25, 0); Cook_job.addData("GOLDEN APPLE", 0.1125, 45, 0); - Cook_job.addData("PUMPKIN PIE", 0.15, 60, 0); - Cook_job.addData("CAKE", 0.2125, 85, 0); - Cook_job.addData("COOKED FISH", 0.03, 12, 1); - Cook_job.addData("BAKED POTATO", 0.04, 16, 1); - Cook_job.addData("COOKED CHICKEN", 0.045, 18, 1); - Cook_job.addData("GRILLED PORK", 0.06, 24, 1); - Cook_job.addData("COOKED BEEF", 0.10, 40, 1); + Cook_job.addData("COOKED FISH", 0.06, 24, 1); + Cook_job.addData("BAKED POTATO", 0.08, 32, 1); + Cook_job.addData("COOKED CHICKEN", 0.09, 36, 1); + Cook_job.addData("GRILLED PORK", 0.12, 48, 1); + Cook_job.addData("COOKED BEEF", 0.20, 80, 1); Cook_job.setBuffData("Double the amount of cooking time with one fuel item in the furnace.", "Results of crafting food is double the normal amount.", "Results of cooking food is double the normal amount.", @@ -702,13 +703,13 @@ public class Main extends JavaPlugin Support_job.setJobName("Support"); Support_job.setJobDescription("A support's job is to provide assistance and keep others alive by providing potions to heal, materials to allow others to craft things, and being useful overall."); - Support_job.setAction(0, "GIVE"); + /*Support_job.setAction(0, "GIVE"); Support_job.setAction(1, "CRAFT"); - Support_job.setAction(2, "SPLASH"); - Support_job.setAction(3, "Supporting Situations"); + Support_job.setAction(2, "SPLASH");*/ + Support_job.setAction(0, "Supporting Situations"); Support_job.setExp(100, 100, 5, 1.03); - Support_job.addExtraData("Simply give players items to earn some money. Note that if they give it back you lose the xp you gained from it."); - Support_job.addData("TORCH", 0.005, 1, 0); + Support_job.addExtraData("Give players items to earn some money. Note that if they give it back you lose the xp you gained from it. Setting people on fire will clear all experience you've earned for that level."); + /*Support_job.addData("TORCH", 0.005, 1, 0); Support_job.addData("WOOD", 0.005, 1, 0); Support_job.addData("COAL", 0.005, 1, 0); Support_job.addData("IRON", 0.005, 1, 0); @@ -726,14 +727,13 @@ public class Main extends JavaPlugin Support_job.addData("SPEED", 0.15, 6, 2); Support_job.addData("STRENGTH", 0.40, 9, 2); Support_job.addData("FIRE RESISTANCE", 0.50, 12, 2); - Support_job.addData("HEALING", 0.30, 14, 2); - Support_job.addData("-Light up dark areas.", 0.00, 1, 3); - Support_job.addData("-Help kill things with others.", 0.025, 3, 3); - Support_job.addData("-Clear out lava areas to allow for safe passage.", 0.05, 10, 3); - Support_job.addData("-Providing materials that someone ran out of.", 0.35, 30, 3); - Support_job.addData("-Healing someone when they are low in health.", 0.80, 40, 3); - Support_job.addData("-Dousing or using a fire resistance potion on someone burning.", 1.20, 60, 3); - Support_job.addData("-Teleport to others who need help.", 0.00, 100, 3); + Support_job.addData("HEALING", 0.30, 14, 2);*/ + Support_job.addData("-Light up dark areas.", 0.01, 2, 0); + Support_job.addData("-Help kill things with others.", 0.05, 6, 0); + Support_job.addData("-Clear out lava areas to allow for safe passage.", 0.15, 60, 0); + Support_job.addData("-Providing materials that someone ran out of.", 1.05, 90, 0); + Support_job.addData("-Healing someone when they are low in health.", 2.40, 120, 0); + Support_job.addData("-Dousing or using a fire resistance potion on someone burning.", 4.80, 240, 0); Support_job.setBuffData("Everyone around you gains +2 Armor.", "Everyone around you gains +10 more Maximum Health.", "Everyone around you gains +4 Armor. Everyone's hunger degrades at half the speed. Players with 8 HP or less take half the damage from hits.", @@ -3301,6 +3301,24 @@ public void payDay(int time) } saveAccountsConfig(); } + + public void setMoneyExp(Player p,String job,double newamount,double newexp) { + String[] jobs = getJobs(p); + int slot=-1; + JobsDataInfo[] Jobsinfo = {Woodcutter_job,Miner_job,Builder_job,Digger_job,Farmer_job,Hunter_job,Fisherman_job,Weaponsmith_job,Blacksmith_job,Cook_job,Brewer_job,Enchanter_job,Breeder_job,Explorer_job,Support_job}; + for (int i=0;i enchant_data = new ArrayList(); //OMGGGG. forgot to initialize the dang list! if (item.getType()==Material.STONE_HOE || item.getType()==Material.IRON_HOE || item.getType()==Material.WOOD_HOE || item.getType()==Material.GOLD_HOE || item.getType()==Material.DIAMOND_HOE) { enchant_data=ENCHANTMENT_DATA.stone_hoe; } else //DERP + if (item.getType()==Material.BOW) {enchant_data=ENCHANTMENT_DATA.bow;} else + if (item.getType()==Material.IRON_SWORD) {enchant_data=ENCHANTMENT_DATA.iron_sword;} else + if (item.getType()==Material.GOLD_SWORD) {enchant_data=ENCHANTMENT_DATA.gold_sword;} else + if (item.getType()==Material.DIAMOND_SWORD) {enchant_data=ENCHANTMENT_DATA.diamond_sword;} else if (item.getType()==Material.STONE_SPADE) {enchant_data=ENCHANTMENT_DATA.stone_shovel;} else if (item.getType()==Material.STONE_PICKAXE) {enchant_data=ENCHANTMENT_DATA.stone_pickaxe;} else if (item.getType()==Material.LEATHER_BOOTS) {enchant_data=ENCHANTMENT_DATA.leather_boots;} else @@ -3514,6 +3537,76 @@ public void payDay(int time) } } } + Map map = item.getEnchantments(); + if (PlayerinJob(p, "Enchanter")) { + for (Map.Entry entry : map.entrySet()) { + if (getJobLv("Enchanter", p)>=20) { + if (entry.getKey().getMaxLevel()=20 && crafteditem) { @@ -2923,7 +2923,7 @@ public class PlayerListener Player support = this.plugin.getClosestSupport(p.getLocation()); if (support!=null) { if (!alreadyhas) { - this.plugin.gainMoneyExp(support,"Support",0.175,15); + this.plugin.gainMoneyExp(support,"Support",1.05,90); } else { this.plugin.gainMoneyExp(support,"Support",0.01,1); } @@ -3005,7 +3005,7 @@ public class PlayerListener for (PotionEffect nextpotioneffect : effects) { //shooter.sendMessage(nextpotioneffect.getType().getName()+" is the potion effect."); if (nextpotioneffect.getType().getName().compareTo("NIGHT_VISION")==0) { - this.plugin.gainMoneyExp(shooter,"Support",0.10,5); + //this.plugin.gainMoneyExp(shooter,"Support",0.10,5); } if (nextpotioneffect.getType().getName().compareTo("SPEED")==0) { this.plugin.gainMoneyExp(shooter,"Support",0.15,6); @@ -3018,22 +3018,22 @@ public class PlayerListener } } if (nextpotioneffect.getType().getName().compareTo("INCREASE_DAMAGE")==0) { - this.plugin.gainMoneyExp(shooter,"Support",0.20,9); + //this.plugin.gainMoneyExp(shooter,"Support",0.20,9); } if (nextpotioneffect.getType().getName().compareTo("FIRE_RESISTANCE")==0) { if (p.getFireTicks()>0) { - this.plugin.gainMoneyExp(shooter,"Support",0.60,30); + this.plugin.gainMoneyExp(shooter,"Support",4.80,240); } - this.plugin.gainMoneyExp(shooter,"Support",0.25,12); + //this.plugin.gainMoneyExp(shooter,"Support",0.25,12); } if (nextpotioneffect.getType().getName().compareTo("HEAL")==0) { if (!p.isDead()) { if (p.getHealth()/p.getMaxHealth()<=0.30) { - this.plugin.gainMoneyExp(shooter,"Support",0.60,30); + this.plugin.gainMoneyExp(shooter,"Support",2.40,120); //shooter.sendMessage("This is a big heal."); p.getScoreboard().getTeam(p.getName()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth())); } - this.plugin.gainMoneyExp(shooter,"Support",0.30,14); + //this.plugin.gainMoneyExp(shooter,"Support",0.30,14); if (p.getHealth()+12>p.getMaxHealth()) { p.setHealth(p.getMaxHealth()); } else { @@ -3044,9 +3044,9 @@ public class PlayerListener } if (nextpotioneffect.getType().getName().compareTo("REGENERATION")==0) { if (p.getHealth()/p.getMaxHealth()<=0.30) { - this.plugin.gainMoneyExp(shooter,"Support",0.60,30); + //this.plugin.gainMoneyExp(shooter,"Support",0.60,30); } - this.plugin.gainMoneyExp(shooter,"Support",0.30,14); + //this.plugin.gainMoneyExp(shooter,"Support",0.30,14); //shooter.sendMessage("This is a heal."); } } @@ -3571,6 +3571,83 @@ public class PlayerListener if (result.getResult().getType()==Material.DIAMOND_SWORD) { crafteditem=true; } + if (this.plugin.getJobLv("Weaponsmith", p)>=20) { + ItemStack[] crafteditems = result.getMatrix(); + if (e.getClick()==ClickType.SHIFT_RIGHT || e.getClick()==ClickType.SHIFT_LEFT) { + int lowestamt=9999; + for (int i=0;i=5) { + ItemStack[] crafteditems = result.getMatrix(); + if (e.getClick()==ClickType.SHIFT_RIGHT || e.getClick()==ClickType.SHIFT_LEFT) { + int lowestamt=9999; + for (int i=0;i=10 && crafteditem) { + Bukkit.getPlayer("sigonasr2").sendMessage("Valid item. Going to attempt to enchant."); + ItemStack resulting = this.plugin.EnchantItem(result.getResult(),5,p); + result.setResult(resulting); + } } if (this.plugin.PlayerinJob(p,"Blacksmith")) { boolean crafteditem=false; @@ -3730,25 +3807,46 @@ public class PlayerListener //this.plugin.gainMoneyExp(p,"Blacksmith",1.50*mult,175*mult); crafteditem=true; } - /* if (this.plugin.getJobLv("Blacksmith", p)>=5 && crafteditem) { //Bukkit.getPlayer("sigonasr2").sendMessage("Valid item. Going to attempt to enchant."); - ItemStack resulting = this.plugin.EnchantItem(result.getResult(),5); + ItemStack resulting = this.plugin.EnchantItem(result.getResult(),5,p); result.setResult(resulting); } if (this.plugin.getJobLv("Blacksmith", p)>=10 && crafteditem) { //Bukkit.getPlayer("sigonasr2").sendMessage("Valid item. Going to attempt to enchant."); - ItemStack resulting = this.plugin.EnchantItem(result.getResult(),10); + ItemStack resulting = this.plugin.EnchantItem(result.getResult(),10,p); result.setResult(resulting); - }*/ + } if (this.plugin.getJobLv("Blacksmith", p)>=20) { ItemStack[] crafteditems = result.getMatrix(); - for (int i=0;i0 && ((Player)nearby.get(i)).getHealth()<=8) { //They are on fire, you intend to douse them. - this.plugin.gainMoneyExp(p,"Support",0.60,30); + this.plugin.gainMoneyExp(p,"Support",4.80,240); } } } @@ -4759,7 +4920,7 @@ public ItemStack getGoodie() { } } if (foundlava) { - this.plugin.gainMoneyExp(p,"Support",0.05,10); + this.plugin.gainMoneyExp(p,"Support",0.15,60); } } } @@ -5296,7 +5457,7 @@ public ItemStack getGoodie() { } if (this.plugin.PlayerinJob(p, "Explorer")) { if (this.plugin.getJobLv("Explorer", p)>=10) { - //Check to see if our "fatal survivor" effect is available. + //Check to see if our "fatal s urvivor" effect is available. boolean survivor=false; for (int i=0;i=10 && crafteditem==true) { @@ -8227,6 +8391,7 @@ public ItemStack getGoodie() { p.getInventory().addItem(new ItemStack(item.getType(),amount,item.getDurability(),item.getData().getData())); } } + /* if (this.plugin.PlayerinJob(p,"Support")) { if (item.getType()==Material.BREAD) { this.plugin.gainMoneyExp(p,"Support",0.015*amount,2*amount); @@ -8264,7 +8429,7 @@ public ItemStack getGoodie() { if (item.getType()==Material.CAKE) { this.plugin.gainMoneyExp(p,"Support",0.03*amount,2*amount); } - } + }*/ } private void handleCrafting(InventoryClickEvent event) { @@ -8291,53 +8456,24 @@ public ItemStack getGoodie() { } public String[] getJobs(Player p) { - String[] string= {this.plugin.getAccountsConfig().getString(p.getName()+".jobs.job1"),this.plugin.getAccountsConfig().getString(p.getName()+".jobs.job2"),this.plugin.getAccountsConfig().getString(p.getName()+".jobs.job3")}; - return string; + return this.plugin.getJobs(p); } public String[] getJobs(String p) { - String[] string= {this.plugin.getAccountsConfig().getString(p+".jobs.job1"),this.plugin.getAccountsConfig().getString(p+".jobs.job2"),this.plugin.getAccountsConfig().getString(p+".jobs.job3")}; - return string; + return this.plugin.getJobs(p); } public boolean PlayerinJob(String p,String job) { - String[] jobs = getJobs(p); - for (int i=0;i enchant_data = new ArrayList(); //OMGGGG. forgot to initialize the dang list! - if (item.getType()==Material.STONE_HOE || item.getType()==Material.IRON_HOE || item.getType()==Material.WOOD_HOE || item.getType()==Material.GOLD_HOE || item.getType()==Material.DIAMOND_HOE) { - enchant_data=ENCHANTMENT_DATA.stone_hoe; - } else - //DERP - if (item.getType()==Material.BOW) {enchant_data=ENCHANTMENT_DATA.bow;} else - if (item.getType()==Material.IRON_SWORD) {enchant_data=ENCHANTMENT_DATA.iron_sword;} else - if (item.getType()==Material.GOLD_SWORD) {enchant_data=ENCHANTMENT_DATA.gold_sword;} else - if (item.getType()==Material.DIAMOND_SWORD) {enchant_data=ENCHANTMENT_DATA.diamond_sword;} else - if (item.getType()==Material.STONE_SPADE) {enchant_data=ENCHANTMENT_DATA.stone_shovel;} else - if (item.getType()==Material.STONE_PICKAXE) {enchant_data=ENCHANTMENT_DATA.stone_pickaxe;} else - if (item.getType()==Material.LEATHER_BOOTS) {enchant_data=ENCHANTMENT_DATA.leather_boots;} else - if (item.getType()==Material.LEATHER_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.leather_pants;} else - if (item.getType()==Material.LEATHER_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.leather_tunic;} else - if (item.getType()==Material.LEATHER_HELMET) {enchant_data=ENCHANTMENT_DATA.leather_cap;} else - if (item.getType()==Material.IRON_SPADE) {enchant_data=ENCHANTMENT_DATA.iron_shovel;} else - if (item.getType()==Material.IRON_BOOTS) {enchant_data=ENCHANTMENT_DATA.iron_boots;} else - if (item.getType()==Material.IRON_PICKAXE) {enchant_data=ENCHANTMENT_DATA.iron_pickaxe;} else - if (item.getType()==Material.IRON_HELMET) {enchant_data=ENCHANTMENT_DATA.iron_helmet;} else - if (item.getType()==Material.GOLD_SPADE) {enchant_data=ENCHANTMENT_DATA.golden_shovel;} else - if (item.getType()==Material.IRON_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.iron_leggings;} else - if (item.getType()==Material.DIAMOND_SPADE) {enchant_data=ENCHANTMENT_DATA.diamond_shovel;} else - if (item.getType()==Material.GOLD_BOOTS) {enchant_data=ENCHANTMENT_DATA.golden_boots;} else - if (item.getType()==Material.IRON_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.iron_chestplate;} else - if (item.getType()==Material.GOLD_HELMET) {enchant_data=ENCHANTMENT_DATA.golden_helmet;} else - if (item.getType()==Material.IRON_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.iron_chestplate;} else - if (item.getType()==Material.DIAMOND_PICKAXE) {enchant_data=ENCHANTMENT_DATA.diamond_pickaxe;} else - if (item.getType()==Material.DIAMOND_BOOTS) {enchant_data=ENCHANTMENT_DATA.diamond_boots;} else - if (item.getType()==Material.GOLD_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.golden_leggings;} else - if (item.getType()==Material.GOLD_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.golden_chestplate;} else - if (item.getType()==Material.DIAMOND_HELMET) {enchant_data=ENCHANTMENT_DATA.diamond_helmet;} else - if (item.getType()==Material.DIAMOND_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.diamond_leggings;} else - if (item.getType()==Material.DIAMOND_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.diamond_chestplate;} - int enchantments=0; - int iterations=0; - while (enchantments==0 && iterations<100) { //Attempt to enchant it, up to 100 tries. - iterations++; - //Bukkit.getPlayer("sigonasr2").sendMessage("Enchant data size is "+enchant_data.size()); - for (int i=0;i=10 && validItem_Weaponsmith(post)) { //Bukkit.getPlayer("sigonasr2").sendMessage("Valid item. Going to attempt to enchant."); - ItemStack resulting = EnchantItem(post,5); + ItemStack resulting = EnchantItem(post,5,(Player)player); player.getInventory().setItem(i, resulting); } } if (PlayerinJob((Player)player,"Blacksmith")) { if (getJobLv("Blacksmith", player.getName())>=10 && validItem_Blacksmith(post)) { //Bukkit.getPlayer("sigonasr2").sendMessage("Valid item. Going to attempt to enchant."); - ItemStack resulting = EnchantItem(post,10); + ItemStack resulting = EnchantItem(post,10,(Player)player); player.getInventory().setItem(i, resulting); } else if (getJobLv("Blacksmith", player.getName())>=5 && validItem_Blacksmith(post)) { //Bukkit.getPlayer("sigonasr2").sendMessage("Valid item. Going to attempt to enchant."); - ItemStack resulting = EnchantItem(post,5); + ItemStack resulting = EnchantItem(post,5,(Player)player); player.getInventory().setItem(i, resulting); } } @@ -9857,6 +9896,13 @@ public void onEntityExpode(ExplosionPrimeEvent e) { e.getClickedBlock().setData((byte) ((e.getClickedBlock().getData()+2 % 4))); } }*/ + if (e.getAction()==Action.RIGHT_CLICK_AIR || e.getAction()==Action.RIGHT_CLICK_BLOCK) { + if (p.getItemInHand()!=null && (p.getItemInHand().getType()==Material.FLINT_AND_STEEL || p.getItemInHand().getType()==Material.LAVA_BUCKET)) { + if (this.plugin.PlayerinJob(p, "Support")) { + this.plugin.setMoneyExp(p, "Support", 0, 0); + } + } + } if (e.getAction()==Action.RIGHT_CLICK_AIR || e.getAction()==Action.RIGHT_CLICK_BLOCK) { boolean largechest=false; boolean smallchest=false; diff --git a/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java b/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java index d6fb871..c3d59b4 100644 --- a/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java +++ b/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java @@ -240,6 +240,10 @@ public class commandBankEconomy } } else if (cmd.getName().equalsIgnoreCase("event") && args.length==2 && p.hasPermission("maintenance-mode-admin")) { + if (args[0].equalsIgnoreCase("fatal_survivor") && args[1].equalsIgnoreCase("reset")) { + boolean survivor=false; + this.plugin.explorers.clear(); + } if (args[0].equalsIgnoreCase("halloween") && args[1].equalsIgnoreCase("giant_pumpkin")) { if (this.plugin.getConfig().getBoolean("halloween-enabled")) { ItemStack item = new ItemStack(Material.PUMPKIN); @@ -647,7 +651,7 @@ public class commandBankEconomy this.plugin.saveAccountsConfig(); if (this.plugin.PlayerinJob(p, "Support")) { //Give exp for doing so. - this.plugin.gainMoneyExp(p,"Support",0,100); + //this.plugin.gainMoneyExp(p,"Support",0,100); } p.sendMessage("Teleported to "+ChatColor.GREEN+target.getName()+ChatColor.WHITE+" for $"+ChatColor.YELLOW+df.format(finalcost)+ChatColor.WHITE+". New Account balance: $"+df.format(mymoney-finalcost)); target.sendMessage(ChatColor.GREEN+p.getName()+ChatColor.WHITE+" teleported to your location."); @@ -826,7 +830,14 @@ public class commandBankEconomy for (int i=0;i=5?"+Lv5 Buff":"")+ChatColor.GREEN+(mylv>=10?" +Lv10 Buff":"")+ChatColor.GOLD+(mylv>=20?" +Lv20 Buff":""));if (joblist[i].equalsIgnoreCase("Explorer") && this.plugin.getJobLv(joblist[i], p)>=10) { + + if (mylv==40) { + p.sendMessage("Lv"+mylv+" "+this.plugin.getJobColor(joblist[i])+joblist[i]+ChatColor.WHITE+": "+Math.round(this.plugin.getAccountsConfig().getInt(p.getName()+".jobs.job"+(i+1)+"exp"))+"xp "+ChatColor.BLUE+(mylv>=5?"+Lv5 Buff":"")+ChatColor.GREEN+(mylv>=10?" +Lv10 Buff":"")+ChatColor.GOLD+(mylv>=20?" +Lv20 Buff":"")); + } else { + p.sendMessage("Lv"+mylv+" "+this.plugin.getJobColor(joblist[i])+joblist[i]+ChatColor.WHITE+": "+Math.round(this.plugin.getAccountsConfig().getInt(p.getName()+".jobs.job"+(i+1)+"exp"))+"/"+Math.round(this.plugin.getJobExp(joblist[i], this.plugin.getAccountsConfig().getInt(p.getName()+".jobs.job"+(i+1)+"lv")))+"xp "+ChatColor.BLUE+(mylv>=5?"+Lv5 Buff":"")+ChatColor.GREEN+(mylv>=10?" +Lv10 Buff":"")+ChatColor.GOLD+(mylv>=20?" +Lv20 Buff":"")); + } + + if (joblist[i].equalsIgnoreCase("Explorer") && this.plugin.getJobLv(joblist[i], p)>=10) { //Check to see if the buff is on cooldown for this player or not. boolean discovered=false; long timeleft=0;