1.7 TnT / Instant TnT

Discussion in 'Archived: Plugin Requests' started by redhotmo, Jan 12, 2013.

  1. Offline

    redhotmo

    All the instant tnt / 1.7 tnt plugins i tried refused to work please help me find one that works ;)
     
  2. Offline

    AndyMcB1

    A link at least?
    We need more information.. Instant.. crafting?
    Instant.. ignition?
    Instant.. teleportation?
     
  3. Offline

    ThedbCoders

    he looking for a plugin to make it when you hit tnt is goes off

    : Im sure there was one called OldSchoolTnT
     
  4. Offline

    AndyMcB1

    This would be sooo easy to make if I knew java. Literally <20 lines without commands or perms.
     
  5. Offline

    ThedbCoders

    you would need more then 20lines
     
  6. Offline

    AndyMcB1

    Darn.. Well still not many :p
     
  7. Offline

    Rprrr

    ThedbCoders
    Not really. AndyMcB1 was right, you can do this in (under) 20 lines.
    Code:java
    1. package me.rprrr.instant;
    2. import org.bukkit.Bukkit;
    3. import org.bukkit.Material;
    4. import org.bukkit.entity.EntityType;
    5. import org.bukkit.event.EventHandler;
    6. import org.bukkit.event.Listener;
    7. import org.bukkit.event.block.Action;
    8. import org.bukkit.event.player.PlayerInteractEvent;
    9. import org.bukkit.plugin.java.JavaPlugin;
    10. public class Instant extends JavaPlugin implements Listener{
    11. @Override
    12. public void onEnable(){
    13. Bukkit.getServer().getPluginManager().registerEvents(this, this); }
    14. @EventHandler
    15. public void onInteract(PlayerInteractEvent e){
    16. if (e.getAction().equals(Action.LEFT_CLICK_BLOCK) && e.getPlayer().hasPermission("instant.tnt") && e.getClickedBlock() !=null && e.getClickedBlock().getType().equals(Material.TNT)){
    17. e.getClickedBlock().getWorld().spawnEntity(e.getClickedBlock().getLocation(), EntityType.PRIMED_TNT); e.getClickedBlock().setType(Material.AIR); } } }


    It even includes a permission node, instant.tnt.
     
  8. Offline

    ThedbCoders

    We are not in Codename_B 50lines fo code & thats very messy, i douth it will make it on bukkitdev
     
  9. Offline

    Rprrr

    ThedbCoders
    Of course it would make it on BukkitDev... It doesn't matter what your code looks like. Simply not at all. Also, apart from the fact that it is made as short as possible, I don't see how this is 'very messy'. Messy is subjective, by the way.

    And yes, I know we aren't in codename_B's topic, but you said it isn't possible in under 20 lines, while this is a working plugin that does the job, in under 20 lines.. so you were just wrong.
     

Share This Page