Doesnt work

Discussion in 'Plugin Development' started by StatywPlay, Oct 29, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    StatywPlay

    How to fix these:
    Code:
                    if (plugin.getInfo().inevent.get(player.getName()).equals(player.getName())) {
                            plugin.send(player, "not-in-event"); <------------- here
                         } else {
                            if (plugin.getInfo().eventstarted) {
                                if (!plugin.eventName.equalsIgnoreCase("koth")) {
                                    plugin.getMethods().basicLeave(player);
                                } else {
                                    plugin.getDo().removePlayerFromEvent(player, true, true);
                                }
                            } else {
                                if (plugin.getInfo().sbefore.contains(player.getName())) {
                                    if (!plugin.eventName.equalsIgnoreCase("koth")) {
                                        plugin.getMethods().basicLeave(player);
                                    } else {
                                        plugin.getDo().removePlayerFromEvent(player, true, true);
                                    }
                                } else {
                                    plugin.getMethods().basicLose(player);
                                    plugin.getDo().removePlayerFromEvent(player, false, false);
                                }
                            }
                            plugin.send(player, "left-event");
                            return true;
                        }
     
  2. Offline

    OffLuffy

    I think you may want to add additional details, and maybe make the title more revealing as to the sort of issues you're having here. Why doesn't it work? Do you get console errors? Compile errors? What isn't functioning like you intend? What are you event trying to do?
     
  3. Offline

    mine-care

    Okay as OffLuffy said, please provide any errors, strange behaviours and the full code. in your already posted code we see a plugin-named variable of unknown type (is it plugin object?) and a lot of ifs, where is the rest :3
    Please post it
    thanks.
     
Thread Status:
Not open for further replies.

Share This Page