diff --git a/pom.xml b/pom.xml index 039afeb0..68416f28 100644 --- a/pom.xml +++ b/pom.xml @@ -203,6 +203,13 @@ compile + + net.essentialsx + EssentialsXDiscord + 2.19.2 + provided + + org.javassist javassist diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/CommandPermissions.java b/src/main/java/me/totalfreedom/totalfreedommod/command/CommandPermissions.java index 3db48004..2cf2d2c6 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/CommandPermissions.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/CommandPermissions.java @@ -8,7 +8,7 @@ import me.totalfreedom.totalfreedommod.rank.Rank; public @interface CommandPermissions { - Rank level() default Rank.NON_OP; + Rank rank() default Rank.NON_OP; SourceType source() default SourceType.BOTH; diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminchat.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminchat.java index d1fd6b30..af004961 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminchat.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminchat.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Talk privately with other admins on the server.", usage = "/ [message]", aliases = "o,sc,ac,staffchat") public class Command_adminchat extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_admininfo.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_admininfo.java index 7708e0dd..e114d975 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_admininfo.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_admininfo.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Information on how to apply for admin.", usage = "/", aliases = "si,ai,staffinfo") public class Command_admininfo extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminmode.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminmode.java index 51ebb4f1..e50a87bc 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminmode.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminmode.java @@ -11,7 +11,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Denies joining of operators and only allows admins to join.", usage = "/ [on | off]", aliases = "staffmode") public class Command_adminmode extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminworld.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminworld.java index 42942e2f..1726bb59 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminworld.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adminworld.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Allows for admins to configure time, and weather of the AdminWorld, and allows for admins and ops to go to the AdminWorld.", usage = "/ [time | weather ]", aliases = "sw,aw,staffworld") diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adventure.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adventure.java index 605b6de2..c8d227cd 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adventure.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_adventure.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Quickly change your own gamemode to adventure, define someone's username to change theirs, or change everyone's gamemode on the server.", usage = "/ <[partialname] | -a>", aliases = "gma") public class Command_adventure extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_aeclear.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_aeclear.java index 41f87b32..d5d5187e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_aeclear.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_aeclear.java @@ -9,7 +9,7 @@ import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/", aliases = "aec") public class Command_aeclear extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_announce.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_announce.java index e0e49a7b..1f0d0156 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_announce.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_announce.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Make an announcement anonymously to operators.", usage = "/ ") public class Command_announce extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_attributelist.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_attributelist.java index 3e6610eb..68286faa 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_attributelist.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_attributelist.java @@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import java.util.Arrays; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Lists all possible attributes.", usage = "/") public class Command_attributelist extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autoclear.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autoclear.java index b4de03ae..ae937afe 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autoclear.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autoclear.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Toggle whether or not a player has their inventory automatically cleared when they join", usage = "/ ") public class Command_autoclear extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autotp.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autotp.java index 26bbec56..6b4518b2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autotp.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_autotp.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Toggle whether or not a player is automatically teleported when they join", usage = "/ ") public class Command_autotp extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ban.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ban.java index 2b0c7cc4..b5727ea9 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ban.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ban.java @@ -19,7 +19,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Bans the specified player.", usage = "/ [reason] [-nrb | -q]", aliases = "gtfo") public class Command_ban extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banip.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banip.java index 9066e83c..1891b55d 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banip.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banip.java @@ -11,7 +11,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Bans the specified ip.", usage = "/ [reason] [-q]") public class Command_banip extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banlist.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banlist.java index 72ae69d4..e8d966e2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banlist.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banlist.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Shows all banned player names. Admins may optionally use 'purge' to clear the list.", usage = "/ [purge]") public class Command_banlist extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banname.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banname.java index f7b16cfa..bd06cffe 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banname.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_banname.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Bans the specified name.", usage = "/ [reason] [-q]") public class Command_banname extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_bird.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_bird.java index 87291599..06b52272 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_bird.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_bird.java @@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Spawns a random type of fish at your location.", usage = "/") public class Command_bird extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockcmd.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockcmd.java index ee2ba733..50a57d87 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockcmd.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockcmd.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Block all commands for everyone on the server, or a specific player.", usage = "/ <-a | purge | >", aliases = "blockcommands,blockcommand,bc,bcmd") public class Command_blockcmd extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockedit.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockedit.java index 9a32d157..6fe1978d 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockedit.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockedit.java @@ -13,7 +13,7 @@ import org.bukkit.entity.Player; import java.util.List; import java.util.Optional; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Restricts/restores block modification abilities for everyone on the server or a certain player.", usage = "/ [ [reason] | list | purge | all]") public class Command_blockedit extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockpvp.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockpvp.java index 9c4bee0f..3bee40a0 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockpvp.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockpvp.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Toggle PVP mode for everyone or a certain player.", usage = "/ [[-s] [reason] | list | purge | all]", aliases = "pvpblock,pvpmode") public class Command_blockpvp extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockredstone.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockredstone.java index f4a13a32..14a86158 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockredstone.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_blockredstone.java @@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Blocks redstone on the server.", usage = "/", aliases = "bre") public class Command_blockredstone extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cage.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cage.java index ddcc6ed0..6873b312 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cage.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cage.java @@ -17,7 +17,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Place a cage around someone with certain blocks, or someone's player head.", usage = "/ [head | block] [playername | blockname]") public class Command_cage extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cake.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cake.java index 908e711a..12cd53be 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cake.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cake.java @@ -10,7 +10,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "For the people that are still alive - gives a cake to everyone on the server.", usage = "/") public class Command_cake extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cartsit.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cartsit.java index 5e90f925..2663ecec 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cartsit.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cartsit.java @@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Minecart; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.BOTH) @CommandParameters(description = "Sit in nearest minecart. If target is in a minecart already, they will disembark.", usage = "/ [partialname]") public class Command_cartsit extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleanchat.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleanchat.java index 96b5c172..c09019f2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleanchat.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleanchat.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Clears the chat.", usage = "/", aliases = "cc") public class Command_cleanchat extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java index 205ceffb..e71cd564 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_CONSOLE) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_CONSOLE) @CommandParameters(description = "Clear the discord message queue.", usage = "/") public class Command_cleardiscordqueue extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clearinventory.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clearinventory.java index a5574813..23433592 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clearinventory.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clearinventory.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Clear your inventory.", usage = "/ [player]", aliases = "ci,clear") public class Command_clearinventory extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java index 3f2caaf1..af75bf1e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Obtain a clown fish", usage = "/") public class Command_clownfish extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java index 4d31ca04..7ed3beb0 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Spy on commands", usage = "/", aliases = "commandspy") public class Command_cmdspy extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_coins.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_coins.java index f1ffc80b..c9e3e226 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_coins.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_coins.java @@ -12,7 +12,7 @@ import org.bukkit.entity.Player; import java.util.ArrayList; import java.util.List; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Shows the amount of coins you or another player has. Also allows you to give coins to other players.", usage = "/ [player] | pay ") public class Command_coins extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_colorme.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_colorme.java index e5a3e966..31eae9c8 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_colorme.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_colorme.java @@ -9,7 +9,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Essentials Interface Command - Set your nickname to a certain color.", usage = "/ ") public class Command_colorme extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java index 4fb77b68..0a0fcb38 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_CONSOLE) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_CONSOLE) @CommandParameters(description = "Telnet/Console command - Send a chat message with chat formatting over telnet.", usage = "/ ", aliases = "csay") public class Command_consolesay extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java index e404ef14..c6b7bb94 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java @@ -11,7 +11,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "For those who have no friends - gives a cookie to everyone on the server.", usage = "/") public class Command_cookie extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_creative.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_creative.java index a24c8043..cc7d8d46 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_creative.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_creative.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Quickly change your own gamemode to creative, define someone's username to change theirs, or change everyone's gamemode on the server.", usage = "/ <-a | [partialname]>", aliases = "gmc") public class Command_creative extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deafen.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deafen.java index d3358487..4caaa456 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deafen.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deafen.java @@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Makes random sounds.", usage = "/") public class Command_deafen extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_debugstick.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_debugstick.java index 067389ed..81fe7116 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_debugstick.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_debugstick.java @@ -14,7 +14,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Get a stick of happiness.", usage = "/") public class Command_debugstick extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_denick.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_denick.java index 259e1ade..2cceb112 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_denick.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_denick.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Essentials Interface Command - Remove the nickname of all players on the server.", usage = "/") public class Command_denick extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java index 19057d23..1c74f5ef 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java @@ -9,7 +9,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Deop a player", usage = "/ ") public class Command_deop extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java index 84817ad7..b4435548 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Deop everyone on the server.", usage = "/") public class Command_deopall extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java index 9a035fef..ab928d04 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Toggle LibsDisguises for everyone online.", usage = "/", aliases = "dtoggle") public class Command_disguisetoggle extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_dispfill.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_dispfill.java index 77d72ef3..fb237073 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_dispfill.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_dispfill.java @@ -15,7 +15,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Fill nearby dispensers with a set of items of your choice.", usage = "/ ") public class Command_dispfill extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_doom.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_doom.java index 22a7461b..5cdf6ae3 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_doom.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_doom.java @@ -18,7 +18,7 @@ import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true) +@CommandPermissions(rank = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true) @CommandParameters(description = "Sends the specified player to their doom.", usage = "/ [reason]") public class Command_doom extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_eject.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_eject.java index 693ae101..a19c35c7 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_eject.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_eject.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Eject any entities that are riding you.", usage = "/") public class Command_eject extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_enchant.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_enchant.java index 6700cc7f..46bcc997 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_enchant.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_enchant.java @@ -17,7 +17,7 @@ import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Enchant items.", usage = "/ [level] | remove >") public class Command_enchant extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_end.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_end.java index 083c0dac..d81cee17 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_end.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_end.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Go to \"The End\".", usage = "/") public class Command_end extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_entitywipe.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_entitywipe.java index f83157f5..458b2c57 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_entitywipe.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_entitywipe.java @@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Remove various server entities that may cause lag, such as dropped items, minecarts, and boats.", usage = "/ [name | -a]", aliases = "ew,rd") public class Command_entitywipe extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_expel.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_expel.java index 2f94d1af..45ebc083 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_expel.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_expel.java @@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.util.Vector; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Push people away from you.", usage = "/ [radius] [strength]") public class Command_expel extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explode.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explode.java index 0b407f71..4e6f5200 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explode.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explode.java @@ -10,7 +10,7 @@ import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.SENIOR_ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Surprise someone.", usage = "/ ") public class Command_explode extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explosivearrows.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explosivearrows.java index b1f4f767..60e8df64 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explosivearrows.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_explosivearrows.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Make arrows explode", usage = "/", aliases = "ea") public class Command_explosivearrows extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_findip.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_findip.java index 36ecb18e..88658116 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_findip.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_findip.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Shows all IPs registered to a player", usage = "/ ", aliases = "showip,listip") public class Command_findip extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fireball.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fireball.java index e5366424..8f175373 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fireball.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fireball.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Obtain a fire ball", usage = "/") public class Command_fireball extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_flatlands.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_flatlands.java index e768bc7f..1838465e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_flatlands.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_flatlands.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Go to the Flatlands.", usage = "/") public class Command_flatlands extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_forcekill.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_forcekill.java index dd4f3d77..f9e1b1fa 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_forcekill.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_forcekill.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Forcefully kill someone - for those who REALLY need to die.", usage = "/ ") public class Command_forcekill extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_freeze.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_freeze.java index fdcce361..6f0597d9 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_freeze.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_freeze.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Freeze/Unfreeze a specified player, or all non-admins on the server.", usage = "/ [target | purge]", aliases = "fr") public class Command_freeze extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fuckoff.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fuckoff.java index 169e6fbf..5b3f1204 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fuckoff.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fuckoff.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "You'll never even see it coming - repeatedly push players away from you until command is untoggled.", usage = "/ ") public class Command_fuckoff extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java index c25f0c12..8c1a32a8 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Send a command as someone else.", usage = "/ ") public class Command_gcmd extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_glow.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_glow.java index ca77a8ce..12354ce1 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_glow.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_glow.java @@ -7,7 +7,7 @@ import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Toggles the glowing outline effect because y'all lazy as fuck", usage = "/") public class Command_glow extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_grapplinghook.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_grapplinghook.java index 5ee72d2e..1d493310 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_grapplinghook.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_grapplinghook.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Obtain a grappling hook", usage = "/") public class Command_grapplinghook extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gravity.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gravity.java index f4f24fc2..69e2c866 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gravity.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gravity.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Toggles player gravity on/off.", usage = "/") public class Command_gravity extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java index 5fbd19ee..2877c8ed 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java @@ -13,7 +13,7 @@ import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitTask; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "View server health, such as ticks-per-second, memory, etc.", usage = "/") public class Command_health extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_indefban.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_indefban.java index 6d00f402..d03c420e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_indefban.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_indefban.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE) +@CommandPermissions(rank = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE) @CommandParameters(description = "Reload the indefinite ban list.", usage = "/ ", aliases = "ib") public class Command_indefban extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_inspect.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_inspect.java index ea019c00..f653b4f0 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_inspect.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_inspect.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Block inspector tool for operators.", usage = "/ [history] [page]", aliases = "ins") public class Command_inspect extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invis.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invis.java index b4964a37..c41edd6b 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invis.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invis.java @@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffectType; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Shows (optionally clears) invisible players", usage = "/ [clear]") public class Command_invis extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invsee.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invsee.java index 5390d710..9ee09e7d 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invsee.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_invsee.java @@ -9,7 +9,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Look into another player's inventory, or optionally take items out.", usage = "/ [offhand | armor]", aliases = "inv,insee") public class Command_invsee extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_jumppads.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_jumppads.java index 967eb64c..42567874 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_jumppads.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_jumppads.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Toggles jumppads on/off, view the status of jumppads, or make them sideways.", usage = "/ >", aliases = "launchpads,jp") public class Command_jumppads extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kick.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kick.java index b2ff77ce..ded71ea5 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kick.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kick.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Kick the specified player.", usage = "/ [reason] [-q]") public class Command_kick extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kicknoob.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kicknoob.java index 11a59232..c7669f63 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kicknoob.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_kicknoob.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Kick all non-admins on server.", usage = "/", aliases = "kickall") public class Command_kicknoob extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_landmine.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_landmine.java index f51e7fb5..5e83e3eb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_landmine.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_landmine.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Set a landmine trap.", usage = "/") public class Command_landmine extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lastcmd.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lastcmd.java index e0271f4a..9bb52194 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lastcmd.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lastcmd.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Show the last command the specified player used.", usage = "/ ") public class Command_lastcmd extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lightningrod.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lightningrod.java index ee2ffd8a..02543f38 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lightningrod.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lightningrod.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Obtain a lightning rod", usage = "/") public class Command_lightningrod extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java index 56d5315e..9424e9ef 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Link your Discord account to your Minecraft account", usage = "/ [ ]") public class Command_linkdiscord extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_links.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_links.java index 5bd21b6d..e040b419 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_links.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_links.java @@ -11,7 +11,7 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "See TotalFreedom's social media links.", usage = "/", aliases = "link") public class Command_links extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_list.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_list.java index 68db4ed8..e083d11a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_list.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_list.java @@ -11,7 +11,7 @@ import org.bukkit.entity.Player; import java.util.List; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.BOTH) @CommandParameters(description = "Lists the real names of all online players.", usage = "/ [-a | -v]", aliases = "who,lsit") public class Command_list extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_localspawn.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_localspawn.java index 3bea6064..cd36de17 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_localspawn.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_localspawn.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Teleport to the spawn point for the current world, instead of the Essentials spawn point.", usage = "/", aliases = "worldspawn,gotospawn") public class Command_localspawn extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lockup.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lockup.java index e707bd70..2510b0a4 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lockup.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_lockup.java @@ -9,7 +9,7 @@ import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitTask; -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH, blockHostConsole = true) +@CommandPermissions(rank = Rank.SENIOR_ADMIN, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "This is evil, and I never should have wrote it - blocks specified player's input.", usage = "/ on | off> [-q]>") public class Command_lockup extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_loginmessage.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_loginmessage.java index 0b5efbc2..60ca78dc 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_loginmessage.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_loginmessage.java @@ -9,7 +9,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Change your login message", usage = "/ [message]") public class Command_loginmessage extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_manageshop.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_manageshop.java index 1c0a7a81..1c8056d0 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_manageshop.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_manageshop.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Manage the shop", usage = "/ | items: ", aliases = "ms") public class Command_manageshop extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderinfo.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderinfo.java index a22d1e7b..7d1311b2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderinfo.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderinfo.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Information on how to apply for Master Builder.", usage = "/", aliases = "mbi") public class Command_masterbuilderinfo extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderworld.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderworld.java index ee249abe..193c2640 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderworld.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_masterbuilderworld.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Allows for master builders to configure the time, the weather of the MasterBuilder, and allows for players to go to the MasterBuilderWorld.", usage = "/ [time | weather ]", aliases = "mbw,mbworld") diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mbconfig.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mbconfig.java index 0bd5cc40..8f0922e4 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mbconfig.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mbconfig.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "List, add, or remove master builders. Master builders can also clear their own IPs.", usage = "/ | clearips | < >>") public class Command_mbconfig extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_moblimiter.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_moblimiter.java index 990c1c6b..f7ae07b4 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_moblimiter.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_moblimiter.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Control mob limiting parameters.", usage = "/ | dragon | giant | ghast | slime>") public class Command_moblimiter extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java index 9850b5c3..b8ab1b39 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java @@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Purge all mobs in all worlds.", usage = "/ [name]", aliases = "mp") public class Command_mobpurge extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mp44.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mp44.java index 8cb0a9a9..85864b8e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mp44.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mp44.java @@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Modern weaponry, FTW. Use 'draw' to start firing, 'sling' to stop firing.", usage = "/ ") public class Command_mp44 extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java index dc2ee775..85badaec 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java @@ -12,7 +12,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Mutes a player with brute force.", usage = "/ <[-s | -q] [reason] | list | purge | all>", aliases = "stfu") public class Command_mute extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java index ffc8c56b..91745443 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java @@ -16,7 +16,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Manage your admin entry.", usage = "/ [-o ] | setscformat | clearscformat> | syncroles>") public class Command_myadmin extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myinfo.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myinfo.java index 0bd209ea..7a653488 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myinfo.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myinfo.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Check your personal data", usage = "/") public class Command_myinfo extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nether.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nether.java index 6867fb97..c0ab6e1e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nether.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nether.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Go to the Nether.", usage = "/", aliases = "hell") public class Command_nether extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickclean.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickclean.java index 1ba43927..2f61f057 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickclean.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickclean.java @@ -16,7 +16,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Essentials Interface Command - Remove illegal chatcodes from nicknames of one or all players on server.", usage = "/ [player]", aliases = "nc") public class Command_nickclean extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickfilter.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickfilter.java index 76e7d125..aeb2e444 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickfilter.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickfilter.java @@ -11,7 +11,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "NickFilter: Prefix any command with this command to replace nicknames in that command with real names. Nicknames should be prefixed with a !.", usage = "/ !", aliases = "nf") diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickgradient.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickgradient.java index 402459c5..e39d3ba1 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickgradient.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickgradient.java @@ -11,7 +11,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Essentials Interface Command - Rainbowify your nickname.", usage = "/ ", aliases = "nickgr") public class Command_nickgradient extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nicknyan.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nicknyan.java index 251680cf..02729bf2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nicknyan.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nicknyan.java @@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import java.util.Arrays; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Essentials Interface Command - Randomize the colors of your nickname.", usage = "/ < | off>") public class Command_nicknyan extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickrainbow.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickrainbow.java index 94de311f..a1f9827f 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickrainbow.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickrainbow.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Essentials Interface Command - Rainbowify your nickname.", usage = "/ ") public class Command_nickrainbow extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_notes.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_notes.java index 4a4cd2ab..5b6a2fb0 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_notes.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_notes.java @@ -13,7 +13,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Manage notes for a player", usage = "/ | remove | clear>") public class Command_notes extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_op.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_op.java index 496df3ae..cee92841 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_op.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_op.java @@ -9,7 +9,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 5) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH, cooldown = 5) @CommandParameters(description = "OP a player", usage = "/ ") public class Command_op extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opall.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opall.java index 3cd46e01..e670c591 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opall.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opall.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 30) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH, cooldown = 30) @CommandParameters(description = "OP everyone on the server.", usage = "/") public class Command_opall extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opme.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opme.java index 93d71319..6e840bd2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opme.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_opme.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "OPs the command sender.", usage = "/") public class Command_opme extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ops.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ops.java index 70686735..f5b08c26 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ops.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ops.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) +@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "Manage operators", usage = "/ ") public class Command_ops extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_orbit.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_orbit.java index 06320f31..1532d7ae 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_orbit.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_orbit.java @@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.util.Vector; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(rank = 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.", usage = "/ [< | stop>]") public class Command_orbit extends FreedomCommand diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_playtime.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_playtime.java index c921275d..83aab90a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_playtime.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_playtime.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) +@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Gets your playtime statistics.", usage = "/") public class Command_playtime extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java b/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java index 00304f35..b718a826 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java @@ -1,10 +1,6 @@ package me.totalfreedom.totalfreedommod.command; import com.google.common.collect.Lists; - -import java.lang.reflect.Field; -import java.util.*; - import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.admin.Admin; import me.totalfreedom.totalfreedommod.player.PlayerData; @@ -23,6 +19,9 @@ import org.bukkit.util.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.lang.annotation.AnnotationFormatError; +import java.util.*; + public abstract class FreedomCommand implements CommandExecutor, TabCompleter { public static final String COMMAND_PREFIX = "Command_"; @@ -40,7 +39,8 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter private final String description; private final String usage; private final String aliases; - private final Rank level; + private final Rank rank; + private final String permission; private final SourceType source; private final boolean blockHostConsole; private final int cooldown; @@ -50,16 +50,23 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter FreedomCommand() { + if (getClass().getAnnotation(CommandParameters.class) == null || + getClass().getAnnotation(CommandPermissions.class) == null) + { + throw new AnnotationFormatError("Command class " + getClass().getName() + " is missing a required annotation!"); + } // Safety first! + params = getClass().getAnnotation(CommandParameters.class); perms = getClass().getAnnotation(CommandPermissions.class); this.name = getClass().getSimpleName().replace(COMMAND_PREFIX, "").toLowerCase(); this.description = params.description(); this.usage = params.usage(); this.aliases = params.aliases(); - this.level = perms.level(); + this.rank = perms.rank(); this.source = perms.source(); this.blockHostConsole = perms.blockHostConsole(); this.cooldown = perms.cooldown(); + this.permission = perms.rank().getPermission(); } public static FreedomCommand getFrom(Command command) @@ -70,8 +77,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter { return ((FCommand) command).getExecutor(); } - } - catch (Exception ex) + } catch (Exception ex) { FLog.severe(ex); return null; @@ -80,11 +86,6 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter return null; } - public static String getCommandPrefix() - { - return COMMAND_PREFIX; - } - public void register() { FCommand cmd = new FCommand(this.name); @@ -100,6 +101,10 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter { cmd.setUsage(this.usage); } + if (this.rank != null) + { + cmd.setPermission(this.rank.getPermission()); + } server.getCommandMap().register("totalfreedommod", cmd); cmd.setExecutor(this); } @@ -172,14 +177,13 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter { try { - boolean run = run(sender, sender instanceof ConsoleCommandSender ? null : (Player)sender, cmd, commandLabel, args, sender instanceof ConsoleCommandSender); + boolean run = run(sender, sender instanceof ConsoleCommandSender ? null : (Player) sender, cmd, commandLabel, args, sender instanceof ConsoleCommandSender); if (!run) { msg(ChatColor.WHITE + cmd.getUsage().replace("", cmd.getLabel())); return true; } - } - catch (CommandFailException ex) + } catch (CommandFailException ex) { msg(ChatColor.RED + ex.getMessage()); } @@ -274,9 +278,9 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter return aliases; } - public Rank getLevel() + public Rank getRank() { - return level; + return rank; } public SourceType getSource() @@ -289,21 +293,6 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter return blockHostConsole; } - public int getCooldown() - { - return cooldown; - } - - public CommandParameters getParams() - { - return params; - } - - public CommandPermissions getPerms() - { - return perms; - } - public final class FCommand extends Command implements PluginIdentifiableCommand { private FreedomCommand cmd = null; @@ -313,7 +302,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter super(command); } - public final FreedomCommand getExecutor() + public FreedomCommand getExecutor() { return cmd; } @@ -323,35 +312,37 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter this.cmd = cmd; } + @Override public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel, String[] args) { - if (cmd != null) + if (cmd == null) { - cmd.sender = sender; + return false; + } // Reduce complexity! Exit immediately if the command is null. - if (func4()) - { - return true; - } + cmd.sender = sender; - if (func1()) - { - return true; - } - - if (func2()) - { - return true; - } - - func3(); - - return cmd.onCommand(sender, this, commandLabel, args); + if (cooldownCheck()) + { + return true; } - return false; + + if (checkCommandSource()) + { + return true; + } + + if (permissionCheck()) + { + return true; + } + + assignApplicableCooldown(); + + return cmd.onCommand(sender, this, commandLabel, args); } - public boolean func1() + public boolean checkCommandSource() { if (perms.source() == SourceType.ONLY_CONSOLE && sender instanceof Player) { @@ -368,11 +359,11 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter return false; } - public boolean func2() + public boolean permissionCheck() { - if (!plugin.rm.getRank(sender).isAtLeast(perms.level())) + if (!sender.hasPermission(permission)) { - msg(NO_PERMISSION); + msg(ChatColor.RED + "You do not have permission to use this command."); return true; } @@ -384,7 +375,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter return false; } - public void func3() + public void assignApplicableCooldown() { if (perms.cooldown() != 0 && !isAdmin(sender)) { @@ -400,7 +391,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter } } - public boolean func4() + public boolean cooldownCheck() { if (COOLDOWN_TIMERS.containsKey(sender) && COOLDOWN_TIMERS.containsValue(cmd)) { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_help.java b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_help.java index dbaeddda..9bf2d267 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_help.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_help.java @@ -1,13 +1,9 @@ package me.totalfreedom.totalfreedommod.httpd.module; import com.google.common.collect.Lists; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; + +import java.util.*; + import me.totalfreedom.totalfreedommod.command.FreedomCommand; import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD; import me.totalfreedom.totalfreedommod.rank.Rank; @@ -119,7 +115,7 @@ public class Module_help extends HTTPDModule // Filters out non-TFM commands commands.stream().filter((cmd) -> cmd instanceof FreedomCommand.FCommand).forEach((tfmCmd) -> { - Rank rank = FreedomCommand.getFrom(tfmCmd).getLevel(); + Rank rank = Objects.requireNonNull(FreedomCommand.getFrom(tfmCmd)).getRank(); if (!freedomCommands.containsKey(rank)) freedomCommands.put(rank, new ArrayList<>()); freedomCommands.get(rank).add(FreedomCommand.getFrom(tfmCmd)); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java b/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java index 0c04dbbe..5b15dd92 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java @@ -1,17 +1,18 @@ package me.totalfreedom.totalfreedommod.rank; import net.md_5.bungee.api.ChatColor; +import org.jetbrains.annotations.NotNull; public enum Rank implements Displayable { - NON_OP("a", "Non-Op", Type.PLAYER, "", "Non-Ops", ChatColor.WHITE, null, false, false), - OP("an", "Operator", Type.PLAYER, "OP", "Operators", ChatColor.GREEN, null, false, false), - ADMIN("an", "Admin", Type.ADMIN, "Admin", "Administrators", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true, true), - SENIOR_ADMIN("a", "Senior Admin", Type.ADMIN, "SrA", "Senior Administrators", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true, true), - ADMIN_CONSOLE("the", "Console", Type.ADMIN_CONSOLE, "Console", "Administrator Consoles", ChatColor.DARK_PURPLE, null, false, false), - SENIOR_CONSOLE("the", "Console", Type.ADMIN_CONSOLE, "Console", "Senior Consoles", ChatColor.DARK_PURPLE, null, false, false); + NON_OP("a", "Non-Op", "tfm.default", "", "Non-Ops", ChatColor.WHITE, null, false, false), + OP("an", "Operator", "tfm.op", "OP", "Operators", ChatColor.GREEN, null, false, false), + ADMIN("an", "Admin", "tfm.admin", "Admin", "Administrators", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true, true), + SENIOR_ADMIN("a", "Senior Admin", "tfm.senior", "SrA", "Senior Administrators", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true, true), + ADMIN_CONSOLE("the", "Console", "tfm.rcon", "Console", "Administrator Consoles", ChatColor.DARK_PURPLE, null, false, false), + SENIOR_CONSOLE("the", "Console", "tfm.rcon.senior", "Console", "Senior Consoles", ChatColor.DARK_PURPLE, null, false, false); - private final Type type; + private final String permission; private final String name; @@ -31,9 +32,9 @@ public enum Rank implements Displayable private final boolean hasDefaultLoginMessage; - Rank(String article, String name, Type type, String abbr, String plural, ChatColor color, org.bukkit.ChatColor teamColor, Boolean hasTeam, Boolean hasDefaultLoginMessage) + Rank(String article, String name, String permission, String abbr, String plural, ChatColor color, org.bukkit.ChatColor teamColor, Boolean hasTeam, Boolean hasDefaultLoginMessage) { - this.type = type; + this.permission = permission; this.name = name; this.abbr = abbr; this.plural = plural; @@ -51,8 +52,7 @@ public enum Rank implements Displayable try { return Rank.valueOf(string.toUpperCase()); - } - catch (Exception ignored) + } catch (Exception ignored) { } @@ -96,7 +96,8 @@ public enum Rank implements Displayable public boolean isConsole() { - return getType() == Type.ADMIN_CONSOLE; + return getPermission().equalsIgnoreCase("tfm.rcon") || + getPermission().equalsIgnoreCase("tfm.rcon.senior"); // check for either console. } public int getLevel() @@ -104,7 +105,7 @@ public enum Rank implements Displayable return ordinal(); } - public boolean isAtLeast(Rank rank) + public boolean isAtLeast(@NotNull Rank rank) { if (getLevel() < rank.getLevel()) { @@ -123,7 +124,8 @@ public enum Rank implements Displayable public boolean isAdmin() { - return getType() == Type.ADMIN || getType() == Type.ADMIN_CONSOLE; + return getPermission().equalsIgnoreCase("tfm.admin") || + getPermission().equalsIgnoreCase("tfm.rcon"); } public boolean hasConsoleVariant() @@ -133,22 +135,17 @@ public enum Rank implements Displayable public Rank getConsoleVariant() { - switch (this) - { - case ADMIN: - case ADMIN_CONSOLE: - return ADMIN_CONSOLE; - case SENIOR_ADMIN: - case SENIOR_CONSOLE: - return SENIOR_CONSOLE; - default: - return null; - } + return switch (this) + { + case ADMIN, ADMIN_CONSOLE -> ADMIN_CONSOLE; + case SENIOR_ADMIN, SENIOR_CONSOLE -> SENIOR_CONSOLE; + default -> null; + }; } - public Type getType() + public String getPermission() { - return type; + return permission; } @Override @@ -196,16 +193,4 @@ public enum Rank implements Displayable { return hasDefaultLoginMessage; } - - public enum Type - { - PLAYER, - ADMIN, - ADMIN_CONSOLE; - - public boolean isAdmin() - { - return this != PLAYER; - } - } } \ No newline at end of file