mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -23,18 +23,14 @@ public class Command_banlist extends FreedomCommand
|
||||
FUtil.staffAction(sender.getName(), "Purging the ban list", true);
|
||||
int amount = plugin.bm.purge();
|
||||
msg("Purged " + amount + " player bans.");
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
msg(plugin.bm.getAllBans().size() + " player bans ("
|
||||
+ plugin.bm.getUsernameBans().size() + " usernames, "
|
||||
+ plugin.bm.getIpBans().size() + " IPs)");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -114,7 +114,7 @@ public class Command_blockedit extends FreedomCommand
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -131,4 +131,4 @@ public class Command_blockedit extends FreedomCommand
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -115,7 +115,7 @@ public class Command_blockpvp extends FreedomCommand
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -131,4 +131,4 @@ public class Command_blockpvp extends FreedomCommand
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -32,7 +32,7 @@ public class Command_cake extends FreedomCommand
|
||||
heldItemMeta.setDisplayName(ChatColor.WHITE + "The " + ChatColor.DARK_GRAY + "Lie");
|
||||
heldItem.setItemMeta(heldItemMeta);
|
||||
|
||||
for (final Player player : this.server.getOnlinePlayers())
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
final int firstEmpty = player.getInventory().firstEmpty();
|
||||
if (firstEmpty >= 0)
|
||||
@ -44,4 +44,4 @@ public class Command_cake extends FreedomCommand
|
||||
FUtil.bcastMsg(output.toString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -38,7 +38,6 @@ public class Command_freeze extends FreedomCommand
|
||||
}
|
||||
}
|
||||
msg("Players are now frozen.");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -69,7 +68,6 @@ public class Command_freeze extends FreedomCommand
|
||||
|
||||
msg(player.getName() + " has been " + (fd.isFrozen() ? "frozen" : "unfrozen") + ".");
|
||||
msg(player, "You have been " + (fd.isFrozen() ? "frozen" : "unfrozen") + ".", ChatColor.AQUA);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -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")
|
||||
public class Command_invsee extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
|
||||
if (args.length < 1)
|
||||
{
|
||||
return false;
|
||||
@ -37,9 +37,8 @@ public class Command_invsee extends FreedomCommand
|
||||
|
||||
if (plugin.sl.isStaff(player) && !plugin.sl.isStaff(playerSender))
|
||||
{
|
||||
msg("You cannot spy on administrators.");
|
||||
msg("You cannot spy on staff members.");
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
Inventory inv;
|
||||
@ -109,5 +108,4 @@ public class Command_invsee extends FreedomCommand
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -116,7 +116,7 @@ public class Command_list extends FreedomCommand
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (listFilter == ListFilter.IMPOSTORS && !plugin.sl.isAdminImpostor(p))
|
||||
if (listFilter == ListFilter.IMPOSTORS && !plugin.sl.isStaffImpostor(p))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -154,7 +154,6 @@ public class Command_list extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private enum ListFilter
|
||||
{
|
||||
PLAYERS,
|
||||
|
@ -73,7 +73,7 @@ public class Command_mute extends FreedomCommand
|
||||
|
||||
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;
|
||||
int counter = 0;
|
||||
@ -122,7 +122,7 @@ public class Command_mute extends FreedomCommand
|
||||
FPlayer playerdata = plugin.pl.getPlayer(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;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -190,6 +190,7 @@ public class Command_mystaff extends FreedomCommand
|
||||
msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example));
|
||||
return true;
|
||||
}
|
||||
|
||||
case "clearscformat":
|
||||
{
|
||||
target.setAcFormat(null);
|
||||
@ -247,8 +248,8 @@ public class Command_mystaff extends FreedomCommand
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
List<String> singleArguments = Arrays.asList("clearips", "setlogin", "setacformat");
|
||||
List<String> doubleArguments = Arrays.asList("clearip", "clearlogin", "clearacformat", "oldtags", "syncroles");
|
||||
List<String> singleArguments = Arrays.asList("clearips", "setlogin", "setscformat");
|
||||
List<String> doubleArguments = Arrays.asList("clearip", "clearlogin", "clearscformat", "oldtags", "syncroles");
|
||||
if (args.length == 1)
|
||||
{
|
||||
List<String> options = new ArrayList<>();
|
||||
@ -270,7 +271,7 @@ public class Command_mystaff extends FreedomCommand
|
||||
if (args[0].equals("clearip"))
|
||||
{
|
||||
List<String> ips = plugin.sl.getAdmin(sender).getIps();
|
||||
ips.remove(FUtil.getIp((Player) sender));
|
||||
ips.remove(FUtil.getIp((Player)sender));
|
||||
return ips;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -59,4 +59,4 @@ public class Command_report extends FreedomCommand
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -92,10 +92,10 @@ public class Command_ro extends FreedomCommand
|
||||
names = StringUtils.join(materials, ", ");
|
||||
}
|
||||
|
||||
World adminWorld = null;
|
||||
World staffWorld = null;
|
||||
try
|
||||
{
|
||||
adminWorld = plugin.wm.staffworld.getWorld();
|
||||
staffWorld = plugin.wm.staffworld.getWorld();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -108,7 +108,7 @@ public class Command_ro extends FreedomCommand
|
||||
|
||||
for (final Player player : server.getOnlinePlayers())
|
||||
{
|
||||
if (player.getWorld() == adminWorld)
|
||||
if (player.getWorld() == staffWorld)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -121,7 +121,7 @@ public class Command_ro extends FreedomCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
if (targetPlayer.getWorld() != adminWorld)
|
||||
if (targetPlayer.getWorld() != staffWorld)
|
||||
{
|
||||
FUtil.staffAction(sender.getName(), "Removing all " + names + " within " + radius + " blocks of " + targetPlayer.getName(), false);
|
||||
for (Material material : materials)
|
||||
@ -132,7 +132,6 @@ public class Command_ro extends FreedomCommand
|
||||
}
|
||||
|
||||
FUtil.staffAction(sender.getName(), "Remove complete! " + affected + " blocks removed.", false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -176,7 +175,6 @@ public class Command_ro extends FreedomCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return affected;
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -159,7 +159,7 @@ public class Command_slconfig extends FreedomCommand
|
||||
checkConsole();
|
||||
checkRank(Rank.MOD);
|
||||
|
||||
// Player already an admin?
|
||||
// Player already staff?
|
||||
final Player player = getPlayer(args[1]);
|
||||
|
||||
if (player == null)
|
||||
@ -174,7 +174,7 @@ public class Command_slconfig extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
// Find the old admin entry
|
||||
// Find the old staff entry
|
||||
String name = player != null ? player.getName() : args[1];
|
||||
StaffMember staffMember = null;
|
||||
for (StaffMember loopStaffMember : plugin.sl.getAllStaffMembers())
|
||||
@ -225,7 +225,7 @@ public class Command_slconfig extends FreedomCommand
|
||||
staffMember.setActive(true);
|
||||
staffMember.setLastLogin(new Date());
|
||||
|
||||
if (plugin.sl.isVerifiedAdmin(player))
|
||||
if (plugin.sl.isVerifiedStaff(player))
|
||||
{
|
||||
plugin.sl.verifiedNoStaff.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);
|
||||
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);
|
||||
|
@ -19,19 +19,18 @@ public class Command_staffchat extends FreedomCommand
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
FPlayer userinfo = plugin.pl.getPlayer(playerSender);
|
||||
userinfo.setAdminChat(!userinfo.inAdminChat());
|
||||
msg("Toggled your staff chat " + (userinfo.inAdminChat() ? "on" : "off") + ".");
|
||||
userinfo.setStaffChat(!userinfo.inStaffChat());
|
||||
msg("Toggled your staff chat " + (userinfo.inStaffChat() ? "on" : "off") + ".");
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin.cm.staffChat(sender, StringUtils.join(args, " "));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -28,7 +28,6 @@ public class Command_staffinfo extends FreedomCommand
|
||||
{
|
||||
msg(FUtil.colorize(StringUtils.join(staffInfo, "\n")));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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>]",
|
||||
aliases = "aw")
|
||||
aliases = "sw")
|
||||
public class Command_staffworld extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -60,16 +60,16 @@ public class Command_staffworld extends FreedomCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
World adminWorld = null;
|
||||
World staffWorld = null;
|
||||
try
|
||||
{
|
||||
adminWorld = plugin.wm.staffworld.getWorld();
|
||||
staffWorld = plugin.wm.staffworld.getWorld();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
if (adminWorld == null || playerSender.getWorld() == adminWorld)
|
||||
if (staffWorld == null || playerSender.getWorld() == staffWorld)
|
||||
{
|
||||
msg("Going to the main world.");
|
||||
playerSender.teleport(server.getWorlds().get(0).getSpawnLocation());
|
||||
@ -79,7 +79,6 @@ public class Command_staffworld extends FreedomCommand
|
||||
msg("Going to the StaffWorld.");
|
||||
plugin.wm.staffworld.sendToWorld(playerSender);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case TIME:
|
||||
|
@ -10,13 +10,13 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
|
||||
if (!plugin.dc.enabled)
|
||||
{
|
||||
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@ public class Command_verifynostaff extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (plugin.sl.isAdminImpostor(player))
|
||||
if (plugin.sl.isStaffImpostor(player))
|
||||
{
|
||||
if (!plugin.sl.verifiedNoStaff.contains(player.getName()))
|
||||
{
|
||||
@ -70,7 +70,7 @@ public class Command_verifynostaff extends FreedomCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
msg(player.getName() + " is not an admin imposter.", ChatColor.RED);
|
||||
msg(player.getName() + " is not a staff imposter.", ChatColor.RED);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -84,7 +84,7 @@ public class Command_verifynostaff extends FreedomCommand
|
||||
List<String> adminImposters = new ArrayList<>();
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
if (plugin.sl.isAdminImpostor(player))
|
||||
if (plugin.sl.isStaffImpostor(player))
|
||||
{
|
||||
adminImposters.add(player.getName());
|
||||
}
|
||||
@ -94,4 +94,4 @@ public class Command_verifynostaff extends FreedomCommand
|
||||
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
@ -62,7 +62,7 @@ public class Command_warn extends FreedomCommand
|
||||
}
|
||||
|
||||
msg(player, ChatColor.RED + "[WARNING] You received a warning from " + sender.getName() + ": " + warnReason);
|
||||
String adminNotice = ChatColor.RED +
|
||||
String staffNotice = ChatColor.RED +
|
||||
sender.getName() +
|
||||
" - " +
|
||||
"Warning: " +
|
||||
@ -70,7 +70,7 @@ public class Command_warn extends FreedomCommand
|
||||
" - Reason: " +
|
||||
ChatColor.YELLOW +
|
||||
warnReason;
|
||||
plugin.sl.messageAllAdmins(adminNotice);
|
||||
plugin.sl.messageAllStaff(staffNotice);
|
||||
plugin.pl.getPlayer(player).incrementWarnings();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user