Finishing touches on BM

This commit is contained in:
nossr50 2012-03-01 14:15:16 -08:00
parent 3945a681a3
commit 2151fbb6c0

View File

@ -287,7 +287,7 @@ public class mcPlayerListener implements Listener
if((action == Action.RIGHT_CLICK_BLOCK || action == Action.RIGHT_CLICK_AIR) && is.getTypeId() == LoadProperties.detonatorID) if((action == Action.RIGHT_CLICK_BLOCK || action == Action.RIGHT_CLICK_AIR) && is.getTypeId() == LoadProperties.detonatorID)
{ {
Block b = player.getTargetBlock(null, 100); 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; AbilityType ability = AbilityType.BLAST_MINING;
//Check cooldown //Check cooldown
@ -303,6 +303,8 @@ public class mcPlayerListener implements Listener
y.sendMessage(ability.getAbilityPlayer(player)); y.sendMessage(ability.getAbilityPlayer(player));
} }
player.sendMessage(ChatColor.GRAY+"**BOOM**");
TNTPrimed tnt = player.getWorld().spawn(b.getLocation(), TNTPrimed.class); TNTPrimed tnt = player.getWorld().spawn(b.getLocation(), TNTPrimed.class);
b.setType(Material.AIR); b.setType(Material.AIR);
tnt.setFuseTicks(0); tnt.setFuseTicks(0);