SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.deeion.main;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.entity.Entity;
  5. import org.bukkit.plugin.java.JavaPlugin;
  6. import me.deeion.commands.KGLagg;
  7. import net.md_5.bungee.api.ChatColor;
  8.  
  9.  
  10. public class Main extends JavaPlugin{
  11.    
  12.     public void onEnable() {
  13.         System.out.println("(!) KG Plugin ^ON^");
  14.         Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  15.  
  16.             @Override
  17.             public void run() {
  18.                
  19.                 int totalEntities = 0;
  20.                 for (org.bukkit.World world : Bukkit.getServer().getWorlds()) {
  21.                     totalEntities = totalEntities+world.getEntities().size();
  22.  
  23.                     for (Entity entities : world.getEntities()) {
  24.                         entities.remove();
  25.                     }
  26.                 }
  27.                
  28.                
  29.                 Bukkit.broadcastMessage(ChatColor.AQUA + "" + totalEntities + du);
  30.             }
  31.  
  32.            
  33.            
  34.         }, 0L, 5000);
  35.        
  36.        
  37.         getCommand("clearlagg").setExecutor(new KGLagg());
  38.        
  39.     }
  40.    
  41.     public void onDisable() {
  42.         System.out.println("(!) KG Plugin ^OFF^");
  43.     }
  44.  
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top