diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java b/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java index 67e3d96..f1d126c 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java @@ -191,7 +191,7 @@ public class PlayerBuffData { } if (this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat2")>0) { p.removePotionEffect(PotionEffectType.FAST_DIGGING); - p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING,399,this.plugin.getStatBonus(1, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat2")/4)/20-1)); + p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING,399,this.plugin.getStatBonus(1, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat2")/5)/20-1)); } //p.sendMessage("Health: "+p.getHealth()+"/"+p.getMaxHealth()+" Base HP Level: "+base_hplv); if (p.getHealth()>p.getMaxHealth()) { diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index ba6b8d4..748895e 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -8203,6 +8203,27 @@ implements Listener @EventHandler public void onBlockPlace(BlockPlaceEvent e) { Player p = e.getPlayer(); + if (e.getItemInHand().getType()==Material.HOPPER) { + //Check surrounding blocks to verify it's not a chest. + for (int i=-1;i<2;i++) { + for (int j=0;j<2;j++) { + for (int k=-1;k<2;k++) { + if (p.getWorld().getBlockAt(e.getBlockPlaced().getLocation().add(i,j,k)).getType()==Material.CHEST) { + //Check to see if it's a recycling center chest. + for (int l=0;l