use of org.jsolf.JSONObject in project Emolga by TecToast.
the class Draft method getTeamMembers.
public static List<Long> getTeamMembers(String team) {
JSONObject asl = getEmolgaJSON().getJSONObject("drafts").getJSONObject("ASLS9");
int index = asl.getStringList("teams").indexOf(team);
LinkedList<Long> l = new LinkedList<>();
if (index == -1)
return l;
for (int i = 1; i <= 4; i++) {
l.add(asl.getJSONObject("S" + i).getLongList("table").get(index));
}
return l;
}
use of org.jsolf.JSONObject in project Emolga by TecToast.
the class BanManager method unban.
public JSONObject unban(Guild g, long userid) {
JSONObject o = new JSONObject();
logger.info("userid = " + userid);
logger.info("g.getIdLong() = " + g.getIdLong());
g.unban(String.valueOf(userid)).queue();
return delete(and(GUILDID.check(g.getIdLong()), USERID.check(userid))) > 0 ? o.put("success", "Entbannung erfolgreich!") : o.put("error", "Die Person war gar nicht gebannt!");
}
Aggregations