mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Allow telnets to verify master builders, and mb httpd addition.
This commit is contained in:
parent
69e82b5746
commit
baf367b003
@ -85,11 +85,7 @@ public class Command_mbconfig extends FreedomCommand
|
||||
}
|
||||
|
||||
checkConsole();
|
||||
checkRank(Rank.SENIOR_ADMIN);
|
||||
if (!FUtil.isExecutive(sender.getName()))
|
||||
{
|
||||
noPerms();
|
||||
}
|
||||
checkRank(Rank.TELNET_ADMIN);
|
||||
|
||||
// Player already on the list?
|
||||
final Player player = getPlayer(args[1]);
|
||||
@ -113,6 +109,12 @@ public class Command_mbconfig extends FreedomCommand
|
||||
|
||||
if (masterBuilder == null) // New entry
|
||||
{
|
||||
checkRank(Rank.SENIOR_ADMIN);
|
||||
if (!FUtil.isExecutive(sender.getName()))
|
||||
{
|
||||
noPerms();
|
||||
}
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
msg(FreedomCommand.PLAYER_NOT_FOUND);
|
||||
|
@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod.httpd.module;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
|
||||
import me.totalfreedom.totalfreedommod.masterbuilder.MasterBuilder;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -24,6 +25,7 @@ public class Module_players extends HTTPDModule
|
||||
final JSONObject responseObject = new JSONObject();
|
||||
|
||||
final JSONArray players = new JSONArray();
|
||||
final JSONArray masterbuilders = new JSONArray();
|
||||
final JSONArray superadmins = new JSONArray();
|
||||
final JSONArray telnetadmins = new JSONArray();
|
||||
final JSONArray senioradmins = new JSONArray();
|
||||
@ -54,10 +56,17 @@ public class Module_players extends HTTPDModule
|
||||
}
|
||||
}
|
||||
|
||||
// Master Builders
|
||||
for (MasterBuilder masterBuilder : plugin.mbl.getAllMasterBuilders().values())
|
||||
{
|
||||
masterbuilders.add(masterBuilder.getName());
|
||||
}
|
||||
|
||||
// Developers
|
||||
developers.addAll(FUtil.DEVELOPERS);
|
||||
|
||||
responseObject.put("players", players);
|
||||
responseObject.put("masterbuilders", masterbuilders);
|
||||
responseObject.put("superadmins", superadmins);
|
||||
responseObject.put("telnetadmins", telnetadmins);
|
||||
responseObject.put("senioradmins", senioradmins);
|
||||
|
Loading…
Reference in New Issue
Block a user