mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Finish the job
This commit is contained in:
parent
54e6e2f9b1
commit
59831ef1f3
@ -203,7 +203,7 @@ public class Reddit extends FreedomService
|
|||||||
flairList.put(Title.EXECUTIVE, ConfigEntry.REDDIT_EXECUTIVE_FLAIR_ID.getString());
|
flairList.put(Title.EXECUTIVE, ConfigEntry.REDDIT_EXECUTIVE_FLAIR_ID.getString());
|
||||||
flairList.put(Title.DEVELOPER, ConfigEntry.REDDIT_DEVELOPER_FLAIR_ID.getString());
|
flairList.put(Title.DEVELOPER, ConfigEntry.REDDIT_DEVELOPER_FLAIR_ID.getString());
|
||||||
flairList.put(Rank.SENIOR_ADMIN, ConfigEntry.REDDIT_SENIOR_ADMIN_FLAIR_ID.getString());
|
flairList.put(Rank.SENIOR_ADMIN, ConfigEntry.REDDIT_SENIOR_ADMIN_FLAIR_ID.getString());
|
||||||
flairList.put(Rank.NEW_ADMIN, ConfigEntry.REDDIT_NEW_ADMIN_FLAIR_ID.getString());
|
flairList.put(Rank.ADMIN, ConfigEntry.REDDIT_NEW_ADMIN_FLAIR_ID.getString());
|
||||||
flairList.put(Title.MASTER_BUILDER, ConfigEntry.REDDIT_MASTER_BUILDER_FLAIR_ID.getString());
|
flairList.put(Title.MASTER_BUILDER, ConfigEntry.REDDIT_MASTER_BUILDER_FLAIR_ID.getString());
|
||||||
|
|
||||||
// Work around because the current flair ID keeps returning null, either a JRAW bug or a Reddit bug
|
// Work around because the current flair ID keeps returning null, either a JRAW bug or a Reddit bug
|
||||||
@ -211,7 +211,7 @@ public class Reddit extends FreedomService
|
|||||||
flairNameList.put(Title.EXECUTIVE, "Executive");
|
flairNameList.put(Title.EXECUTIVE, "Executive");
|
||||||
flairNameList.put(Title.DEVELOPER, "Developer");
|
flairNameList.put(Title.DEVELOPER, "Developer");
|
||||||
flairNameList.put(Rank.SENIOR_ADMIN, "Senior Admin");
|
flairNameList.put(Rank.SENIOR_ADMIN, "Senior Admin");
|
||||||
flairNameList.put(Rank.NEW_ADMIN, "Admin");
|
flairNameList.put(Rank.ADMIN, "Admin");
|
||||||
flairNameList.put(Title.MASTER_BUILDER, "Master Builder");
|
flairNameList.put(Title.MASTER_BUILDER, "Master Builder");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ public class BukkitTelnetBridge extends FreedomService
|
|||||||
|
|
||||||
isAdmin = active;
|
isAdmin = active;
|
||||||
isSeniorAdmin = active && staffMember.getRank() == Rank.SENIOR_ADMIN;
|
isSeniorAdmin = active && staffMember.getRank() == Rank.SENIOR_ADMIN;
|
||||||
isTelnetAdmin = active && (isSeniorAdmin || staffMember.getRank() == Rank.NEW_ADMIN);
|
isTelnetAdmin = active && (isSeniorAdmin || staffMember.getRank() == Rank.ADMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
playerTags.put("tfm.admin.isAdmin", isAdmin);
|
playerTags.put("tfm.admin.isAdmin", isAdmin);
|
||||||
|
@ -28,7 +28,7 @@ public class Command_adventure extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
if (args[0].equals("-a"))
|
if (args[0].equals("-a"))
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.entity.AreaEffectCloud;
|
|||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/<command>", aliases = "aec")
|
@CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/<command>", aliases = "aec")
|
||||||
public class Command_aeclear extends FreedomCommand
|
public class Command_aeclear extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Make an announcement anonymously to operators.", usage = "/<command> <message>")
|
@CommandParameters(description = "Make an announcement anonymously to operators.", usage = "/<command> <message>")
|
||||||
public class Command_announce extends FreedomCommand
|
public class Command_announce extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle whether or not a player has their inventory automatically cleared when they join", usage = "/<command> <player>")
|
@CommandParameters(description = "Toggle whether or not a player has their inventory automatically cleared when they join", usage = "/<command> <player>")
|
||||||
public class Command_autoclear extends FreedomCommand
|
public class Command_autoclear extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle whether or not a player is automatically teleported when they join", usage = "/<command> <player>")
|
@CommandParameters(description = "Toggle whether or not a player is automatically teleported when they join", usage = "/<command> <player>")
|
||||||
public class Command_autotp extends FreedomCommand
|
public class Command_autotp extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans the specified player.", usage = "/<command> <username> [reason] [-nrb | -q]", aliases = "gtfo")
|
@CommandParameters(description = "Bans the specified player.", usage = "/<command> <username> [reason] [-nrb | -q]", aliases = "gtfo")
|
||||||
public class Command_ban extends FreedomCommand
|
public class Command_ban extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans the specified ip.", usage = "/<command> <ip> [reason] [-q]")
|
@CommandParameters(description = "Bans the specified ip.", usage = "/<command> <ip> [reason] [-q]")
|
||||||
public class Command_banip extends FreedomCommand
|
public class Command_banip extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans the specified name.", usage = "/<command> <name> [reason] [-q]")
|
@CommandParameters(description = "Bans the specified name.", usage = "/<command> <name> [reason] [-q]")
|
||||||
public class Command_banname extends FreedomCommand
|
public class Command_banname extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Block all commands for everyone on the server, or a specific player.", usage = "/<command> <-a | purge | <player>>", aliases = "blockcommands,blockcommand,bc,bcmd")
|
@CommandParameters(description = "Block all commands for everyone on the server, or a specific player.", usage = "/<command> <-a | purge | <player>>", aliases = "blockcommands,blockcommand,bc,bcmd")
|
||||||
public class Command_blockcmd extends FreedomCommand
|
public class Command_blockcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Restricts/unrestricts block modification abilities for everyone on the server or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]")
|
@CommandParameters(description = "Restricts/unrestricts block modification abilities for everyone on the server or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]")
|
||||||
public class Command_blockedit extends FreedomCommand
|
public class Command_blockedit extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle PVP mode for everyone or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]", aliases = "pvpblock,pvpmode")
|
@CommandParameters(description = "Toggle PVP mode for everyone or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]", aliases = "pvpblock,pvpmode")
|
||||||
public class Command_blockpvp extends FreedomCommand
|
public class Command_blockpvp extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Blocks redstone on the server.", usage = "/<command>", aliases = "bre")
|
@CommandParameters(description = "Blocks redstone on the server.", usage = "/<command>", aliases = "bre")
|
||||||
public class Command_blockredstone extends FreedomCommand
|
public class Command_blockredstone extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Place a cage around someone with certain blocks, or someone's player head.", usage = "/<command> <purge | <partialname> [head | block] [playername | blockname]")
|
@CommandParameters(description = "Place a cage around someone with certain blocks, or someone's player head.", usage = "/<command> <purge | <partialname> [head | block] [playername | blockname]")
|
||||||
public class Command_cage extends FreedomCommand
|
public class Command_cage extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "For the people that are still alive - gives a cake to everyone on the server.", usage = "/<command>")
|
@CommandParameters(description = "For the people that are still alive - gives a cake to everyone on the server.", usage = "/<command>")
|
||||||
public class Command_cake extends FreedomCommand
|
public class Command_cake extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Clears the chat.", usage = "/<command>", aliases = "cc")
|
@CommandParameters(description = "Clears the chat.", usage = "/<command>", aliases = "cc")
|
||||||
public class Command_clearchat extends FreedomCommand
|
public class Command_clearchat extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Spy on commands", usage = "/<command>", aliases = "commandspy")
|
@CommandParameters(description = "Spy on commands", usage = "/<command>", aliases = "commandspy")
|
||||||
public class Command_cmdspy extends FreedomCommand
|
public class Command_cmdspy extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Telnet/Console command - Send a chat message with chat formatting over telnet.", usage = "/<command> <message>", aliases = "csay")
|
@CommandParameters(description = "Telnet/Console command - Send a chat message with chat formatting over telnet.", usage = "/<command> <message>", aliases = "csay")
|
||||||
public class Command_consolesay extends FreedomCommand
|
public class Command_consolesay extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "For those who have no friends - gives a cookie to everyone on the server.", usage = "/<command>")
|
@CommandParameters(description = "For those who have no friends - gives a cookie to everyone on the server.", usage = "/<command>")
|
||||||
public class Command_cookie extends FreedomCommand
|
public class Command_cookie extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ public class Command_creative extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
if (args[0].equals("-a"))
|
if (args[0].equals("-a"))
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Remove the nickname of all players on the server.", usage = "/<command>")
|
@CommandParameters(description = "Essentials Interface Command - Remove the nickname of all players on the server.", usage = "/<command>")
|
||||||
public class Command_denick extends FreedomCommand
|
public class Command_denick extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Deop a player", usage = "/<command> <partialname>")
|
@CommandParameters(description = "Deop a player", usage = "/<command> <partialname>")
|
||||||
public class Command_deop extends FreedomCommand
|
public class Command_deop extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Deop everyone on the server.", usage = "/<command>")
|
@CommandParameters(description = "Deop everyone on the server.", usage = "/<command>")
|
||||||
public class Command_deopall extends FreedomCommand
|
public class Command_deopall extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle LibsDisguises for everyone online.", usage = "/<command>", aliases = "dtoggle")
|
@CommandParameters(description = "Toggle LibsDisguises for everyone online.", usage = "/<command>", aliases = "dtoggle")
|
||||||
public class Command_disguisetoggle extends FreedomCommand
|
public class Command_disguisetoggle extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Remove various server entities that may cause lag, such as dropped items, minecarts, and boats.", usage = "/<command> [name | -a]", aliases = "ew,rd")
|
@CommandParameters(description = "Remove various server entities that may cause lag, such as dropped items, minecarts, and boats.", usage = "/<command> [name | -a]", aliases = "ew,rd")
|
||||||
public class Command_entitywipe extends FreedomCommand
|
public class Command_entitywipe extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Push people away from you.", usage = "/<command> [radius] [strength]")
|
@CommandParameters(description = "Push people away from you.", usage = "/<command> [radius] [strength]")
|
||||||
public class Command_expel extends FreedomCommand
|
public class Command_expel extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Make arrows explode", usage = "/<command>", aliases = "ea")
|
@CommandParameters(description = "Make arrows explode", usage = "/<command>", aliases = "ea")
|
||||||
public class Command_explosivearrows extends FreedomCommand
|
public class Command_explosivearrows extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Shows all IPs registered to a player", usage = "/<command> <player>", aliases = "showip,listip")
|
@CommandParameters(description = "Shows all IPs registered to a player", usage = "/<command> <player>", aliases = "showip,listip")
|
||||||
public class Command_findip extends FreedomCommand
|
public class Command_findip extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Freeze/Unfreeze a specified player, or all non-staff 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
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "View server health, such as ticks-per-second, memory, etc.", usage = "/<command>")
|
@CommandParameters(description = "View server health, such as ticks-per-second, memory, etc.", usage = "/<command>")
|
||||||
public class Command_health extends FreedomCommand
|
public class Command_health extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kick the specified player.", usage = "/<command> <player> [reason] [-q]")
|
@CommandParameters(description = "Kick the specified player.", usage = "/<command> <player> [reason] [-q]")
|
||||||
public class Command_kick extends FreedomCommand
|
public class Command_kick extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kick all non-staff on server.", usage = "/<command>", aliases = "kickall")
|
@CommandParameters(description = "Kick all non-staff on server.", usage = "/<command>", aliases = "kickall")
|
||||||
public class Command_kicknoob extends FreedomCommand
|
public class Command_kicknoob extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Show the last command the specified player used.", usage = "/<command> <player>")
|
@CommandParameters(description = "Show the last command the specified player used.", usage = "/<command> <player>")
|
||||||
public class Command_lastcmd extends FreedomCommand
|
public class Command_lastcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -47,13 +47,13 @@ public class Command_list extends FreedomCommand
|
|||||||
}
|
}
|
||||||
case "-v":
|
case "-v":
|
||||||
{
|
{
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
listFilter = ListFilter.VANISHED_STAFF;
|
listFilter = ListFilter.VANISHED_STAFF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "-t":
|
case "-t":
|
||||||
{
|
{
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
listFilter = ListFilter.TELNET_SESSIONS;
|
listFilter = ListFilter.TELNET_SESSIONS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ public class Command_list extends FreedomCommand
|
|||||||
|
|
||||||
List<String> n = new ArrayList<>();
|
List<String> n = new ArrayList<>();
|
||||||
|
|
||||||
if (listFilter == ListFilter.TELNET_SESSIONS && plugin.sl.isStaff(sender) && plugin.sl.getAdmin(playerSender).getRank().isAtLeast(Rank.NEW_ADMIN))
|
if (listFilter == ListFilter.TELNET_SESSIONS && plugin.sl.isStaff(sender) && plugin.sl.getAdmin(playerSender).getRank().isAtLeast(Rank.ADMIN))
|
||||||
{
|
{
|
||||||
List<StaffMember> connectedStaffMembers = plugin.btb.getConnectedAdmins();
|
List<StaffMember> connectedStaffMembers = plugin.btb.getConnectedAdmins();
|
||||||
onlineStats.append(ChatColor.BLUE).append("There are ").append(ChatColor.RED).append(connectedStaffMembers.size())
|
onlineStats.append(ChatColor.BLUE).append("There are ").append(ChatColor.RED).append(connectedStaffMembers.size())
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Register your connection with the TFM logviewer.", usage = "/<command> [off]")
|
@CommandParameters(description = "Register your connection with the TFM logviewer.", usage = "/<command> [off]")
|
||||||
public class Command_logs extends FreedomCommand
|
public class Command_logs extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Make a WorldGuard region for an OP.", usage = "/<command> <playername> <name>", aliases = "mor")
|
@CommandParameters(description = "Make a WorldGuard region for an OP.", usage = "/<command> <playername> <name>", aliases = "mor")
|
||||||
public class Command_makeopregion extends FreedomCommand
|
public class Command_makeopregion extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manually verify someone", usage = "/<command> <playername>", aliases="mv")
|
@CommandParameters(description = "Manually verify someone", usage = "/<command> <playername>", aliases="mv")
|
||||||
public class Command_manuallyverify extends FreedomCommand
|
public class Command_manuallyverify extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Control mob limiting parameters.", usage = "/<command> <on|off|setmax <count>|dragon|giant|ghast|slime>")
|
@CommandParameters(description = "Control mob limiting parameters.", usage = "/<command> <on|off|setmax <count>|dragon|giant|ghast|slime>")
|
||||||
public class Command_moblimiter extends FreedomCommand
|
public class Command_moblimiter extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Purge all mobs in all worlds.", usage = "/<command> [name]", aliases = "mp")
|
@CommandParameters(description = "Purge all mobs in all worlds.", usage = "/<command> [name]", aliases = "mp")
|
||||||
public class Command_mobpurge extends FreedomCommand
|
public class Command_mobpurge extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> <[-s | -q] <player> [reason] | list | purge | all>", aliases = "stfu")
|
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> <[-s | -q] <player> [reason] | list | purge | all>", aliases = "stfu")
|
||||||
public class Command_mute extends FreedomCommand
|
public class Command_mute extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Manage your staff entry.", usage = "/<command> [-o <staff member>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setscformat <format> | clearscformat> | 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
|
||||||
{
|
{
|
||||||
@ -141,7 +141,7 @@ public class Command_mystaff extends FreedomCommand
|
|||||||
|
|
||||||
case "setlogin":
|
case "setlogin":
|
||||||
{
|
{
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -171,7 +171,7 @@ public class Command_mystaff extends FreedomCommand
|
|||||||
|
|
||||||
case "clearlogin":
|
case "clearlogin":
|
||||||
{
|
{
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
FUtil.staffAction(sender.getName(), "Clearing personal login message" + (init == null ? "" : " for " + targetPlayer.getName()), false);
|
FUtil.staffAction(sender.getName(), "Clearing personal login message" + (init == null ? "" : " for " + targetPlayer.getName()), false);
|
||||||
target.setLoginMessage(null);
|
target.setLoginMessage(null);
|
||||||
plugin.sl.save(target);
|
plugin.sl.save(target);
|
||||||
@ -186,7 +186,7 @@ public class Command_mystaff extends FreedomCommand
|
|||||||
plugin.sl.save(target);
|
plugin.sl.save(target);
|
||||||
plugin.sl.updateTables();
|
plugin.sl.updateTables();
|
||||||
msg("Set staff chat format to \"" + format + "\".", ChatColor.GRAY);
|
msg("Set staff chat format to \"" + format + "\".", ChatColor.GRAY);
|
||||||
String example = format.replace("%name%", "ExampleStaff").replace("%rank%", Rank.NEW_ADMIN.getAbbr()).replace("%rankcolor%", Rank.NEW_ADMIN.getColor().toString()).replace("%msg%", "The quick brown fox jumps over the lazy dog.");
|
String example = format.replace("%name%", "ExampleStaff").replace("%rank%", Rank.ADMIN.getAbbr()).replace("%rankcolor%", Rank.ADMIN.getColor().toString()).replace("%msg%", "The quick brown fox jumps over the lazy dog.");
|
||||||
msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example));
|
msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Remove illegal chatcodes from nicknames of one or all players on server.", usage = "/<command> [player]", aliases = "nc")
|
@CommandParameters(description = "Essentials Interface Command - Remove illegal chatcodes from nicknames of one or all players on server.", usage = "/<command> [player]", aliases = "nc")
|
||||||
public class Command_nickclean extends FreedomCommand
|
public class Command_nickclean extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage notes for a player", usage = "/<command> <name> <list | add <note> | remove <id> | clear>")
|
@CommandParameters(description = "Manage notes for a player", usage = "/<command> <name> <list | add <note> | remove <id> | clear>")
|
||||||
public class Command_notes extends FreedomCommand
|
public class Command_notes extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "POW!!! Right in the kisser! One of these days Alice, straight to the Moon - Sends the specified player into orbit.",
|
@CommandParameters(description = "POW!!! Right in the kisser! One of these days Alice, straight to the Moon - Sends the specified player into orbit.",
|
||||||
usage = "/<command> <target> [<<power> | stop>]")
|
usage = "/<command> <target> [<<power> | stop>]")
|
||||||
public class Command_orbit extends FreedomCommand
|
public class Command_orbit extends FreedomCommand
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Gets your playtime statistics.", usage = "/<command>")
|
@CommandParameters(description = "Gets your playtime statistics.", usage = "/<command>")
|
||||||
public class Command_playtime extends FreedomCommand
|
public class Command_playtime extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Enable, disable, or reload a specified plugin, as well as list all plugins on the server.", usage = "/<command> <<enable | disable | reload> <pluginname>> | list>", aliases = "plc")
|
@CommandParameters(description = "Enable, disable, or reload a specified plugin, as well as list all plugins on the server.", usage = "/<command> <<enable | disable | reload> <pluginname>> | list>", aliases = "plc")
|
||||||
public class Command_plugincontrol extends FreedomCommand
|
public class Command_plugincontrol extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.ThrownPotion;
|
import org.bukkit.entity.ThrownPotion;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Allows staff to see potions that are thrown.", usage = "/<command> <enable | on | disable | off> | history [player] <page>", aliases = "potspy")
|
@CommandParameters(description = "Allows staff to see potions that are thrown.", usage = "/<command> <enable | on | disable | off> | history [player] <page>", aliases = "potspy")
|
||||||
public class Command_potionspy extends FreedomCommand
|
public class Command_potionspy extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Entity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Purge current mutes, command blocks, orbits, freezes, potion effects, cages, and entities.", usage = "/<command>")
|
@CommandParameters(description = "Purge current mutes, command blocks, orbits, freezes, potion effects, cages, and entities.", usage = "/<command>")
|
||||||
public class Command_purgeall extends FreedomCommand
|
public class Command_purgeall extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Remove all blocks of a certain type in the radius of certain players.", usage = "/<command> <block> [radius (default=50)] [player]")
|
@CommandParameters(description = "Remove all blocks of a certain type in the radius of certain players.", usage = "/<command> <block> [radius (default=50)] [player]")
|
||||||
public class Command_ro extends FreedomCommand
|
public class Command_ro extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "You have thrown a rock, but you have also summoned a meteor!", usage = "/<command>")
|
@CommandParameters(description = "You have thrown a rock, but you have also summoned a meteor!", usage = "/<command>")
|
||||||
public class Command_rock extends FreedomCommand
|
public class Command_rock extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Broadcasts the given message as the server, includes sender name.", usage = "/<command> <message>")
|
@CommandParameters(description = "Broadcasts the given message as the server, includes sender name.", usage = "/<command> <message>")
|
||||||
public class Command_say extends FreedomCommand
|
public class Command_say extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Sets everyone's WorldEdit block modification limit to the default limit or to a custom limit.", usage = "/<command> [limit]", aliases = "setl,swl")
|
@CommandParameters(description = "Sets everyone's WorldEdit block modification limit to the default limit or to a custom limit.", usage = "/<command> [limit]", aliases = "setl,swl")
|
||||||
public class Command_setlimit extends FreedomCommand
|
public class Command_setlimit extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Sets a specific player's WorldEdit block modification limit to the default limit or to a custom limit.", usage = "/<command> <player> [limit]", aliases = "setpl,spl")
|
@CommandParameters(description = "Sets a specific player's WorldEdit block modification limit to the default limit or to a custom limit.", usage = "/<command> <player> [limit]", aliases = "setpl,spl")
|
||||||
public class Command_setplayerlimit extends FreedomCommand
|
public class Command_setplayerlimit extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Set the spawn point of the world you are in.", usage = "/<command>")
|
@CommandParameters(description = "Set the spawn point of the world you are in.", usage = "/<command>")
|
||||||
public class Command_setspawnworld extends FreedomCommand
|
public class Command_setspawnworld extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ public class Command_slconfig extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rank.isAtLeast(Rank.NEW_ADMIN))
|
if (!rank.isAtLeast(Rank.ADMIN))
|
||||||
{
|
{
|
||||||
msg("Rank must be Trial Mod or higher.", ChatColor.RED);
|
msg("Rank must be Trial Mod or higher.", ChatColor.RED);
|
||||||
return true;
|
return true;
|
||||||
@ -125,7 +125,7 @@ public class Command_slconfig extends FreedomCommand
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
StaffMember staffMember = plugin.sl.getEntryByName(args[1]);
|
StaffMember staffMember = plugin.sl.getEntryByName(args[1]);
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ public class Command_slconfig extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkConsole();
|
checkConsole();
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
// Player already staff?
|
// Player already staff?
|
||||||
final Player player = getPlayer(args[1]);
|
final Player player = getPlayer(args[1]);
|
||||||
@ -272,7 +272,7 @@ public class Command_slconfig extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkConsole();
|
checkConsole();
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
Player player = getPlayer(args[1]);
|
Player player = getPlayer(args[1]);
|
||||||
StaffMember staffMember = player != null ? plugin.sl.getAdmin(player) : plugin.sl.getEntryByName(args[1]);
|
StaffMember staffMember = player != null ? plugin.sl.getAdmin(player) : plugin.sl.getEntryByName(args[1]);
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Someone being a little bitch? Smite them down...", usage = "/<command> <player> [reason] [-q]")
|
@CommandParameters(description = "Someone being a little bitch? Smite them down...", usage = "/<command> <player> [reason] [-q]")
|
||||||
public class Command_smite extends FreedomCommand
|
public class Command_smite extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Quickly spectate someone.", usage = "/<command> <playername>", aliases = "spec")
|
@CommandParameters(description = "Quickly spectate someone.", usage = "/<command> <playername>", aliases = "spec")
|
||||||
public class Command_spectate extends FreedomCommand
|
public class Command_spectate extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Quickly change your own gamemode to spectator, or define someone's username to change theirs.", usage = "/<command> <[partialname]>", aliases = "gmsp")
|
@CommandParameters(description = "Quickly change your own gamemode to spectator, or define someone's username to change theirs.", usage = "/<command> <[partialname]>", aliases = "gmsp")
|
||||||
public class Command_spectator extends FreedomCommand
|
public class Command_spectator extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Talk privately with other staff on the server.", usage = "/<command> [message]", aliases = "o,sc")
|
@CommandParameters(description = "Talk privately with other staff on the server.", usage = "/<command> [message]", aliases = "o,sc")
|
||||||
public class Command_staffchat extends FreedomCommand
|
public class Command_staffchat extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Denies joining of operators and only allows staff members to join.", usage = "/<command> [on | off]")
|
@CommandParameters(description = "Denies joining of operators and only allows staff members to join.", usage = "/<command> [on | off]")
|
||||||
public class Command_staffmode extends FreedomCommand
|
public class Command_staffmode extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kicks everyone and stops the server.", usage = "/<command> [reason]")
|
@CommandParameters(description = "Kicks everyone and stops the server.", usage = "/<command> [reason]")
|
||||||
public class Command_stop extends FreedomCommand
|
public class Command_stop extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ public class Command_survival extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
if (args[0].equals("-a"))
|
if (args[0].equals("-a"))
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Temporarily bans a player for five minutes.", usage = "/<command> [-q] <username> [reason]", aliases = "noob")
|
@CommandParameters(description = "Temporarily bans a player for five minutes.", usage = "/<command> [-q] <username> [reason]", aliases = "noob")
|
||||||
public class Command_tban extends FreedomCommand
|
public class Command_tban extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Temporarily ban someone.", usage = "/<command> [-q] <username> [duration] [reason]")
|
@CommandParameters(description = "Temporarily ban someone.", usage = "/<command> [-q] <username> [duration] [reason]")
|
||||||
public class Command_tempban extends FreedomCommand
|
public class Command_tempban extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggles TotalFreedomMod settings", usage = "/<command> [option] [value] [value]")
|
@CommandParameters(description = "Toggles TotalFreedomMod settings", usage = "/<command> [option] [value] [value]")
|
||||||
public class Command_toggle extends FreedomCommand
|
public class Command_toggle extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle online players' ability to chat.", usage = "/<command>", aliases = "tc")
|
@CommandParameters(description = "Toggle online players' ability to chat.", usage = "/<command>", aliases = "tc")
|
||||||
public class Command_togglechat extends FreedomCommand
|
public class Command_togglechat extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Trails rainbow wool behind you as you walk/fly.", usage = "/<command>")
|
@CommandParameters(description = "Trails rainbow wool behind you as you walk/fly.", usage = "/<command>")
|
||||||
public class Command_trail extends FreedomCommand
|
public class Command_trail extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unbans the specified player.", usage = "/<command> <username> [-r]")
|
@CommandParameters(description = "Unbans the specified player.", usage = "/<command> <username> [-r]")
|
||||||
public class Command_unban extends FreedomCommand
|
public class Command_unban extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unbans the specified ip.", usage = "/<command> <ip> [-q]")
|
@CommandParameters(description = "Unbans the specified ip.", usage = "/<command> <ip> [-q]")
|
||||||
public class Command_unbanip extends FreedomCommand
|
public class Command_unbanip extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unbans the specified name.", usage = "/<command> <name> [-q]")
|
@CommandParameters(description = "Unbans the specified name.", usage = "/<command> <name> [-q]")
|
||||||
public class Command_unbanname extends FreedomCommand
|
public class Command_unbanname extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unblocks commands for a player.", usage = "/<command> <player>", aliases = "unblockcommand,unblockcommands,ubcmds,unblockcmds,ubc")
|
@CommandParameters(description = "Unblocks commands for a player.", usage = "/<command> <player>", aliases = "unblockcommand,unblockcommands,ubcmds,unblockcmds,ubc")
|
||||||
public class Command_unblockcmd extends FreedomCommand
|
public class Command_unblockcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Uncage a player", usage = "/<command> <name>")
|
@CommandParameters(description = "Uncage a player", usage = "/<command> <name>")
|
||||||
public class Command_uncage extends FreedomCommand
|
public class Command_uncage extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Undisguise all online players on the server", usage = "/<command> [-a]", aliases = "uall")
|
@CommandParameters(description = "Undisguise all online players on the server", usage = "/<command> [-a]", aliases = "uall")
|
||||||
public class Command_undisguiseall extends FreedomCommand
|
public class Command_undisguiseall extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unmutes a player", usage = "/<command> [-q] <player>")
|
@CommandParameters(description = "Unmutes a player", usage = "/<command> [-q] <player>")
|
||||||
public class Command_unmute extends FreedomCommand
|
public class Command_unmute extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v")
|
@CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v")
|
||||||
public class Command_vanish extends FreedomCommand
|
public class Command_vanish extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Verify a staff member without giving them staff permissions.", usage = "/<command> <player>", aliases = "vns")
|
@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
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Warns the specified player.", usage = "/<command> [-q] <player> <reason>")
|
@CommandParameters(description = "Warns the specified player.", usage = "/<command> [-q] <player> <reason>")
|
||||||
public class Command_warn extends FreedomCommand
|
public class Command_warn extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ public class Command_whitelist extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Commands below are restricted to staff
|
// Commands below are restricted to staff
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
// on
|
// on
|
||||||
if (args[0].equalsIgnoreCase("on"))
|
if (args[0].equalsIgnoreCase("on"))
|
||||||
@ -153,7 +153,7 @@ public class Command_whitelist extends FreedomCommand
|
|||||||
|
|
||||||
// Telnet only
|
// Telnet only
|
||||||
checkConsole();
|
checkConsole();
|
||||||
checkRank(Rank.NEW_ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
// purge
|
// purge
|
||||||
if (args[0].equalsIgnoreCase("purge"))
|
if (args[0].equalsIgnoreCase("purge"))
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Run any command on all users, username placeholder = ?.", usage = "/<command> [fluff] ? [fluff] ?")
|
@CommandParameters(description = "Run any command on all users, username placeholder = ?.", usage = "/<command> [fluff] ? [fluff] ?")
|
||||||
public class Command_wildcard extends FreedomCommand
|
public class Command_wildcard extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Wipes the CoreProtect data for the flatlands", usage = "/<command>")
|
@CommandParameters(description = "Wipes the CoreProtect data for the flatlands", usage = "/<command>")
|
||||||
public class Command_wipecoreprotectdata extends FreedomCommand
|
public class Command_wipecoreprotectdata extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -455,7 +455,7 @@ public class Discord extends FreedomService
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (staffMember.getRank().equals(Rank.NEW_ADMIN))
|
if (staffMember.getRank().equals(Rank.ADMIN))
|
||||||
{
|
{
|
||||||
if (!member.getRoles().contains(adminRole))
|
if (!member.getRoles().contains(adminRole))
|
||||||
{
|
{
|
||||||
|
@ -68,7 +68,7 @@ public class DiscordToMinecraftListener extends ListenerAdapter
|
|||||||
// Admins
|
// Admins
|
||||||
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_NEW_ADMIN_ROLE_ID.getString())))
|
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_NEW_ADMIN_ROLE_ID.getString())))
|
||||||
{
|
{
|
||||||
return Rank.NEW_ADMIN.getColoredTag();
|
return Rank.ADMIN.getColoredTag();
|
||||||
}
|
}
|
||||||
// Master Builders
|
// Master Builders
|
||||||
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_MASTER_BUILDER_ROLE_ID.getString())))
|
else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_MASTER_BUILDER_ROLE_ID.getString())))
|
||||||
|
@ -78,7 +78,7 @@ public class Module_list extends HTTPDModule
|
|||||||
StaffMember staffMember = plugin.sl.getAdmin(player);
|
StaffMember staffMember = plugin.sl.getAdmin(player);
|
||||||
switch (staffMember.getRank())
|
switch (staffMember.getRank())
|
||||||
{
|
{
|
||||||
case NEW_ADMIN:
|
case ADMIN:
|
||||||
admins.add(player.getName());
|
admins.add(player.getName());
|
||||||
break;
|
break;
|
||||||
case SENIOR_ADMIN:
|
case SENIOR_ADMIN:
|
||||||
|
@ -52,7 +52,7 @@ public class Module_players extends HTTPDModule
|
|||||||
|
|
||||||
switch (staffMember.getRank())
|
switch (staffMember.getRank())
|
||||||
{
|
{
|
||||||
case NEW_ADMIN:
|
case ADMIN:
|
||||||
admins.add(username);
|
admins.add(username);
|
||||||
break;
|
break;
|
||||||
case SENIOR_ADMIN:
|
case SENIOR_ADMIN:
|
||||||
|
@ -52,7 +52,7 @@ public class PermissionManager extends FreedomService
|
|||||||
|
|
||||||
adminPermissions = PermissionEntry.ADMINS.getEntry();
|
adminPermissions = PermissionEntry.ADMINS.getEntry();
|
||||||
adminPermissions.addAll(masterBuilderPermissions);
|
adminPermissions.addAll(masterBuilderPermissions);
|
||||||
permissions.put(Rank.NEW_ADMIN, adminPermissions);
|
permissions.put(Rank.ADMIN, adminPermissions);
|
||||||
|
|
||||||
senioradminPermissions = PermissionEntry.SENIOR_ADMINS.getEntry();
|
senioradminPermissions = PermissionEntry.SENIOR_ADMINS.getEntry();
|
||||||
senioradminPermissions.addAll(adminPermissions);
|
senioradminPermissions.addAll(adminPermissions);
|
||||||
|
@ -111,7 +111,7 @@ public class PlayerList extends FreedomService
|
|||||||
public boolean isTelnetMasterBuilder(PlayerData playerData)
|
public boolean isTelnetMasterBuilder(PlayerData playerData)
|
||||||
{
|
{
|
||||||
StaffMember staffMember = plugin.sl.getEntryByName(playerData.getName());
|
StaffMember staffMember = plugin.sl.getEntryByName(playerData.getName());
|
||||||
if (staffMember != null && staffMember.getRank().isAtLeast(Rank.NEW_ADMIN) && playerData.isMasterBuilder())
|
if (staffMember != null && staffMember.getRank().isAtLeast(Rank.ADMIN) && playerData.isMasterBuilder())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,9 @@ public enum Rank implements Displayable
|
|||||||
IMPOSTOR("an", "Impostor", Type.PLAYER, "Imp", ChatColor.YELLOW, null, false),
|
IMPOSTOR("an", "Impostor", Type.PLAYER, "Imp", ChatColor.YELLOW, null, false),
|
||||||
NON_OP("a", "Non-Op", Type.PLAYER, "", ChatColor.WHITE, null, false),
|
NON_OP("a", "Non-Op", Type.PLAYER, "", ChatColor.WHITE, null, false),
|
||||||
OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false),
|
OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false),
|
||||||
NEW_ADMIN("a", "Moderator", Type.STAFF, "Mod", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true),
|
ADMIN("an", "Admin", Type.STAFF, "Admin", ChatColor.GREEN, org.bukkit.ChatColor.GREEN, true),
|
||||||
SENIOR_ADMIN("an", "Administrator", Type.STAFF, "Admin", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true),
|
SENIOR_ADMIN("a", "Senior Admin", Type.STAFF, "SrA", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true),
|
||||||
NEW_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),
|
||||||
SENIOR_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false);
|
SENIOR_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false);
|
||||||
@Getter
|
@Getter
|
||||||
private final Type type;
|
private final Type type;
|
||||||
@ -106,9 +106,9 @@ public enum Rank implements Displayable
|
|||||||
{
|
{
|
||||||
switch (this)
|
switch (this)
|
||||||
{
|
{
|
||||||
case NEW_ADMIN:
|
case ADMIN:
|
||||||
case NEW_ADMIN_CONSOLE:
|
case ADMIN_CONSOLE:
|
||||||
return NEW_ADMIN_CONSOLE;
|
return ADMIN_CONSOLE;
|
||||||
case SENIOR_ADMIN:
|
case SENIOR_ADMIN:
|
||||||
case SENIOR_CONSOLE:
|
case SENIOR_CONSOLE:
|
||||||
return SENIOR_CONSOLE;
|
return SENIOR_CONSOLE;
|
||||||
@ -130,9 +130,8 @@ public enum Rank implements Displayable
|
|||||||
return Rank.NON_OP;
|
return Rank.NON_OP;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum Type
|
public enum Type
|
||||||
{
|
{
|
||||||
|
|
||||||
PLAYER,
|
PLAYER,
|
||||||
STAFF,
|
STAFF,
|
||||||
STAFF_CONSOLE;
|
STAFF_CONSOLE;
|
||||||
|
@ -109,7 +109,7 @@ public class RankManager extends FreedomService
|
|||||||
// CONSOLE?
|
// CONSOLE?
|
||||||
if (sender.getName().equals("CONSOLE"))
|
if (sender.getName().equals("CONSOLE"))
|
||||||
{
|
{
|
||||||
return ConfigEntry.STAFFLIST_CONSOLE_IS_ADMIN.getBoolean() ? Rank.SENIOR_CONSOLE : Rank.NEW_ADMIN_CONSOLE;
|
return ConfigEntry.STAFFLIST_CONSOLE_IS_ADMIN.getBoolean() ? Rank.SENIOR_CONSOLE : Rank.ADMIN_CONSOLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Console admin, get by name
|
// Console admin, get by name
|
||||||
|
@ -138,7 +138,7 @@ public class StaffList extends FreedomService
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return staffMember.getRank().ordinal() >= Rank.NEW_ADMIN.ordinal();
|
return staffMember.getRank().ordinal() >= Rank.ADMIN.ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAdmin(CommandSender sender)
|
public boolean isAdmin(CommandSender sender)
|
||||||
@ -283,7 +283,7 @@ public class StaffList extends FreedomService
|
|||||||
|
|
||||||
public boolean removeAdmin(StaffMember staffMember)
|
public boolean removeAdmin(StaffMember staffMember)
|
||||||
{
|
{
|
||||||
if (staffMember.getRank().isAtLeast(Rank.NEW_ADMIN))
|
if (staffMember.getRank().isAtLeast(Rank.ADMIN))
|
||||||
{
|
{
|
||||||
if (plugin.btb != null)
|
if (plugin.btb != null)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ public class StaffMember
|
|||||||
private boolean active = true;
|
private boolean active = true;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
private Rank rank = Rank.NEW_ADMIN;
|
private Rank rank = Rank.ADMIN;
|
||||||
@Getter
|
@Getter
|
||||||
private final List<String> ips = new ArrayList<>();
|
private final List<String> ips = new ArrayList<>();
|
||||||
@Getter
|
@Getter
|
||||||
@ -156,7 +156,7 @@ public class StaffMember
|
|||||||
|
|
||||||
if (!active)
|
if (!active)
|
||||||
{
|
{
|
||||||
if (getRank().isAtLeast(Rank.NEW_ADMIN))
|
if (getRank().isAtLeast(Rank.ADMIN))
|
||||||
{
|
{
|
||||||
if (plugin.btb != null)
|
if (plugin.btb != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user