// Path: Bssentials-Common/src/main/java/bssentials/Bssentials.java
// public class Bssentials {
// 
//     private static IBssentials i;
//     public static File warpdir;
// 
//     public static File DATA_FOLDER;
// 
//     public static IBssentials getInstance() {
//         return i;
//     }
// 
//     public static void setInstance(IBssentials bss, File dataFolder) {
//         if (null == i) {
//             Bssentials.i = bss;
//             Bssentials.DATA_FOLDER = dataFolder;
//         }
//     }
// 
//     // Below copied from Bukkit
//     public static String translateAlternateColorCodes(char altColorChar, String textToTranslate) {
//         char[] b = textToTranslate.toCharArray();
//         for (int i = 0; i < b.length - 1; i++) {
//             if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[i+1]) > -1) {
//                 b[i] = '\u00A7';
//                 b[i+1] = Character.toLowerCase(b[i+1]);
//             }
//         }
//         return new String(b);
//     }
// 
// }
// 
// Path: Bssentials-Common/src/main/java/bssentials/api/IWorld.java
// public interface IWorld {
// 
//     public void generateTree(double x, double y, double z);
// 
//     public String getName();
// 
//     public int getLoadedChunkCount();
// 
//     public int getEntityCount();
// 
//     public int getBlockAt(int x, int y, int z);
// 
//     public void setStorm(boolean b);
// 
//     public void spawnEntity(Location location, String mobName, Object implobject);
// 
// }


import java.lang.management.ManagementFactory;
import java.util.Collection;
import bssentials.Bssentials;
import bssentials.api.IWorld;
import bssentials.api.User;
package bssentials.commands;



@CmdInfo(aliases = {"mem", "memory", "uptime", "entities"})
public class Lag extends BCommand {

    @Override
    public boolean onCommand(User user, String label, String[] args) {
        user.sendMessage("&6Uptime: &a" + formatTime(ManagementFactory.getRuntimeMXBean().getUptime()));
        user.sendMessage("&6Max RAM: &a" + formatSize(Runtime.getRuntime().maxMemory()));
        user.sendMessage("&6Total RAM: &a" + formatSize(Runtime.getRuntime().totalMemory()));
        user.sendMessage("&6Free RAM: &a" + formatSize(Runtime.getRuntime().freeMemory()));

        Collection<IWorld> worlds = Bssentials.getInstance().getWorlds();
        user.sendMessage("&6Worlds (" + worlds.size() + "):");
// Path: Bssentials-Common/src/main/java/bssentials/Bssentials.java
// public class Bssentials {
// 
//     private static IBssentials i;
//     public static File warpdir;
// 
//     public static File DATA_FOLDER;
// 
//     public static IBssentials getInstance() {
//         return i;
//     }
// 
//     public static void setInstance(IBssentials bss, File dataFolder) {
//         if (null == i) {
//             Bssentials.i = bss;
//             Bssentials.DATA_FOLDER = dataFolder;
//         }
//     }
// 
//     // Below copied from Bukkit
//     public static String translateAlternateColorCodes(char altColorChar, String textToTranslate) {
//         char[] b = textToTranslate.toCharArray();
//         for (int i = 0; i < b.length - 1; i++) {
//             if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[i+1]) > -1) {
//                 b[i] = '\u00A7';
//                 b[i+1] = Character.toLowerCase(b[i+1]);
//             }
//         }
//         return new String(b);
//     }
// 
// }
// 
// Path: Bssentials-Common/src/main/java/bssentials/api/IWorld.java
// public interface IWorld {
// 
//     public void generateTree(double x, double y, double z);
// 
//     public String getName();
// 
//     public int getLoadedChunkCount();
// 
//     public int getEntityCount();
// 
//     public int getBlockAt(int x, int y, int z);
// 
//     public void setStorm(boolean b);
// 
//     public void spawnEntity(Location location, String mobName, Object implobject);
// 
// }


// Path: Bssentials-Common/src/main/java/bssentials/commands/Lag.java
import java.lang.management.ManagementFactory;
import java.util.Collection;
import bssentials.Bssentials;
import bssentials.api.IWorld;
import bssentials.api.User;

package bssentials.commands;



@CmdInfo(aliases = {"mem", "memory", "uptime", "entities"})
public class Lag extends BCommand {

    @Override
    public boolean onCommand(User user, String label, String[] args) {
        user.sendMessage("&6Uptime: &a" + formatTime(ManagementFactory.getRuntimeMXBean().getUptime()));
        user.sendMessage("&6Max RAM: &a" + formatSize(Runtime.getRuntime().maxMemory()));
        user.sendMessage("&6Total RAM: &a" + formatSize(Runtime.getRuntime().totalMemory()));
        user.sendMessage("&6Free RAM: &a" + formatSize(Runtime.getRuntime().freeMemory()));

        Collection<IWorld> worlds = Bssentials.getInstance().getWorlds();
        user.sendMessage("&6Worlds (" + worlds.size() + "):");
        for (IWorld w : worlds)