mysql creating invites

Discussion in 'Plugin Development' started by DaanSander, Mar 5, 2015.

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

    DaanSander

    Hello i am trying to make a guild plugin with mysql but one of my commands wont work
    command:
    Code:
    else if (args[0].equalsIgnoreCase("invite")) {
                    if (Guild.getGuild(p) == null) {
                        p.sendMessage("§4§lYou aren't in a guild create one or join a other guild");
                        return true;
                    }
                    if (args.length != 2) {
                        p.sendMessage("§4§lSpecify a player!");
                        return true;
                    }
                    Player t = Bukkit.getPlayerExact(args[1]);
                    if (Guild.getGuild(t) != null) {
                        p.sendMessage("§4§lThat player is already in a guild!");
                        return true;
                    }
                    Guild guild = Guild.getGuild(p);
                    GuildInvite invite = GuildInvite.getInvite(args[1], guild);
                    if (invite != null) {
                        p.sendMessage("§4§lThat player is already invited!");
                        return true;
                    }
                    invite = new GuildInvite(guild, p.getName(), t.getName());
                    t.sendMessage("test");
                    p.sendMessage("§a§lYou invited: " + t.getName() + " to your guild!");
                    return true;
                }
    i have 1 error that is by: GuildInvite invite = GuildInvite.getInvite(args[1], guild);
    the error is: GuildInvite invite = GuildInvite.getInvite(args[1], guild); is Wrong 2nd argument type found me.daansander.hmcessentials.guilds.enums.Guild required: me.daansander.hmcessentials.HMCEssentials

    can someone help me with it?
    sorry for bad english
     
  2. Offline

    Code0

    You're using the .getInvite() wrong. That's all I can tell from the above.
     
Thread Status:
Not open for further replies.

Share This Page