daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.VirTuoZe;
  2.  
  3.  
  4. import java.util.HashMap;
  5.  
  6. import org.bukkit.Bukkit;
  7. import org.bukkit.Location;
  8. import org.bukkit.Material;
  9. import org.bukkit.entity.Player;
  10. import org.bukkit.event.Listener;
  11. import org.bukkit.plugin.java.JavaPlugin;
  12. import org.bukkit.scheduler.BukkitRunnable;
  13.  
  14.  
  15.  
  16.  
  17.  
  18. public class Main extends JavaPlugin{
  19.    
  20.     public static HashMap<Player, Boolean> build = new HashMap<>();
  21.  
  22.  
  23.    
  24.     @SuppressWarnings("deprecation")
  25.     @Override
  26.     public void onEnable() {
  27.         getServer().getPluginManager().registerEvents((Listener) new MonPluginListener(this), this);
  28.         getCommand("build").setExecutor(new commandbuild(this));
  29.  
  30.    
  31.    
  32.     Bukkit.getScheduler().runTaskTimer(this, new BukkitRunnable() {
  33.        
  34.         @Override
  35.         public void run() {
  36.             Bukkit.broadcastMessage("§cremove!");
  37.            
  38.             MonPluginListener.Location.stream().map(Location::getBlock).forEach(block -> block.setType(Material.AIR));
  39.         }
  40.     }, 0, 20 *30);
  41.    
  42.    
  43.  
  44. }}
RAW Paste Data
Top