@Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length < 4) {
            return false;
        }

        String worldName;
        String zoneName = args[0];
        String typeString = args[1].toUpperCase();
        String matString = args[2].toUpperCase();
        String replaceString = args[3].toLowerCase();

        if (args.length > 4) {
            worldName = args[4];
        } else if (sender instanceof Player) {
            worldName = ((Player) sender).getWorld().getName();
        } else {
            sender.sendMessage(ChatColor.RED + "A world name is required from the console");
            return false;
        }

        BoundingBoxPreviewType type;
        Material mat;
        boolean replace;

        try {
            type = BoundingBoxPreviewType.valueOf(typeString);
            mat = Material.valueOf(matString);
            replace = Boolean.parseBoolean(replaceString);
        } catch (IllegalArgumentException iae) {
            return false;
        }

        WorldZone zone = AntiMobSpawn.instance().getDatabase().find(WorldZone.class).where().ieq("worldName", worldName).ieq("zoneName", zoneName).findUnique();
        World world = sender.getServer().getWorld(worldName);

        if (zone == null) {
            sender.sendMessage(ChatColor.RED + "A zone with this name does not exist on this world");
            return true;
        }

        WorldZone.getBoundingBox(zone).previewBoundingBox(type, world, mat, replace);

        return true;
    }