delete button after 60 seconds

Discussion in 'Plugin Development' started by imotionzz, Jun 10, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    imotionzz

    Hello,

    Is it possible to remove a block after 60 seconds when the player placed it?
    If it is, how :p?
     
  2. Offline

    Compressions

    imotionzz
    Code:
        @EventHandler
        public void onBlockPlace(BlockPlaceEvent e) {
            final Block b = e.getBlock();
            Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitRunnable() {
                public void run() {
                    b.setType(Material.AIR);
                }
            }, 1200);
        }
        
     
Thread Status:
Not open for further replies.

Share This Page