Merge pull request #268 from speedxx/development

stuff seth missed
This commit is contained in:
Telesphoreo 2020-08-15 19:24:47 -05:00 committed by GitHub
commit 7b9920dbc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 141 additions and 157 deletions

View File

@ -87,10 +87,10 @@ public class ChatManager extends FreedomService
return; return;
} }
// Check for adminchat // Check for staffchat
if (fPlayer.inAdminChat()) if (fPlayer.inStaffChat())
{ {
FSync.adminChatMessage(player, message); FSync.staffChatMessage(player, message);
event.setCancelled(true); event.setCancelled(true);
return; return;
} }

View File

@ -53,7 +53,7 @@ public class LoginProcess extends FreedomService
public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event) public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event)
{ {
final String ip = event.getAddress().getHostAddress().trim(); final String ip = event.getAddress().getHostAddress().trim();
final boolean isAdmin = plugin.sl.getEntryByIp(ip) != null; final boolean isStaff = plugin.sl.getEntryByIp(ip) != null;
// Check if the player is already online // Check if the player is already online
for (Player onlinePlayer : server.getOnlinePlayers()) for (Player onlinePlayer : server.getOnlinePlayers())
@ -63,10 +63,10 @@ public class LoginProcess extends FreedomService
continue; continue;
} }
if (isAdmin) if (isStaff)
{ {
event.allow(); event.allow();
FSync.playerKick(onlinePlayer, "An admin just logged in with the username you are using."); FSync.playerKick(onlinePlayer, "A staff member just logged in with the username you are using.");
return; return;
} }
@ -113,11 +113,11 @@ public class LoginProcess extends FreedomService
} }
} }
// Check if player is admin // Check if player is staff
final boolean isAdmin = plugin.sl.getEntryByIp(ip) != null; final boolean isStaff = plugin.sl.getEntryByIp(ip) != null;
// Validation below this point // Validation below this point
if (isAdmin) // Player is admin if (isStaff) // Player is staff
{ {
// Force-allow log in // Force-allow log in
event.allow(); event.allow();
@ -129,7 +129,7 @@ public class LoginProcess extends FreedomService
{ {
if (!plugin.sl.isStaff(onlinePlayer)) if (!plugin.sl.isStaff(onlinePlayer))
{ {
onlinePlayer.kickPlayer("You have been kicked to free up room for an admin."); onlinePlayer.kickPlayer("You have been kicked to free up room for a staff member.");
count--; count--;
} }
@ -160,7 +160,7 @@ public class LoginProcess extends FreedomService
// Staff-only mode // Staff-only mode
if (ConfigEntry.STAFF_ONLY_MODE.getBoolean()) if (ConfigEntry.STAFF_ONLY_MODE.getBoolean())
{ {
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server is temporarily open to admins only."); event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server is temporarily open to staff only.");
return; return;
} }
@ -244,7 +244,7 @@ public class LoginProcess extends FreedomService
FLog.info(noteMessage); FLog.info(noteMessage);
for (Player p : server.getOnlinePlayers()) for (Player p : server.getOnlinePlayers())
{ {
if (plugin.sl.isAdminImpostor(p)) if (plugin.sl.isStaffImpostor(p))
{ {
notice.send(p); notice.send(p);
} }

View File

@ -44,7 +44,7 @@ public class Reddit extends FreedomService
private Map<Displayable, String> flairNameList = new HashMap<>(); private Map<Displayable, String> flairNameList = new HashMap<>();
private List<Displayable> noFlairDisplays = Arrays.asList(Title.VERIFIED_ADMIN, Rank.IMPOSTOR, Rank.NON_OP, Rank.OP); private List<Displayable> noFlairDisplays = Arrays.asList(Title.VERIFIED_STAFF, Rank.IMPOSTOR, Rank.NON_OP, Rank.OP);
public boolean enabled = false; public boolean enabled = false;

View File

@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) @CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Shows all banned player names. Senior Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]") @CommandParameters(description = "Shows all banned player names. Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
public class Command_banlist extends FreedomCommand public class Command_banlist extends FreedomCommand
{ {
@ -23,18 +23,14 @@ public class Command_banlist extends FreedomCommand
FUtil.staffAction(sender.getName(), "Purging the ban list", true); FUtil.staffAction(sender.getName(), "Purging the ban list", true);
int amount = plugin.bm.purge(); int amount = plugin.bm.purge();
msg("Purged " + amount + " player bans."); msg("Purged " + amount + " player bans.");
return true; return true;
} }
return false; return false;
} }
msg(plugin.bm.getAllBans().size() + " player bans (" msg(plugin.bm.getAllBans().size() + " player bans ("
+ plugin.bm.getUsernameBans().size() + " usernames, " + plugin.bm.getUsernameBans().size() + " usernames, "
+ plugin.bm.getIpBans().size() + " IPs)"); + plugin.bm.getIpBans().size() + " IPs)");
return true; return true;
} }
} }

View File

@ -114,7 +114,7 @@ public class Command_blockedit extends FreedomCommand
{ {
if (plugin.sl.isStaff(player2)) if (plugin.sl.isStaff(player2))
{ {
msg(player2.getName() + " is an admin, and cannot have their block edits blocked."); msg(player2.getName() + " is a staff member, and cannot have their block edits blocked.");
return true; return true;
} }

View File

@ -115,7 +115,7 @@ public class Command_blockpvp extends FreedomCommand
{ {
if (plugin.sl.isStaff(p)) if (plugin.sl.isStaff(p))
{ {
msg(p.getName() + " is an admin, and cannot have their PVP disabled."); msg(p.getName() + " is a staff member, and cannot have their PVP disabled.");
return true; return true;
} }

View File

@ -32,7 +32,7 @@ public class Command_cake extends FreedomCommand
heldItemMeta.setDisplayName(ChatColor.WHITE + "The " + ChatColor.DARK_GRAY + "Lie"); heldItemMeta.setDisplayName(ChatColor.WHITE + "The " + ChatColor.DARK_GRAY + "Lie");
heldItem.setItemMeta(heldItemMeta); heldItem.setItemMeta(heldItemMeta);
for (final Player player : this.server.getOnlinePlayers()) for (Player player : server.getOnlinePlayers())
{ {
final int firstEmpty = player.getInventory().firstEmpty(); final int firstEmpty = player.getInventory().firstEmpty();
if (firstEmpty >= 0) if (firstEmpty >= 0)

View File

@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.BOTH) @CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.BOTH)
@CommandParameters(description = "Freeze/Unfreeze a specified player, or all non-admins on the server.", usage = "/<command> [target | purge]", aliases = "fr") @CommandParameters(description = "Freeze/Unfreeze a specified player, or all non-staff on the server.", usage = "/<command> [target | purge]", aliases = "fr")
public class Command_freeze extends FreedomCommand public class Command_freeze extends FreedomCommand
{ {
@ -38,7 +38,6 @@ public class Command_freeze extends FreedomCommand
} }
} }
msg("Players are now frozen."); msg("Players are now frozen.");
return true; return true;
} }
@ -69,7 +68,6 @@ public class Command_freeze extends FreedomCommand
msg(player.getName() + " has been " + (fd.isFrozen() ? "frozen" : "unfrozen") + "."); msg(player.getName() + " has been " + (fd.isFrozen() ? "frozen" : "unfrozen") + ".");
msg(player, "You have been " + (fd.isFrozen() ? "frozen" : "unfrozen") + ".", ChatColor.AQUA); msg(player, "You have been " + (fd.isFrozen() ? "frozen" : "unfrozen") + ".", ChatColor.AQUA);
return true; return true;
} }
} }

View File

@ -12,10 +12,10 @@ import org.bukkit.inventory.ItemStack;
@CommandParameters(description = "Look into another player's inventory, or optionally take items out.", usage = "/<command> <player> [offhand | armor]", aliases = "inv,insee") @CommandParameters(description = "Look into another player's inventory, or optionally take items out.", usage = "/<command> <player> [offhand | armor]", aliases = "inv,insee")
public class Command_invsee extends FreedomCommand public class Command_invsee extends FreedomCommand
{ {
@Override @Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{ {
if (args.length < 1) if (args.length < 1)
{ {
return false; return false;
@ -37,9 +37,8 @@ public class Command_invsee extends FreedomCommand
if (plugin.sl.isStaff(player) && !plugin.sl.isStaff(playerSender)) if (plugin.sl.isStaff(player) && !plugin.sl.isStaff(playerSender))
{ {
msg("You cannot spy on administrators."); msg("You cannot spy on staff members.");
return true; return true;
} }
Inventory inv; Inventory inv;
@ -110,4 +109,3 @@ public class Command_invsee extends FreedomCommand
return true; return true;
} }
} }

View File

@ -116,7 +116,7 @@ public class Command_list extends FreedomCommand
{ {
continue; continue;
} }
if (listFilter == ListFilter.IMPOSTORS && !plugin.sl.isAdminImpostor(p)) if (listFilter == ListFilter.IMPOSTORS && !plugin.sl.isStaffImpostor(p))
{ {
continue; continue;
} }
@ -154,7 +154,6 @@ public class Command_list extends FreedomCommand
return true; return true;
} }
private enum ListFilter private enum ListFilter
{ {
PLAYERS, PLAYERS,

View File

@ -73,7 +73,7 @@ public class Command_mute extends FreedomCommand
if (args[0].equals("all")) if (args[0].equals("all"))
{ {
FUtil.staffAction(sender.getName(), "Muting all non-admins", true); FUtil.staffAction(sender.getName(), "Muting all non-staff", true);
FPlayer playerdata; FPlayer playerdata;
int counter = 0; int counter = 0;
@ -122,7 +122,7 @@ public class Command_mute extends FreedomCommand
FPlayer playerdata = plugin.pl.getPlayer(player); FPlayer playerdata = plugin.pl.getPlayer(player);
if (plugin.sl.isStaff(player)) if (plugin.sl.isStaff(player))
{ {
msg(player.getName() + " is an admin, and can't be muted."); msg(player.getName() + " is a staff member, and can't be muted.");
return true; return true;
} }

View File

@ -16,7 +16,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.ONLY_IN_GAME) @CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Manage your staff entry.", usage = "/<command> [-o <staff member>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setacformat <format> | clearacformat> | oldtags | logstick | syncroles>") @CommandParameters(description = "Manage your staff entry.", usage = "/<command> [-o <staff member>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setscformat <format> | clearscformat> | oldtags | logstick | syncroles>")
public class Command_mystaff extends FreedomCommand public class Command_mystaff extends FreedomCommand
{ {
@ -190,6 +190,7 @@ public class Command_mystaff extends FreedomCommand
msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example)); msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example));
return true; return true;
} }
case "clearscformat": case "clearscformat":
{ {
target.setAcFormat(null); target.setAcFormat(null);
@ -247,8 +248,8 @@ public class Command_mystaff extends FreedomCommand
return Collections.emptyList(); return Collections.emptyList();
} }
List<String> singleArguments = Arrays.asList("clearips", "setlogin", "setacformat"); List<String> singleArguments = Arrays.asList("clearips", "setlogin", "setscformat");
List<String> doubleArguments = Arrays.asList("clearip", "clearlogin", "clearacformat", "oldtags", "syncroles"); List<String> doubleArguments = Arrays.asList("clearip", "clearlogin", "clearscformat", "oldtags", "syncroles");
if (args.length == 1) if (args.length == 1)
{ {
List<String> options = new ArrayList<>(); List<String> options = new ArrayList<>();
@ -270,7 +271,7 @@ public class Command_mystaff extends FreedomCommand
if (args[0].equals("clearip")) if (args[0].equals("clearip"))
{ {
List<String> ips = plugin.sl.getAdmin(sender).getIps(); List<String> ips = plugin.sl.getAdmin(sender).getIps();
ips.remove(FUtil.getIp((Player) sender)); ips.remove(FUtil.getIp((Player)sender));
return ips; return ips;
} }
} }

View File

@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME, blockHostConsole = true) @CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME, blockHostConsole = true)
@CommandParameters(description = "Report a player for all admins to see.", usage = "/<command> <player> <reason>") @CommandParameters(description = "Report a player for all staff to see.", usage = "/<command> <player> <reason>")
public class Command_report extends FreedomCommand public class Command_report extends FreedomCommand
{ {

View File

@ -92,10 +92,10 @@ public class Command_ro extends FreedomCommand
names = StringUtils.join(materials, ", "); names = StringUtils.join(materials, ", ");
} }
World adminWorld = null; World staffWorld = null;
try try
{ {
adminWorld = plugin.wm.staffworld.getWorld(); staffWorld = plugin.wm.staffworld.getWorld();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -108,7 +108,7 @@ public class Command_ro extends FreedomCommand
for (final Player player : server.getOnlinePlayers()) for (final Player player : server.getOnlinePlayers())
{ {
if (player.getWorld() == adminWorld) if (player.getWorld() == staffWorld)
{ {
continue; continue;
} }
@ -121,7 +121,7 @@ public class Command_ro extends FreedomCommand
} }
else else
{ {
if (targetPlayer.getWorld() != adminWorld) if (targetPlayer.getWorld() != staffWorld)
{ {
FUtil.staffAction(sender.getName(), "Removing all " + names + " within " + radius + " blocks of " + targetPlayer.getName(), false); FUtil.staffAction(sender.getName(), "Removing all " + names + " within " + radius + " blocks of " + targetPlayer.getName(), false);
for (Material material : materials) for (Material material : materials)
@ -132,7 +132,6 @@ public class Command_ro extends FreedomCommand
} }
FUtil.staffAction(sender.getName(), "Remove complete! " + affected + " blocks removed.", false); FUtil.staffAction(sender.getName(), "Remove complete! " + affected + " blocks removed.", false);
return true; return true;
} }
@ -176,7 +175,6 @@ public class Command_ro extends FreedomCommand
} }
} }
} }
return affected; return affected;
} }
} }

View File

@ -17,7 +17,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) @CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "List, add, remove, or set the rank of staff, clean or reload the admin list, or view the info of staff.", usage = "/<command> <list | clean | reload | | setrank <username> <rank> | <add | remove | info> <username>>") @CommandParameters(description = "List, add, remove, or set the rank of staff, clean or reload the staff list, or view the info of staff.", usage = "/<command> <list | clean | reload | | setrank <username> <rank> | <add | remove | info> <username>>")
public class Command_slconfig extends FreedomCommand public class Command_slconfig extends FreedomCommand
{ {
@ -159,7 +159,7 @@ public class Command_slconfig extends FreedomCommand
checkConsole(); checkConsole();
checkRank(Rank.MOD); checkRank(Rank.MOD);
// Player already an admin? // Player already staff?
final Player player = getPlayer(args[1]); final Player player = getPlayer(args[1]);
if (player == null) if (player == null)
@ -174,7 +174,7 @@ public class Command_slconfig extends FreedomCommand
return true; return true;
} }
// Find the old admin entry // Find the old staff entry
String name = player != null ? player.getName() : args[1]; String name = player != null ? player.getName() : args[1];
StaffMember staffMember = null; StaffMember staffMember = null;
for (StaffMember loopStaffMember : plugin.sl.getAllStaffMembers()) for (StaffMember loopStaffMember : plugin.sl.getAllStaffMembers())
@ -225,7 +225,7 @@ public class Command_slconfig extends FreedomCommand
staffMember.setActive(true); staffMember.setActive(true);
staffMember.setLastLogin(new Date()); staffMember.setLastLogin(new Date());
if (plugin.sl.isVerifiedAdmin(player)) if (plugin.sl.isVerifiedStaff(player))
{ {
plugin.sl.verifiedNoStaff.remove(player.getName()); plugin.sl.verifiedNoStaff.remove(player.getName());
plugin.sl.verifiedNoStaffIps.remove(player.getName()); plugin.sl.verifiedNoStaffIps.remove(player.getName());
@ -285,9 +285,9 @@ public class Command_slconfig extends FreedomCommand
FUtil.staffAction(sender.getName(), "Removing " + staffMember.getName() + " from the staff list", true); FUtil.staffAction(sender.getName(), "Removing " + staffMember.getName() + " from the staff list", true);
staffMember.setActive(false); staffMember.setActive(false);
if (plugin.pl.getPlayer(player).inAdminChat()) if (plugin.pl.getPlayer(player).inStaffChat())
{ {
plugin.pl.getPlayer(player).setAdminChat(false); plugin.pl.getPlayer(player).setStaffChat(false);
} }
plugin.sl.save(staffMember); plugin.sl.save(staffMember);

View File

@ -19,19 +19,18 @@ public class Command_staffchat extends FreedomCommand
{ {
if (senderIsConsole) if (senderIsConsole)
{ {
msg("You must be in-game to toggle admin chat, it cannot be toggled via CONSOLE or Telnet."); msg("You must be in-game to toggle staff chat, it cannot be toggled via CONSOLE or Telnet.");
return true; return true;
} }
FPlayer userinfo = plugin.pl.getPlayer(playerSender); FPlayer userinfo = plugin.pl.getPlayer(playerSender);
userinfo.setAdminChat(!userinfo.inAdminChat()); userinfo.setStaffChat(!userinfo.inStaffChat());
msg("Toggled your staff chat " + (userinfo.inAdminChat() ? "on" : "off") + "."); msg("Toggled your staff chat " + (userinfo.inStaffChat() ? "on" : "off") + ".");
} }
else else
{ {
plugin.cm.staffChat(sender, StringUtils.join(args, " ")); plugin.cm.staffChat(sender, StringUtils.join(args, " "));
} }
return true; return true;
} }
} }

View File

@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) @CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "si") @CommandParameters(description = "Information on how to apply for staff.", usage = "/<command>", aliases = "si")
public class Command_staffinfo extends FreedomCommand public class Command_staffinfo extends FreedomCommand
{ {
@ -28,7 +28,6 @@ public class Command_staffinfo extends FreedomCommand
{ {
msg(FUtil.colorize(StringUtils.join(staffInfo, "\n"))); msg(FUtil.colorize(StringUtils.join(staffInfo, "\n")));
} }
return true; return true;
} }
} }

View File

@ -12,9 +12,9 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) @CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Allows for staff to configure time, and weather of the AdminWorld, and allows for staff and ops to go to the AdminWorld.", @CommandParameters(description = "Allows for staff to configure time, and weather of the StaffWorld, and allows for staff and ops to go to the StaffWorld.",
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]", usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
aliases = "aw") aliases = "sw")
public class Command_staffworld extends FreedomCommand public class Command_staffworld extends FreedomCommand
{ {
@ -60,16 +60,16 @@ public class Command_staffworld extends FreedomCommand
return false; return false;
} }
World adminWorld = null; World staffWorld = null;
try try
{ {
adminWorld = plugin.wm.staffworld.getWorld(); staffWorld = plugin.wm.staffworld.getWorld();
} }
catch (Exception ex) catch (Exception ex)
{ {
} }
if (adminWorld == null || playerSender.getWorld() == adminWorld) if (staffWorld == null || playerSender.getWorld() == staffWorld)
{ {
msg("Going to the main world."); msg("Going to the main world.");
playerSender.teleport(server.getWorlds().get(0).getSpawnLocation()); playerSender.teleport(server.getWorlds().get(0).getSpawnLocation());
@ -79,7 +79,6 @@ public class Command_staffworld extends FreedomCommand
msg("Going to the StaffWorld."); msg("Going to the StaffWorld.");
plugin.wm.staffworld.sendToWorld(playerSender); plugin.wm.staffworld.sendToWorld(playerSender);
} }
break; break;
} }
case TIME: case TIME:

View File

@ -10,13 +10,13 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.IMPOSTOR, source = SourceType.BOTH) @CommandPermissions(level = Rank.IMPOSTOR, source = SourceType.BOTH)
@CommandParameters(description = "Sends a verification code to the player, or the player can input the sent code. Admins can manually verify a player impostor.", usage = "/<command> <code | <playername>>") @CommandParameters(description = "Sends a verification code to the player, or the player can input the sent code. Staff can manually verify a player impostor.", usage = "/<command> <code | <playername>>")
public class Command_verify extends FreedomCommand public class Command_verify extends FreedomCommand
{ {
@Override @Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{ {
if (!plugin.dc.enabled) if (!plugin.dc.enabled)
{ {
msg("The Discord verification system is currently disabled", ChatColor.RED); msg("The Discord verification system is currently disabled", ChatColor.RED);

View File

@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.MOD, source = SourceType.BOTH) @CommandPermissions(level = Rank.MOD, source = SourceType.BOTH)
@CommandParameters(description = "Verify an admin without giving them staff permissions.", usage = "/<command> <player>", aliases = "vna") @CommandParameters(description = "Verify a staff member without giving them staff permissions.", usage = "/<command> <player>", aliases = "vns")
public class Command_verifynostaff extends FreedomCommand public class Command_verifynostaff extends FreedomCommand
{ {
@ -32,7 +32,7 @@ public class Command_verifynostaff extends FreedomCommand
return true; return true;
} }
if (plugin.sl.isAdminImpostor(player)) if (plugin.sl.isStaffImpostor(player))
{ {
if (!plugin.sl.verifiedNoStaff.contains(player.getName())) if (!plugin.sl.verifiedNoStaff.contains(player.getName()))
{ {
@ -70,7 +70,7 @@ public class Command_verifynostaff extends FreedomCommand
} }
else else
{ {
msg(player.getName() + " is not an admin imposter.", ChatColor.RED); msg(player.getName() + " is not a staff imposter.", ChatColor.RED);
} }
return true; return true;
@ -84,7 +84,7 @@ public class Command_verifynostaff extends FreedomCommand
List<String> adminImposters = new ArrayList<>(); List<String> adminImposters = new ArrayList<>();
for (Player player : server.getOnlinePlayers()) for (Player player : server.getOnlinePlayers())
{ {
if (plugin.sl.isAdminImpostor(player)) if (plugin.sl.isStaffImpostor(player))
{ {
adminImposters.add(player.getName()); adminImposters.add(player.getName());
} }

View File

@ -62,7 +62,7 @@ public class Command_warn extends FreedomCommand
} }
msg(player, ChatColor.RED + "[WARNING] You received a warning from " + sender.getName() + ": " + warnReason); msg(player, ChatColor.RED + "[WARNING] You received a warning from " + sender.getName() + ": " + warnReason);
String adminNotice = ChatColor.RED + String staffNotice = ChatColor.RED +
sender.getName() + sender.getName() +
" - " + " - " +
"Warning: " + "Warning: " +
@ -70,7 +70,7 @@ public class Command_warn extends FreedomCommand
" - Reason: " + " - Reason: " +
ChatColor.YELLOW + ChatColor.YELLOW +
warnReason; warnReason;
plugin.sl.messageAllAdmins(adminNotice); plugin.sl.messageAllStaff(staffNotice);
plugin.pl.getPlayer(player).incrementWarnings(); plugin.pl.getPlayer(player).incrementWarnings();
return true; return true;
} }

View File

@ -65,17 +65,17 @@ public class DiscordToMinecraftListener extends ListenerAdapter
{ {
return Title.ASSISTANT_EXECUTIVE.getColoredTag(); return Title.ASSISTANT_EXECUTIVE.getColoredTag();
} }
// Senior Admins // Admins
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_ADMIN_ROLE_ID.getString()))) else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_ADMIN_ROLE_ID.getString())))
{ {
return Rank.ADMIN.getColoredTag(); return Rank.ADMIN.getColoredTag();
} }
// Telnet Admins // Mods
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_MOD_ROLE_ID.getString()))) else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_MOD_ROLE_ID.getString())))
{ {
return Rank.MOD.getColoredTag(); return Rank.MOD.getColoredTag();
} }
// Super Admins // Trial Mods
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_TRIAL_MOD_ROLE_ID.getString()))) else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_TRIAL_MOD_ROLE_ID.getString())))
{ {
return Rank.TRIAL_MOD.getColoredTag(); return Rank.TRIAL_MOD.getColoredTag();
@ -91,5 +91,4 @@ public class DiscordToMinecraftListener extends ListenerAdapter
return null; return null;
} }
} }
} }

View File

@ -62,7 +62,7 @@ public class FreezeData
@Override @Override
public void run() public void run()
{ {
if (!plugin().sl.isAdminImpostor(player) && plugin().pl.isPlayerImpostor(player)) if (!plugin().sl.isStaffImpostor(player) && plugin().pl.isPlayerImpostor(player))
{ {
FUtil.staffAction("TotalFreedom", "Unfreezing " + player.getName(), false); FUtil.staffAction("TotalFreedom", "Unfreezing " + player.getName(), false);
setFrozen(false); setFrozen(false);
@ -71,5 +71,4 @@ public class FreezeData
}.runTaskLater(plugin(), AUTO_PURGE_TICKS); }.runTaskLater(plugin(), AUTO_PURGE_TICKS);
} }
} }

View File

@ -96,7 +96,6 @@ public class Module_list extends HTTPDModule
break; break;
} }
} }
} }
responseObject.put("operators", operators); responseObject.put("operators", operators);
@ -146,7 +145,7 @@ public class Module_list extends HTTPDModule
public boolean isImposter(Player player) 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; return true;
} }

View File

@ -25,11 +25,11 @@ public class Module_players extends HTTPDModule
final JSONObject responseObject = new JSONObject(); final JSONObject responseObject = new JSONObject();
final JSONArray players = new JSONArray(); final JSONArray players = new JSONArray();
final JSONArray onlineadmins = new JSONArray(); final JSONArray onlinestaff = new JSONArray();
final JSONArray masterbuilders = new JSONArray(); final JSONArray masterbuilders = new JSONArray();
final JSONArray superadmins = new JSONArray(); final JSONArray trialmods = new JSONArray();
final JSONArray telnetadmins = new JSONArray(); final JSONArray mods = new JSONArray();
final JSONArray senioradmins = new JSONArray(); final JSONArray admins = new JSONArray();
final JSONArray developers = new JSONArray(); final JSONArray developers = new JSONArray();
final JSONArray executives = new JSONArray(); final JSONArray executives = new JSONArray();
@ -39,14 +39,14 @@ public class Module_players extends HTTPDModule
if (!plugin.sl.isVanished(player.getName())) if (!plugin.sl.isVanished(player.getName()))
{ {
players.add(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()) for (StaffMember staffMember : plugin.sl.getActiveStaffMembers())
{ {
final String username = staffMember.getName(); final String username = staffMember.getName();
@ -54,13 +54,13 @@ public class Module_players extends HTTPDModule
switch (staffMember.getRank()) switch (staffMember.getRank())
{ {
case TRIAL_MOD: case TRIAL_MOD:
superadmins.add(username); trialmods.add(username);
break; break;
case MOD: case MOD:
telnetadmins.add(username); mods.add(username);
break; break;
case ADMIN: case ADMIN:
senioradmins.add(username); admins.add(username);
break; break;
} }
} }
@ -75,11 +75,11 @@ public class Module_players extends HTTPDModule
responseObject.put("players", players); responseObject.put("players", players);
responseObject.put("masterbuilders", masterbuilders); responseObject.put("masterbuilders", masterbuilders);
responseObject.put("superadmins", superadmins); responseObject.put("trialmods", trialmods);
responseObject.put("telnetadmins", telnetadmins); responseObject.put("mods", mods);
responseObject.put("senioradmins", senioradmins); responseObject.put("admins", admins);
responseObject.put("developers", developers); 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()); final NanoHTTPD.Response response = new NanoHTTPD.Response(NanoHTTPD.Response.Status.OK, NanoHTTPD.MIME_JSON, responseObject.toString());
response.addHeader("Access-Control-Allow-Origin", "*"); response.addHeader("Access-Control-Allow-Origin", "*");

View File

@ -57,7 +57,7 @@ public class FPlayer
private BukkitTask lockupScheduleTask = null; private BukkitTask lockupScheduleTask = null;
private boolean lockedUp = false; private boolean lockedUp = false;
private String lastMessage = ""; private String lastMessage = "";
private boolean inAdminchat = false; private boolean inStaffchat = false;
private boolean allCommandsBlocked = false; private boolean allCommandsBlocked = false;
@Getter @Getter
@Setter @Setter
@ -348,14 +348,14 @@ public class FPlayer
return lastMessage; return lastMessage;
} }
public void setAdminChat(boolean inAdminchat) public void setStaffChat(boolean inStaffchat)
{ {
this.inAdminchat = inAdminchat; this.inStaffchat = inStaffchat;
} }
public boolean inAdminChat() public boolean inStaffChat()
{ {
return this.inAdminchat; return this.inStaffchat;
} }
public boolean allCommandsBlocked() public boolean allCommandsBlocked()

View File

@ -163,7 +163,7 @@ public class PlayerList extends FreedomService
public boolean isImposter(Player player) public boolean isImposter(Player player)
{ {
return isPlayerImpostor(player) || plugin.sl.isAdminImpostor(player); return isPlayerImpostor(player) || plugin.sl.isStaffImpostor(player);
} }
public void verify(Player player, String backupCode) public void verify(Player player, String backupCode)
@ -173,10 +173,11 @@ public class PlayerList extends FreedomService
{ {
playerData.removeBackupCode(backupCode); playerData.removeBackupCode(backupCode);
} }
playerData.addIp(FUtil.getIp(player)); playerData.addIp(FUtil.getIp(player));
save(playerData); save(playerData);
if (plugin.sl.isAdminImpostor(player)) if (plugin.sl.isStaffImpostor(player))
{ {
StaffMember staffMember = plugin.sl.getEntryByName(player.getName()); StaffMember staffMember = plugin.sl.getEntryByName(player.getName());
staffMember.setLastLogin(new Date()); staffMember.setLastLogin(new Date());
@ -195,6 +196,7 @@ public class PlayerList extends FreedomService
playerData.addIps(staffMember.getIps()); playerData.addIps(staffMember.getIps());
plugin.pl.save(playerData); plugin.pl.save(playerData);
} }
public void syncIps(PlayerData playerData) public void syncIps(PlayerData playerData)
{ {
StaffMember staffMember = plugin.sl.getEntryByName(playerData.getName()); StaffMember staffMember = plugin.sl.getEntryByName(playerData.getName());
@ -246,7 +248,7 @@ public class PlayerList extends FreedomService
playerData = loadByIp(FUtil.getIp(player)); playerData = loadByIp(FUtil.getIp(player));
if (playerData != null) if (playerData != null)
{ {
plugin.sql.updatePlayerName(playerData.getName(),player.getName()); plugin.sql.updatePlayerName(playerData.getName(), player.getName());
playerData.setName(player.getName()); playerData.setName(player.getName());
dataMap.put(player.getName(), playerData); dataMap.put(player.getName(), playerData);
return playerData; return playerData;
@ -312,5 +314,4 @@ public class PlayerList extends FreedomService
return player; return player;
} }
} }

View File

@ -10,7 +10,7 @@ public enum Rank implements Displayable
OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false), OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false),
TRIAL_MOD("a", "Trial Moderator", Type.STAFF, "Trial Mod", ChatColor.AQUA, org.bukkit.ChatColor.AQUA, true), TRIAL_MOD("a", "Trial Moderator", Type.STAFF, "Trial Mod", ChatColor.AQUA, org.bukkit.ChatColor.AQUA, true),
MOD("a", "Moderator", Type.STAFF, "Mod", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true), MOD("a", "Moderator", Type.STAFF, "Mod", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true),
ADMIN("a", "Administrator", Type.STAFF, "Administrator", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true), ADMIN("an", "Administrator", Type.STAFF, "Administrator", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true),
MOD_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false), MOD_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false),
ADMIN_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false); ADMIN_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false);
@Getter @Getter
@ -31,7 +31,7 @@ public enum Rank implements Displayable
@Getter @Getter
private final boolean hasTeam; private final boolean hasTeam;
private Rank(String determiner, String name, Type type, String abbr, ChatColor color, org.bukkit.ChatColor teamColor, Boolean hasTeam) Rank(String determiner, String name, Type type, String abbr, ChatColor color, org.bukkit.ChatColor teamColor, Boolean hasTeam)
{ {
this.type = type; this.type = type;
this.name = name; this.name = name;
@ -93,7 +93,7 @@ public enum Rank implements Displayable
return getConsoleVariant().getLevel() >= rank.getConsoleVariant().getLevel(); return getConsoleVariant().getLevel() >= rank.getConsoleVariant().getLevel();
} }
public boolean isAdmin() public boolean isStaff()
{ {
return getType() == Type.STAFF || getType() == Type.STAFF_CONSOLE; return getType() == Type.STAFF || getType() == Type.STAFF_CONSOLE;
} }
@ -138,10 +138,9 @@ public enum Rank implements Displayable
STAFF, STAFF,
STAFF_CONSOLE; STAFF_CONSOLE;
public boolean isAdmin() public boolean isStaff()
{ {
return this != PLAYER; return this != PLAYER;
} }
} }
} }

View File

@ -19,6 +19,7 @@ import org.bukkit.scoreboard.Team;
public class RankManager extends FreedomService public class RankManager extends FreedomService
{ {
@Override @Override
public void onStart() public void onStart()
{ {
@ -39,7 +40,7 @@ public class RankManager extends FreedomService
final Player player = (Player)sender; final Player player = (Player)sender;
// Display impostors // Display impostors
if (plugin.sl.isAdminImpostor(player)) if (plugin.sl.isStaffImpostor(player))
{ {
return Rank.IMPOSTOR; return Rank.IMPOSTOR;
} }
@ -66,12 +67,12 @@ public class RankManager extends FreedomService
return Title.ASSISTANT_EXECUTIVE; return Title.ASSISTANT_EXECUTIVE;
} }
if (plugin.sl.isVerifiedAdmin(player)) if (plugin.sl.isVerifiedStaff(player))
{ {
return Title.VERIFIED_ADMIN; return Title.VERIFIED_STAFF;
} }
// Master builders show up if they are not admins // Master builders show up if they are not staff
if (plugin.pl.getData(player).isMasterBuilder() && !plugin.sl.isStaff(player)) if (plugin.pl.getData(player).isMasterBuilder() && !plugin.sl.isStaff(player))
{ {
return Title.MASTER_BUILDER; return Title.MASTER_BUILDER;
@ -142,7 +143,7 @@ public class RankManager extends FreedomService
public Rank getRank(Player player) public Rank getRank(Player player)
{ {
if (plugin.sl.isAdminImpostor(player) || plugin.pl.isPlayerImpostor(player)) if (plugin.sl.isStaffImpostor(player) || plugin.pl.isPlayerImpostor(player))
{ {
return Rank.IMPOSTOR; return Rank.IMPOSTOR;
} }
@ -202,14 +203,14 @@ public class RankManager extends FreedomService
final FPlayer fPlayer = plugin.pl.getPlayer(player); final FPlayer fPlayer = plugin.pl.getPlayer(player);
PlayerData target = plugin.pl.getData(player); PlayerData target = plugin.pl.getData(player);
// Unban admins // Unban staff
boolean isAdmin = plugin.sl.isStaff(player); boolean isStaff = plugin.sl.isStaff(player);
if (isAdmin) if (isStaff)
{ {
// Verify strict IP match // Verify strict IP match
if (!plugin.sl.isIdentityMatched(player)) if (!plugin.sl.isIdentityMatched(player))
{ {
FUtil.bcastMsg("Warning: " + player.getName() + " is an admin, but is using an account not registered to one of their ip-list.", ChatColor.RED); FUtil.bcastMsg("Warning: " + player.getName() + " is a staff member, but is using an account not registered to one of their ip-list.", ChatColor.RED);
fPlayer.setSuperadminIdVerified(false); fPlayer.setSuperadminIdVerified(false);
} }
else else
@ -219,19 +220,19 @@ public class RankManager extends FreedomService
} }
} }
if (plugin.sl.isVerifiedAdmin(player)) if (plugin.sl.isVerifiedStaff(player))
{ {
FUtil.bcastMsg("Warning: " + player.getName() + " is an admin, but does not have any admin permissions.", ChatColor.RED); FUtil.bcastMsg("Warning: " + player.getName() + " is a staff member, but does not have any staff permissions.", ChatColor.RED);
} }
// Handle impostors // Handle impostors
boolean isImpostor = plugin.sl.isAdminImpostor(player) || plugin.pl.isPlayerImpostor(player); boolean isImpostor = plugin.sl.isStaffImpostor(player) || plugin.pl.isPlayerImpostor(player);
if (isImpostor) if (isImpostor)
{ {
FUtil.bcastMsg(ChatColor.AQUA + player.getName() + " is " + Rank.IMPOSTOR.getColoredLoginMessage()); FUtil.bcastMsg(ChatColor.AQUA + player.getName() + " is " + Rank.IMPOSTOR.getColoredLoginMessage());
if (plugin.sl.isAdminImpostor(player)) if (plugin.sl.isStaffImpostor(player))
{ {
FUtil.bcastMsg("Warning: " + player.getName() + " has been flagged as an admin impostor and has been frozen!", ChatColor.RED); FUtil.bcastMsg("Warning: " + player.getName() + " has been flagged as a staff impostor and has been frozen!", ChatColor.RED);
} }
else if (plugin.pl.isPlayerImpostor(player)) else if (plugin.pl.isPlayerImpostor(player))
{ {
@ -248,7 +249,7 @@ public class RankManager extends FreedomService
} }
// Broadcast login message // Broadcast login message
if (isAdmin || FUtil.isDeveloper(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator()) if (isStaff || FUtil.isDeveloper(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator())
{ {
if (!plugin.sl.isVanished(player.getName())) if (!plugin.sl.isVanished(player.getName()))
{ {

View File

@ -8,7 +8,7 @@ public enum Title implements Displayable
DONATOR("a", "Premium Member", ChatColor.of("#ff5600"), org.bukkit.ChatColor.LIGHT_PURPLE, "Premium", true), DONATOR("a", "Premium Member", ChatColor.of("#ff5600"), org.bukkit.ChatColor.LIGHT_PURPLE, "Premium", true),
MASTER_BUILDER("a", "Master Builder", ChatColor.DARK_AQUA, org.bukkit.ChatColor.DARK_AQUA, "MB", true), MASTER_BUILDER("a", "Master Builder", ChatColor.DARK_AQUA, org.bukkit.ChatColor.DARK_AQUA, "MB", true),
VERIFIED_ADMIN("a", "Verified Admin", ChatColor.LIGHT_PURPLE, org.bukkit.ChatColor.LIGHT_PURPLE, "VA", false), VERIFIED_STAFF("a", "Verified Staff", ChatColor.LIGHT_PURPLE, org.bukkit.ChatColor.LIGHT_PURPLE, "VS", false),
ASSISTANT_EXECUTIVE("an", "Assistant Executive", ChatColor.RED, org.bukkit.ChatColor.RED, "Asst Exec", true), ASSISTANT_EXECUTIVE("an", "Assistant Executive", ChatColor.RED, org.bukkit.ChatColor.RED, "Asst Exec", true),
EXECUTIVE("an", "Executive", ChatColor.RED, org.bukkit.ChatColor.RED, "Exec", true), EXECUTIVE("an", "Executive", ChatColor.RED, org.bukkit.ChatColor.RED, "Exec", true),
DEVELOPER("a", "Developer", ChatColor.DARK_PURPLE, org.bukkit.ChatColor.DARK_PURPLE, "Dev", true), DEVELOPER("a", "Developer", ChatColor.DARK_PURPLE, org.bukkit.ChatColor.DARK_PURPLE, "Dev", true),
@ -30,7 +30,7 @@ public enum Title implements Displayable
@Getter @Getter
private final boolean hasTeam; private final boolean hasTeam;
private Title(String determiner, String name, ChatColor color, org.bukkit.ChatColor teamColor, String tag, Boolean hasTeam) Title(String determiner, String name, ChatColor color, org.bukkit.ChatColor teamColor, String tag, Boolean hasTeam)
{ {
this.determiner = determiner; this.determiner = determiner;
this.name = name; this.name = name;
@ -59,5 +59,4 @@ public enum Title implements Displayable
{ {
return determiner + " " + color + name; return determiner + " " + color + name;
} }
} }

View File

@ -23,8 +23,8 @@ import org.bukkit.entity.Player;
public class StaffList extends FreedomService public class StaffList extends FreedomService
{ {
@Getter @Getter
private final Set<StaffMember> allStaffMembers = Sets.newHashSet(); // Includes disabled admins private final Set<StaffMember> allStaffMembers = Sets.newHashSet(); // Includes disabled staff
// Only active admins below // Only active staff below
@Getter @Getter
private final Set<StaffMember> activeStaffMembers = Sets.newHashSet(); private final Set<StaffMember> activeStaffMembers = Sets.newHashSet();
private final Map<String, StaffMember> nameTable = Maps.newHashMap(); private final Map<String, StaffMember> nameTable = Maps.newHashMap();
@ -68,7 +68,7 @@ public class StaffList extends FreedomService
FLog.info("Loaded " + allStaffMembers.size() + " staff members (" + nameTable.size() + " active, " + ipTable.size() + " IPs)"); FLog.info("Loaded " + allStaffMembers.size() + " staff members (" + nameTable.size() + " active, " + ipTable.size() + " IPs)");
} }
public void messageAllAdmins(String message) public void messageAllStaff(String message)
{ {
for (Player player : server.getOnlinePlayers()) for (Player player : server.getOnlinePlayers())
{ {
@ -218,12 +218,12 @@ public class StaffList extends FreedomService
save(staffMember); save(staffMember);
} }
public boolean isAdminImpostor(Player player) public boolean isStaffImpostor(Player player)
{ {
return getEntryByName(player.getName()) != null && !isStaff(player) && !isVerifiedAdmin(player); return getEntryByName(player.getName()) != null && !isStaff(player) && !isVerifiedStaff(player);
} }
public boolean isVerifiedAdmin(Player player) public boolean isVerifiedStaff(Player player)
{ {
return verifiedNoStaff.contains(player.getName()) && verifiedNoStaffIps.get(player.getName()).contains(FUtil.getIp(player)); return verifiedNoStaff.contains(player.getName()) && verifiedNoStaffIps.get(player.getName()).contains(FUtil.getIp(player));
} }
@ -243,7 +243,7 @@ public class StaffList extends FreedomService
{ {
if (!staffMember.isValid()) if (!staffMember.isValid())
{ {
logger.warning("Could not add admin: " + staffMember.getName() + " Admin is missing details!"); logger.warning("Could not add staff: " + staffMember.getName() + " Staff is missing details!");
return false; return false;
} }
@ -267,14 +267,14 @@ public class StaffList extends FreedomService
} }
} }
// Remove admin, update views // Remove staff, update views
if (!allStaffMembers.remove(staffMember)) if (!allStaffMembers.remove(staffMember))
{ {
return false; return false;
} }
updateTables(); updateTables();
// Unsave admin // Unsave staff
plugin.sql.removeStaffMember(staffMember); plugin.sql.removeStaffMember(staffMember);
return true; return true;
@ -330,7 +330,7 @@ public class StaffList extends FreedomService
} }
catch (SQLException e) catch (SQLException e)
{ {
FLog.severe("Failed to save admin: " + e.getMessage()); FLog.severe("Failed to save staff: " + e.getMessage());
} }
} }
@ -353,7 +353,7 @@ public class StaffList extends FreedomService
if (verbose) if (verbose)
{ {
FUtil.staffAction("TotalFreedomMod", "Deactivating admin " + staffMember.getName() + ", inactive for " + lastLoginHours + " hours", true); FUtil.staffAction("TotalFreedomMod", "Deactivating staff member " + staffMember.getName() + ", inactive for " + lastLoginHours + " hours", true);
} }
staffMember.setActive(false); staffMember.setActive(false);

View File

@ -73,7 +73,7 @@ public class StaffMember
} }
catch (SQLException e) catch (SQLException e)
{ {
FLog.severe("Failed to load admin: " + e.getMessage()); FLog.severe("Failed to load staff: " + e.getMessage());
} }
} }
@ -82,7 +82,7 @@ public class StaffMember
{ {
final StringBuilder output = new StringBuilder(); final StringBuilder output = new StringBuilder();
output.append("Admin: ").append(name).append("\n") output.append("Staff: ").append(name).append("\n")
.append("- IPs: ").append(StringUtils.join(ips, ", ")).append("\n") .append("- IPs: ").append(StringUtils.join(ips, ", ")).append("\n")
.append("- Last Login: ").append(FUtil.dateToString(lastLogin)).append("\n") .append("- Last Login: ").append(FUtil.dateToString(lastLogin)).append("\n")
.append("- Custom Login Message: ").append(loginMessage).append("\n") .append("- Custom Login Message: ").append(loginMessage).append("\n")

View File

@ -54,7 +54,7 @@ public class FSync
}.runTask(plugin); }.runTask(plugin);
} }
public static void adminChatMessage(final CommandSender sender, final String message) public static void staffChatMessage(final CommandSender sender, final String message)
{ {
final TotalFreedomMod plugin = TotalFreedomMod.plugin(); final TotalFreedomMod plugin = TotalFreedomMod.plugin();
new BukkitRunnable() new BukkitRunnable()

View File

@ -422,10 +422,10 @@ announcer:
- 'Racism, nazism, and sexism are strictly forbidden!' - 'Racism, nazism, and sexism are strictly forbidden!'
- 'Join our Discord server! Link: https://discordapp.com/invite/XXjmAmV/' - 'Join our Discord server! Link: https://discordapp.com/invite/XXjmAmV/'
# What to display in the admininfo command. # What to display in the staffinfo command.
admininfo: staffinfo:
- '&bHow to apply for admin on the TotalFreedom Server:' - '&bHow to apply for staff on the TotalFreedom Server:'
- ' &6- Do not ask for admin in game' - ' &6- Do not ask for staff in game'
- ' &2- Be helpful within the server' - ' &2- Be helpful within the server'
- ' &6- Report those breaking the rules' - ' &6- Report those breaking the rules'
- ' &2- And apply on our forums at the link:' - ' &2- And apply on our forums at the link:'