コード例 #1
0
 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);
   }
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 private void removeMember(String guildId, String memberId) {
   GuildMembers.db().deleteWhere("guild_members_player_id = ?", memberId);
 }