Skip to content

Commit

Permalink
Finishing touches on BM
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed Mar 1, 2012
1 parent 3945a68 commit 2151fbb
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -287,7 +287,7 @@ public void onPlayerInteract(PlayerInteractEvent event)
if((action == Action.RIGHT_CLICK_BLOCK || action == Action.RIGHT_CLICK_AIR) && is.getTypeId() == LoadProperties.detonatorID)
{
Block b = player.getTargetBlock(null, 100);
if(b.getType().equals(Material.TNT))
if(b.getType().equals(Material.TNT) && mcPermissions.getInstance().blastMining(player) && m.blockBreakSimulate(b, player, true) && Users.getProfile(player).getSkillLevel(SkillType.MINING) >= 125)
{
AbilityType ability = AbilityType.BLAST_MINING;
//Check cooldown
Expand All @@ -303,6 +303,8 @@ public void onPlayerInteract(PlayerInteractEvent event)
y.sendMessage(ability.getAbilityPlayer(player));
}

player.sendMessage(ChatColor.GRAY+"**BOOM**");

TNTPrimed tnt = player.getWorld().spawn(b.getLocation(), TNTPrimed.class);
b.setType(Material.AIR);
tnt.setFuseTicks(0);
Expand Down

0 comments on commit 2151fbb

Please sign in to comment.