[INACTIVE][SEC] BlockBlocks V12.6_01 - 'I don't want TNT and lava!' etc. [Permissions] [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Liam Allan, Jun 29, 2011.

?

What blocks should I block?

  1. Portal(91)

    72 vote(s)
    78.3%
  2. Sponge

    20 vote(s)
    21.7%
  1. Offline

    Moon_werewolf

    where did the change list go?
     
  2. Offline

    Liam Allan

    Link above title.
     
  3. Offline

    marinesleep

    great plugin liam :0 come on my server ip is acegames.mobi:25565
     
  4. Offline

    Moo Master

    It works, and it works well, but people get kicked for redstone?
     
  5. Offline

    Liam Allan

    It's a bug I don't know how to fix :(
     
  6. Offline

    Moo Master

  7. Offline

    tyzoid

    I took a look at your source.

    In BlockBlockBlockListener.java...
    you check if they placed a block next to a redstone torch... while assuming that it is TNT.

    for example:
    Code:
    if (block.getRelative(BlockFace.DOWN).getType() == Material.REDSTONE_TORCH_ON) {
    	plugin.getServer().broadcastMessage(ChatColor.GOLD + "[BlockBlock]" + ChatColor.WHITE + player.getName() + " has been kicked for exploding TNT.");
    	player.kickPlayer("You have been kicked for exploding TNT.");
    	plugin.getServer().broadcastMessage(ChatColor.GOLD + "[BlockBlock]" + ChatColor.WHITE + player.getName() + "'s TNT exploaded at:");
    	plugin.getServer().broadcastMessage(ChatColor.GOLD + "[BlockBlock]" + ChatColor.WHITE + "TNT has exploded at X:" + block.getX() + " Y:" + block.getY() + " Z:" + block.getZ());
    	event.setCancelled(true); //then once the player has been discontected, the block will be set to 0(which is air)
    	BlockBlock.blockExplosion = event.getBlock().getLocation();
    	System.out.println( player.getName() + " has found the TNT exploit!");
    	System.out.println("TNT has exploded at X:" + block.getX() + " Y:" + block.getY() + " Z:" + block.getZ()); }
    
    Replace the if statement with this:
    Code:
    if ((block.getRelative(BlockFace.DOWN).getType() == Material.REDSTONE_TORCH_ON) && block.getType() == Material.TNT) {
    
    That should fix your bug.
     
  8. Offline

    Liam Allan

    Hey! I'm glad you posted a fix for it. I'll pass it onto the new developer!
     
  9. Offline

    tyzoid

    No problem :)

    Edit: Check all of your if statements.
     
  10. Offline

    marinesleep

    kicks people from my server for placing tnt when they didnt can you make it so when they place the item the item dissapears maybe ?? THANKS
     

Share This Page