mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 19:46:42 +00:00
@ -96,7 +96,6 @@ public class Module_list extends HTTPDModule
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
responseObject.put("operators", operators);
|
||||
@ -146,7 +145,7 @@ public class Module_list extends HTTPDModule
|
||||
|
||||
public boolean isImposter(Player player)
|
||||
{
|
||||
if (plugin.sl.isAdminImpostor(player) || plugin.pl.isPlayerImpostor(player))
|
||||
if (plugin.sl.isStaffImpostor(player) || plugin.pl.isPlayerImpostor(player))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -25,11 +25,11 @@ public class Module_players extends HTTPDModule
|
||||
final JSONObject responseObject = new JSONObject();
|
||||
|
||||
final JSONArray players = new JSONArray();
|
||||
final JSONArray onlineadmins = new JSONArray();
|
||||
final JSONArray onlinestaff = new JSONArray();
|
||||
final JSONArray masterbuilders = new JSONArray();
|
||||
final JSONArray superadmins = new JSONArray();
|
||||
final JSONArray telnetadmins = new JSONArray();
|
||||
final JSONArray senioradmins = new JSONArray();
|
||||
final JSONArray trialmods = new JSONArray();
|
||||
final JSONArray mods = new JSONArray();
|
||||
final JSONArray admins = new JSONArray();
|
||||
final JSONArray developers = new JSONArray();
|
||||
final JSONArray executives = new JSONArray();
|
||||
|
||||
@ -39,14 +39,14 @@ public class Module_players extends HTTPDModule
|
||||
if (!plugin.sl.isVanished(player.getName()))
|
||||
{
|
||||
players.add(player.getName());
|
||||
if (plugin.sl.isStaff(player) && !plugin.sl.isAdminImpostor(player))
|
||||
if (plugin.sl.isStaff(player) && !plugin.sl.isStaffImpostor(player))
|
||||
{
|
||||
onlineadmins.add(player.getName());
|
||||
onlinestaff.add(player.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Admins
|
||||
// Staff
|
||||
for (StaffMember staffMember : plugin.sl.getActiveStaffMembers())
|
||||
{
|
||||
final String username = staffMember.getName();
|
||||
@ -54,13 +54,13 @@ public class Module_players extends HTTPDModule
|
||||
switch (staffMember.getRank())
|
||||
{
|
||||
case TRIAL_MOD:
|
||||
superadmins.add(username);
|
||||
trialmods.add(username);
|
||||
break;
|
||||
case MOD:
|
||||
telnetadmins.add(username);
|
||||
mods.add(username);
|
||||
break;
|
||||
case ADMIN:
|
||||
senioradmins.add(username);
|
||||
admins.add(username);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -75,11 +75,11 @@ public class Module_players extends HTTPDModule
|
||||
|
||||
responseObject.put("players", players);
|
||||
responseObject.put("masterbuilders", masterbuilders);
|
||||
responseObject.put("superadmins", superadmins);
|
||||
responseObject.put("telnetadmins", telnetadmins);
|
||||
responseObject.put("senioradmins", senioradmins);
|
||||
responseObject.put("trialmods", trialmods);
|
||||
responseObject.put("mods", mods);
|
||||
responseObject.put("admins", admins);
|
||||
responseObject.put("developers", developers);
|
||||
responseObject.put("executives", developers);
|
||||
responseObject.put("executives", executives);
|
||||
|
||||
final NanoHTTPD.Response response = new NanoHTTPD.Response(NanoHTTPD.Response.Status.OK, NanoHTTPD.MIME_JSON, responseObject.toString());
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
|
Reference in New Issue
Block a user