Remove TeamInvite table.

This commit is contained in:
Jonathan Williams 2016-04-14 18:49:20 -05:00
parent 3a26225ce2
commit 64d5f91e8f
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import java.util.UUID;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scoreboard.Team;
import mineplex.core.MiniDbClientPlugin; import mineplex.core.MiniDbClientPlugin;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
@ -39,7 +40,7 @@ public class TournamentManager extends MiniDbClientPlugin<ClientTournamentData>
@Override @Override
public String getQuery(int accountId, String uuid, String name) public String getQuery(int accountId, String uuid, String name)
{ {
return "SELECT TT.id, TT.tournamentId, accounts.id, accounts.uuid, accounts.name, TTI.status FROM tournamentTeams AS TT INNER JOIN accounts ON accounts.id = TT.accountId LEFT JOIN tournamentTeamInvites AS TTI ON TTI.teamId = TT.id WHERE TT.accountId = " + accountId + ";"; return "SELECT TT.id, TT.tournamentId, accounts.id, accounts.uuid, accounts.name, TT.status FROM tournamentTeams AS TT INNER JOIN accounts ON accounts.id = TT.accountId WHERE TT.accountId = " + accountId + ";";
} }
@Override @Override
@ -114,6 +115,7 @@ public class TournamentManager extends MiniDbClientPlugin<ClientTournamentData>
if (success) if (success)
{ {
player.sendMessage(F.main(getName(), "You have successfully registered for " + tournament.Name + " tournament!")); player.sendMessage(F.main(getName(), "You have successfully registered for " + tournament.Name + " tournament!"));
TournamentTeam team = new TournamentTeam();
} }
else else
{ {

View File

@ -4,5 +4,6 @@ public enum TournamentInviteStatus
{ {
INVITED, INVITED,
ACCEPTED, ACCEPTED,
DENIED DENIED,
OWNER
} }