How can I limit the amount of list sets I can set

Discussion in 'BungeeCord Plugin Development' started by WolfClash, Jul 12, 2013.

  1. Well I made a random plugin and got hooked on it for a while.

    I have everything except a small (but major) part of the plugin.

    Code (Text):

    if (cmd.getName().equalsIgnoreCase("setlist")) {
                            if (args.length == 0) {
                                    p.sendMessage(ChatColor.RED + "Please specify a name!");
                                    return true;
                            settings.getData().set("warps." + args[0] + ".world", p.getLocation().getWorld().getName());
                            settings.getData().set("warps." + args[0] + ".x", p.getLocation().getX());
                            settings.getData().set("warps." + args[0] + ".y", p.getLocation().getY());
                            settings.getData().set("warps." + args[0] + ".z", p.getLocation().getZ());
                            getConfig().set("warps", argsList);
                            p.sendMessage(ChatColor.GREEN + "Set warp " + args[0] + "!");
                            return true;
    What I'm trying to do is set a list/home. Now how can I limit the amount homes I can set with this code?