private void addMember(String guildId, String memberId) { GuildMembers member = GuildMembers.db().findFirst("guild_members_player_id = ?", memberId); if (member == null) { member = new GuildMembers(); member.guildId = guildId; member.playerId = memberId; GuildMembers.db().save(member); } }
public static List<String> memberList(String id) { List<String> members = new ArrayList<String>(); for (GuildMembers member : GuildMembers.db().where("guild_members_guild_id = ?", id)) { members.add(member.playerId); } return members; }
private void destroy(Guild guild) { // TerritoryHandler.removeOwner(guild.id); Guild.db().deleteWhere("guild_id = ?", guild.id); guilds.remove(guild.id); GuildMembers.db().deleteWhere("guild_members_guild_id = ?", guild.id); }
private void removeMember(String guildId, String memberId) { GuildMembers.db().deleteWhere("guild_members_player_id = ?", memberId); }