--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/PowerMiner.java 2011/05/30 20:25:59 1490 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/PowerMiner.java 2011/08/16 16:11:25 1591 @@ -25,10 +25,10 @@ @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { - if (!sender.isOp()) { +/* if (!sender.isOp()) { sender.sendMessage("Only ops can use powerminer"); return false; - } + }*/ if (! (sender instanceof Player) ) { sender.sendMessage("Only in-game players can use powerminer"); @@ -37,6 +37,13 @@ Player p = (Player) sender; + + + if ( ! p.hasPermission("hoeruputils.powerminer") ) { + sender.sendMessage("You don't have permissions to use powerminer!"); + return false; + } + if (miners.contains(p.getName())) { miners.remove( p.getName() ); p.sendMessage("PowerMiner disabled"); @@ -75,13 +82,20 @@ case 27: case 28: return null; //instabreak drops powered and detector rails + case 50: + return null; //instabreak drops torches + case 53: + return null; //instabreak drops wood for wooden stairs case 54: return null; //instabreak drops chests case 56: //diamond ore drops diamond return new ItemStack(264,1); case 58: return null; //instabreak drops craft tables + case 60: + return null; //instabreak drops dirt for farmland blocks case 64: //instabreak drops wooden doors + case 65: //instabreak drops ladders case 66: return null; //instabreak drops rails case 71: //instabreak drops iron doors @@ -89,10 +103,16 @@ case 73: case 74: return new ItemStack(331,4); //redstone ore (both glowing and non-glowing) drops 4 redstone + case 75: + case 76: + return null; //instabreak drops redstone torches (both on and off) case 82: return null; //instabreak drops clay from clayblock case 88: return null; //instabreak drops soul sand + case 93: //instabreak drops repeater both on and off + case 94: + return null; default: return new ItemStack(b.getTypeId(), 1,(short)0, b.getData()); } @@ -101,9 +121,6 @@ public void onBlockDamage(BlockDamageEvent event) { Player p = event.getPlayer(); - if (! p.isOp() ) - return; - if (p.getItemInHand().getType() == Material.FEATHER) { if ( miners.contains(p.getName()) ) {