diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 85e09bb..6451e4e 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -3640,6 +3640,24 @@ implements Listener breakOreBlock(p, e.getBlock(), has_silktouch); } } + if (this.plugin.hasJobBuff("Digger", p, Job.JOB5)) { + //Applies to dirt, sand, and gravel blocks. A small chance that a nearby block drops an artifact piece (clay with enchantment to glow) + if (e.getBlock().getType()==Material.DIRT || + e.getBlock().getType()==Material.SAND || + e.getBlock().getType()==Material.GRAVEL && Math.random()<=0.0025 /*0.25% chance*/) { + ItemStack artifact = new ItemStack(Material.CLAY_BALL); + ItemMeta meta = artifact.getItemMeta(); + List lore = new ArrayList(); + lore.add("This clump of material seems to"); + lore.add("be part of something ancient."); + lore.add(""); + lore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"Combine this piece with Eyes of Ender"); + lore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"to perhaps restore its true potential."); + meta.setLore(lore); + artifact.setItemMeta(meta); + e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), artifact); + } + } //*******************************//Job Buffs end here! int myData=this.plugin.getPlayerDataSlot(p); @@ -4383,6 +4401,23 @@ implements Listener @EventHandler public void onItemPrepareCraft(PrepareItemCraftEvent e) { CraftingInventory result = e.getInventory(); + + //****************************// Job Boofs poof here. + if (result.getResult().getType()==Material.CLAY_BALL) { + //Check to see if there is an artifact in the crafting grid. + boolean artifact=false; + for (int i=0;i