diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerData.java b/BankEconomyMod/src/me/kaZep/Base/PlayerData.java index 166d7d0..86d8531 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerData.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerData.java @@ -14,6 +14,7 @@ public class PlayerData { int minestreak=0; boolean haslanded=true; int blockstack=0; //The amount of times you've gotten hit (The amount of "blocking" stacks you now have) + int fishingstreak=0; int fishingrodfails=0; //The amount of times in a row you've failed to catch fish. long fishingroduse=Main.SERVER_TICK_TIME; //The last time you threw the fishing rod in the water. double fishingrodcatchrate = 0.002; //The current chance of catching a fish. diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 23eef02..d913106 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -5929,44 +5929,19 @@ implements Listener Player p = e.getPlayer(); Bukkit.getPlayer("sigonasr2").sendMessage("Extacting "+e.getItemAmount()+" "+e.getItemType()); }*/ + @EventHandler - public void onLeafDecay(LeavesDecayEvent e) { - Player[] list = Bukkit.getOnlinePlayers(); - for (int i=0;i=20) { - //Increase sapling drops by 64%. - if (e.getBlock().getData()!=3) { - //This is not a jungle leaf block. - if (Math.random()*100<=25) { - //Produce a sapling. - Bukkit.getWorld("world").dropItem(e.getBlock().getLocation(), new ItemStack(Material.SAPLING,1,e.getBlock().getData())); - //list[i].sendMessage("You got an extra spawned sapling."); - } - } else { - if (Math.random()*100<=12.5) { - //Produce a sapling. - Bukkit.getWorld("world").dropItem(e.getBlock().getLocation(), new ItemStack(Material.SAPLING,1,e.getBlock().getData())); - } - } - } else - if (this.plugin.PlayerinJob(list[i], "Woodcutter") && this.plugin.getJobLv("Woodcutter", list[i])>=5) { - //Increase sapling drops by 40%. - if (e.getBlock().getData()!=3) { - //This is not a jungle leaf block. - if (Math.random()*100<=12) { - //Produce a sapling. - Bukkit.getWorld("world").dropItem(e.getBlock().getLocation(), new ItemStack(Material.SAPLING,1,e.getBlock().getData())); - //list[i].sendMessage("You got an extra spawned sapling."); - } - } else { - if (Math.random()*100<=6) { - //Produce a sapling. - Bukkit.getWorld("world").dropItem(e.getBlock().getLocation(), new ItemStack(Material.SAPLING,1,e.getBlock().getData())); - } - } + public void onLeavesDecay(LeavesDecayEvent e) { + if (e.getBlock().getData()==0/*Has to be oak.*/) { + //We will check for nearby players. + for (int i=0;i