mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
Implemenn
ababa stuff
This commit is contained in:
parent
67b0656e61
commit
ea60be4c48
7
pom.xml
7
pom.xml
@ -203,6 +203,13 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.essentialsx</groupId>
|
||||||
|
<artifactId>EssentialsXDiscord</artifactId>
|
||||||
|
<version>2.19.2</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.javassist</groupId>
|
<groupId>org.javassist</groupId>
|
||||||
<artifactId>javassist</artifactId>
|
<artifactId>javassist</artifactId>
|
||||||
|
@ -8,7 +8,7 @@ import me.totalfreedom.totalfreedommod.rank.Rank;
|
|||||||
public @interface CommandPermissions
|
public @interface CommandPermissions
|
||||||
{
|
{
|
||||||
|
|
||||||
Rank level() default Rank.NON_OP;
|
Rank rank() default Rank.NON_OP;
|
||||||
|
|
||||||
SourceType source() default SourceType.BOTH;
|
SourceType source() default SourceType.BOTH;
|
||||||
|
|
||||||
|
@ -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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Talk privately with other admins on the server.", usage = "/<command> [message]", aliases = "o,sc,ac,staffchat")
|
@CommandParameters(description = "Talk privately with other admins on the server.", usage = "/<command> [message]", aliases = "o,sc,ac,staffchat")
|
||||||
public class Command_adminchat extends FreedomCommand
|
public class Command_adminchat 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.OP, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "si,ai,staffinfo")
|
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "si,ai,staffinfo")
|
||||||
public class Command_admininfo extends FreedomCommand
|
public class Command_admininfo 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Denies joining of operators and only allows admins to join.", usage = "/<command> [on | off]", aliases = "staffmode")
|
@CommandParameters(description = "Denies joining of operators and only allows admins to join.", usage = "/<command> [on | off]", aliases = "staffmode")
|
||||||
public class Command_adminmode extends FreedomCommand
|
public class Command_adminmode 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.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.",
|
@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 = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
||||||
aliases = "sw,aw,staffworld")
|
aliases = "sw,aw,staffworld")
|
||||||
|
@ -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.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 = "/<command> <[partialname] | -a>", aliases = "gma")
|
@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 = "/<command> <[partialname] | -a>", aliases = "gma")
|
||||||
public class Command_adventure extends FreedomCommand
|
public class Command_adventure extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import java.util.Arrays;
|
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 = "/<command>")
|
@CommandParameters(description = "Lists all possible attributes.", usage = "/<command>")
|
||||||
public class Command_attributelist extends FreedomCommand
|
public class Command_attributelist 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.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 = "/<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.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 = "/<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
|
||||||
{
|
{
|
||||||
|
@ -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.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(rank = 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.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.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 = "/<command> [purge]")
|
@CommandParameters(description = "Shows all banned player names. Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
|
||||||
public class Command_banlist extends FreedomCommand
|
public class Command_banlist extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -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.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,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.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 = "/<command>")
|
@CommandParameters(description = "Spawns a random type of fish at your location.", usage = "/<command>")
|
||||||
public class Command_bird extends FreedomCommand
|
public class Command_bird 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.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 = "/<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
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
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 = "/<command> [<player> [reason] | list | purge | all]")
|
@CommandParameters(description = "Restricts/restores block modification abilities for everyone on the server or a certain player.", usage = "/<command> [<player> [reason] | list | purge | all]")
|
||||||
public class Command_blockedit extends FreedomCommand
|
public class Command_blockedit 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.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 = "/<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.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 = "/<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
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Minecart;
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.entity.Player;
|
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 = "/<command> [partialname]")
|
@CommandParameters(description = "Sit in nearest minecart. If target is in a minecart already, they will disembark.", usage = "/<command> [partialname]")
|
||||||
public class Command_cartsit extends FreedomCommand
|
public class Command_cartsit 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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_cleanchat extends FreedomCommand
|
public class Command_cleanchat 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.ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Clear the discord message queue.", usage = "/<command>")
|
@CommandParameters(description = "Clear the discord message queue.", usage = "/<command>")
|
||||||
public class Command_cleardiscordqueue extends FreedomCommand
|
public class Command_cleardiscordqueue 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.OP, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Clear your inventory.", usage = "/<command> [player]", aliases = "ci,clear")
|
@CommandParameters(description = "Clear your inventory.", usage = "/<command> [player]", aliases = "ci,clear")
|
||||||
public class Command_clearinventory extends FreedomCommand
|
public class Command_clearinventory 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Obtain a clown fish", usage = "/<command>")
|
@CommandParameters(description = "Obtain a clown fish", usage = "/<command>")
|
||||||
public class Command_clownfish extends FreedomCommand
|
public class Command_clownfish 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.ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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 = "/<command> [player] | pay <player> <amount>")
|
@CommandParameters(description = "Shows the amount of coins you or another player has. Also allows you to give coins to other players.", usage = "/<command> [player] | pay <player> <amount>")
|
||||||
public class Command_coins extends FreedomCommand
|
public class Command_coins 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.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 = "/<command> <color>")
|
@CommandParameters(description = "Essentials Interface Command - Set your nickname to a certain color.", usage = "/<command> <color>")
|
||||||
public class Command_colorme extends FreedomCommand
|
public class Command_colorme 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.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 = "/<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.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 = "/<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
|
||||||
{
|
{
|
||||||
|
@ -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.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 = "/<command> <-a | [partialname]>", aliases = "gmc")
|
@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 = "/<command> <-a | [partialname]>", aliases = "gmc")
|
||||||
public class Command_creative extends FreedomCommand
|
public class Command_creative extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Makes random sounds.", usage = "/<command>")
|
@CommandParameters(description = "Makes random sounds.", usage = "/<command>")
|
||||||
public class Command_deafen extends FreedomCommand
|
public class Command_deafen extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Get a stick of happiness.", usage = "/<command>")
|
@CommandParameters(description = "Get a stick of happiness.", usage = "/<command>")
|
||||||
public class Command_debugstick extends FreedomCommand
|
public class Command_debugstick 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.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 = "/<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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(rank = 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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 = "/<command> <radius> <comma,separated,items>")
|
@CommandParameters(description = "Fill nearby dispensers with a set of items of your choice.", usage = "/<command> <radius> <comma,separated,items>")
|
||||||
public class Command_dispfill extends FreedomCommand
|
public class Command_dispfill extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.util.Vector;
|
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 = "/<command> <playername> [reason]")
|
@CommandParameters(description = "Sends the specified player to their doom.", usage = "/<command> <playername> [reason]")
|
||||||
public class Command_doom extends FreedomCommand
|
public class Command_doom 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.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 = "/<command>")
|
@CommandParameters(description = "Eject any entities that are riding you.", usage = "/<command>")
|
||||||
public class Command_eject extends FreedomCommand
|
public class Command_eject extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ import org.bukkit.enchantments.Enchantment;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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 = "/<command> <list | addall | reset | add <name> [level] | remove <name>>")
|
@CommandParameters(description = "Enchant items.", usage = "/<command> <list | addall | reset | add <name> [level] | remove <name>>")
|
||||||
public class Command_enchant extends FreedomCommand
|
public class Command_enchant 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.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Go to \"The End\".", usage = "/<command>")
|
@CommandParameters(description = "Go to \"The End\".", usage = "/<command>")
|
||||||
public class Command_end extends FreedomCommand
|
public class Command_end 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.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 = "/<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.ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.util.Vector;
|
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 = "/<command> <player>")
|
@CommandParameters(description = "Surprise someone.", usage = "/<command> <player>")
|
||||||
public class Command_explode extends FreedomCommand
|
public class Command_explode 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.ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Obtain a fire ball", usage = "/<command>")
|
@CommandParameters(description = "Obtain a fire ball", usage = "/<command>")
|
||||||
public class Command_fireball extends FreedomCommand
|
public class Command_fireball 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.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Go to the Flatlands.", usage = "/<command>")
|
@CommandParameters(description = "Go to the Flatlands.", usage = "/<command>")
|
||||||
public class Command_flatlands extends FreedomCommand
|
public class Command_flatlands 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.OP, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Forcefully kill someone - for those who REALLY need to die.", usage = "/<command> <playername>")
|
@CommandParameters(description = "Forcefully kill someone - for those who REALLY need to die.", usage = "/<command> <playername>")
|
||||||
public class Command_forcekill extends FreedomCommand
|
public class Command_forcekill 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.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 = "/<command> [target | purge]", aliases = "fr")
|
@CommandParameters(description = "Freeze/Unfreeze a specified player, or all non-admins on the server.", usage = "/<command> [target | purge]", aliases = "fr")
|
||||||
public class Command_freeze extends FreedomCommand
|
public class Command_freeze 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.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 = "/<command> <on [radius (default=25)] | off>")
|
@CommandParameters(description = "You'll never even see it coming - repeatedly push players away from you until command is untoggled.", usage = "/<command> <on [radius (default=25)] | off>")
|
||||||
public class Command_fuckoff extends FreedomCommand
|
public class Command_fuckoff 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.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Send a command as someone else.", usage = "/<command> <fromname> <outcommand>")
|
@CommandParameters(description = "Send a command as someone else.", usage = "/<command> <fromname> <outcommand>")
|
||||||
public class Command_gcmd extends FreedomCommand
|
public class Command_gcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
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 = "/<command>")
|
@CommandParameters(description = "Toggles the glowing outline effect because y'all lazy as fuck", usage = "/<command>")
|
||||||
public class Command_glow extends FreedomCommand
|
public class Command_glow 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Obtain a grappling hook", usage = "/<command>")
|
@CommandParameters(description = "Obtain a grappling hook", usage = "/<command>")
|
||||||
public class Command_grapplinghook extends FreedomCommand
|
public class Command_grapplinghook 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Toggles player gravity on/off.", usage = "/<command>")
|
@CommandParameters(description = "Toggles player gravity on/off.", usage = "/<command>")
|
||||||
public class Command_gravity extends FreedomCommand
|
public class Command_gravity 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.OP, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.OP, 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
|
||||||
{
|
{
|
||||||
|
@ -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.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(rank = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Reload the indefinite ban list.", usage = "/<command> <reload>", aliases = "ib")
|
@CommandParameters(description = "Reload the indefinite ban list.", usage = "/<command> <reload>", aliases = "ib")
|
||||||
public class Command_indefban extends FreedomCommand
|
public class Command_indefban 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Block inspector tool for operators.", usage = "/<command> [history] [page]", aliases = "ins")
|
@CommandParameters(description = "Block inspector tool for operators.", usage = "/<command> [history] [page]", aliases = "ins")
|
||||||
public class Command_inspect extends FreedomCommand
|
public class Command_inspect extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
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 = "/<command> [clear]")
|
@CommandParameters(description = "Shows (optionally clears) invisible players", usage = "/<command> [clear]")
|
||||||
public class Command_invis extends FreedomCommand
|
public class Command_invis extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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 = "/<command> <player> [offhand | armor]", aliases = "inv,insee")
|
@CommandParameters(description = "Look into another player's inventory, or optionally take items out.", usage = "/<command> <player> [offhand | armor]", aliases = "inv,insee")
|
||||||
public class Command_invsee extends FreedomCommand
|
public class Command_invsee extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -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.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 = "/<command> <on | off | info | sideways <on | off>>", aliases = "launchpads,jp")
|
@CommandParameters(description = "Toggles jumppads on/off, view the status of jumppads, or make them sideways.", usage = "/<command> <on | off | info | sideways <on | off>>", aliases = "launchpads,jp")
|
||||||
public class Command_jumppads extends FreedomCommand
|
public class Command_jumppads 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kick all non-admins on server.", usage = "/<command>", aliases = "kickall")
|
@CommandParameters(description = "Kick all non-admins on server.", usage = "/<command>", aliases = "kickall")
|
||||||
public class Command_kicknoob extends FreedomCommand
|
public class Command_kicknoob 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Set a landmine trap.", usage = "/<command>")
|
@CommandParameters(description = "Set a landmine trap.", usage = "/<command>")
|
||||||
public class Command_landmine extends FreedomCommand
|
public class Command_landmine 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Obtain a lightning rod", usage = "/<command>")
|
@CommandParameters(description = "Obtain a lightning rod", usage = "/<command>")
|
||||||
public class Command_lightningrod extends FreedomCommand
|
public class Command_lightningrod 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.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 = "/<command> [<name> <id>]")
|
@CommandParameters(description = "Link your Discord account to your Minecraft account", usage = "/<command> [<name> <id>]")
|
||||||
public class Command_linkdiscord extends FreedomCommand
|
public class Command_linkdiscord extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.configuration.ConfigurationSection;
|
|||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
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 = "/<command>", aliases = "link")
|
@CommandParameters(description = "See TotalFreedom's social media links.", usage = "/<command>", aliases = "link")
|
||||||
public class Command_links extends FreedomCommand
|
public class Command_links extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.util.List;
|
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 = "/<command> [-a | -v]", aliases = "who,lsit")
|
@CommandParameters(description = "Lists the real names of all online players.", usage = "/<command> [-a | -v]", aliases = "who,lsit")
|
||||||
public class Command_list extends FreedomCommand
|
public class Command_list 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.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 = "/<command>", aliases = "worldspawn,gotospawn")
|
@CommandParameters(description = "Teleport to the spawn point for the current world, instead of the Essentials spawn point.", usage = "/<command>", aliases = "worldspawn,gotospawn")
|
||||||
public class Command_localspawn extends FreedomCommand
|
public class Command_localspawn extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,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.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 = "/<command> <all | purge | <<partialname> on | off> [-q]>")
|
@CommandParameters(description = "This is evil, and I never should have wrote it - blocks specified player's input.", usage = "/<command> <all | purge | <<partialname> on | off> [-q]>")
|
||||||
public class Command_lockup extends FreedomCommand
|
public class Command_lockup 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Change your login message", usage = "/<command> [message]")
|
@CommandParameters(description = "Change your login message", usage = "/<command> [message]")
|
||||||
public class Command_loginmessage extends FreedomCommand
|
public class Command_loginmessage 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage the shop", usage = "/<command> <coins: <add | set | remove> <amount> <player | all> | items: <give | take> <item> <player>", aliases = "ms")
|
@CommandParameters(description = "Manage the shop", usage = "/<command> <coins: <add | set | remove> <amount> <player | all> | items: <give | take> <item> <player>", aliases = "ms")
|
||||||
public class Command_manageshop extends FreedomCommand
|
public class Command_manageshop 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.OP, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Information on how to apply for Master Builder.", usage = "/<command>", aliases = "mbi")
|
@CommandParameters(description = "Information on how to apply for Master Builder.", usage = "/<command>", aliases = "mbi")
|
||||||
public class Command_masterbuilderinfo extends FreedomCommand
|
public class Command_masterbuilderinfo 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.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.",
|
@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 = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
||||||
aliases = "mbw,mbworld")
|
aliases = "mbw,mbworld")
|
||||||
|
@ -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.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 = "/<command> <list | clearip <ip> | clearips | <<add | remove> <username>>>")
|
@CommandParameters(description = "List, add, or remove master builders. Master builders can also clear their own IPs.", usage = "/<command> <list | clearip <ip> | clearips | <<add | remove> <username>>>")
|
||||||
public class Command_mbconfig extends FreedomCommand
|
public class Command_mbconfig 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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 = "/<command> <draw | sling>")
|
@CommandParameters(description = "Modern weaponry, FTW. Use 'draw' to start firing, 'sling' to stop firing.", usage = "/<command> <draw | sling>")
|
||||||
public class Command_mp44 extends FreedomCommand
|
public class Command_mp44 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Manage your admin entry.", usage = "/<command> [-o <admin name>] <clearips | clearip <ip> | setscformat <format> | clearscformat> | syncroles>")
|
@CommandParameters(description = "Manage your admin entry.", usage = "/<command> [-o <admin name>] <clearips | clearip <ip> | setscformat <format> | clearscformat> | syncroles>")
|
||||||
public class Command_myadmin extends FreedomCommand
|
public class Command_myadmin 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Check your personal data", usage = "/<command>")
|
@CommandParameters(description = "Check your personal data", usage = "/<command>")
|
||||||
public class Command_myinfo extends FreedomCommand
|
public class Command_myinfo 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.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Go to the Nether.", usage = "/<command>", aliases = "hell")
|
@CommandParameters(description = "Go to the Nether.", usage = "/<command>", aliases = "hell")
|
||||||
public class Command_nether extends FreedomCommand
|
public class Command_nether 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.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 = "/<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
|
||||||
{
|
{
|
||||||
|
@ -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.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 !.",
|
@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 = "/<command> <other_command> !<playernick>",
|
usage = "/<command> <other_command> !<playernick>",
|
||||||
aliases = "nf")
|
aliases = "nf")
|
||||||
|
@ -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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Rainbowify your nickname.", usage = "/<command> <hex> <hex> <nick>", aliases = "nickgr")
|
@CommandParameters(description = "Essentials Interface Command - Rainbowify your nickname.", usage = "/<command> <hex> <hex> <nick>", aliases = "nickgr")
|
||||||
public class Command_nickgradient extends FreedomCommand
|
public class Command_nickgradient extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import java.util.Arrays;
|
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 = "/<command> <<nick> | off>")
|
@CommandParameters(description = "Essentials Interface Command - Randomize the colors of your nickname.", usage = "/<command> <<nick> | off>")
|
||||||
public class Command_nicknyan extends FreedomCommand
|
public class Command_nicknyan 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.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Rainbowify your nickname.", usage = "/<command> <nick>")
|
@CommandParameters(description = "Essentials Interface Command - Rainbowify your nickname.", usage = "/<command> <nick>")
|
||||||
public class Command_nickrainbow extends FreedomCommand
|
public class Command_nickrainbow 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.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -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.OP, source = SourceType.BOTH, cooldown = 5)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH, cooldown = 5)
|
||||||
@CommandParameters(description = "OP a player", usage = "/<command> <partialname>")
|
@CommandParameters(description = "OP a player", usage = "/<command> <partialname>")
|
||||||
public class Command_op extends FreedomCommand
|
public class Command_op 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.OP, source = SourceType.BOTH, cooldown = 30)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH, cooldown = 30)
|
||||||
@CommandParameters(description = "OP everyone on the server.", usage = "/<command>")
|
@CommandParameters(description = "OP everyone on the server.", usage = "/<command>")
|
||||||
public class Command_opall extends FreedomCommand
|
public class Command_opall 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.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "OPs the command sender.", usage = "/<command>")
|
@CommandParameters(description = "OPs the command sender.", usage = "/<command>")
|
||||||
public class Command_opme extends FreedomCommand
|
public class Command_opme 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.OP, source = SourceType.BOTH)
|
@CommandPermissions(rank = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage operators", usage = "/<command> <count | purge>")
|
@CommandParameters(description = "Manage operators", usage = "/<command> <count | purge>")
|
||||||
public class Command_ops extends FreedomCommand
|
public class Command_ops extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,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.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.",
|
@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.ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(rank = 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
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
@ -23,6 +19,9 @@ import org.bukkit.util.StringUtil;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.lang.annotation.AnnotationFormatError;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
||||||
{
|
{
|
||||||
public static final String COMMAND_PREFIX = "Command_";
|
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 description;
|
||||||
private final String usage;
|
private final String usage;
|
||||||
private final String aliases;
|
private final String aliases;
|
||||||
private final Rank level;
|
private final Rank rank;
|
||||||
|
private final String permission;
|
||||||
private final SourceType source;
|
private final SourceType source;
|
||||||
private final boolean blockHostConsole;
|
private final boolean blockHostConsole;
|
||||||
private final int cooldown;
|
private final int cooldown;
|
||||||
@ -50,16 +50,23 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
|
|
||||||
FreedomCommand()
|
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);
|
params = getClass().getAnnotation(CommandParameters.class);
|
||||||
perms = getClass().getAnnotation(CommandPermissions.class);
|
perms = getClass().getAnnotation(CommandPermissions.class);
|
||||||
this.name = getClass().getSimpleName().replace(COMMAND_PREFIX, "").toLowerCase();
|
this.name = getClass().getSimpleName().replace(COMMAND_PREFIX, "").toLowerCase();
|
||||||
this.description = params.description();
|
this.description = params.description();
|
||||||
this.usage = params.usage();
|
this.usage = params.usage();
|
||||||
this.aliases = params.aliases();
|
this.aliases = params.aliases();
|
||||||
this.level = perms.level();
|
this.rank = perms.rank();
|
||||||
this.source = perms.source();
|
this.source = perms.source();
|
||||||
this.blockHostConsole = perms.blockHostConsole();
|
this.blockHostConsole = perms.blockHostConsole();
|
||||||
this.cooldown = perms.cooldown();
|
this.cooldown = perms.cooldown();
|
||||||
|
this.permission = perms.rank().getPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FreedomCommand getFrom(Command command)
|
public static FreedomCommand getFrom(Command command)
|
||||||
@ -70,8 +77,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
{
|
{
|
||||||
return ((FCommand) command).getExecutor();
|
return ((FCommand) command).getExecutor();
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception ex)
|
||||||
catch (Exception ex)
|
|
||||||
{
|
{
|
||||||
FLog.severe(ex);
|
FLog.severe(ex);
|
||||||
return null;
|
return null;
|
||||||
@ -80,11 +86,6 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCommandPrefix()
|
|
||||||
{
|
|
||||||
return COMMAND_PREFIX;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void register()
|
public void register()
|
||||||
{
|
{
|
||||||
FCommand cmd = new FCommand(this.name);
|
FCommand cmd = new FCommand(this.name);
|
||||||
@ -100,6 +101,10 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
{
|
{
|
||||||
cmd.setUsage(this.usage);
|
cmd.setUsage(this.usage);
|
||||||
}
|
}
|
||||||
|
if (this.rank != null)
|
||||||
|
{
|
||||||
|
cmd.setPermission(this.rank.getPermission());
|
||||||
|
}
|
||||||
server.getCommandMap().register("totalfreedommod", cmd);
|
server.getCommandMap().register("totalfreedommod", cmd);
|
||||||
cmd.setExecutor(this);
|
cmd.setExecutor(this);
|
||||||
}
|
}
|
||||||
@ -172,14 +177,13 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
{
|
{
|
||||||
try
|
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)
|
if (!run)
|
||||||
{
|
{
|
||||||
msg(ChatColor.WHITE + cmd.getUsage().replace("<command>", cmd.getLabel()));
|
msg(ChatColor.WHITE + cmd.getUsage().replace("<command>", cmd.getLabel()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
} catch (CommandFailException ex)
|
||||||
catch (CommandFailException ex)
|
|
||||||
{
|
{
|
||||||
msg(ChatColor.RED + ex.getMessage());
|
msg(ChatColor.RED + ex.getMessage());
|
||||||
}
|
}
|
||||||
@ -274,9 +278,9 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
return aliases;
|
return aliases;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rank getLevel()
|
public Rank getRank()
|
||||||
{
|
{
|
||||||
return level;
|
return rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SourceType getSource()
|
public SourceType getSource()
|
||||||
@ -289,21 +293,6 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
return blockHostConsole;
|
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
|
public final class FCommand extends Command implements PluginIdentifiableCommand
|
||||||
{
|
{
|
||||||
private FreedomCommand cmd = null;
|
private FreedomCommand cmd = null;
|
||||||
@ -313,7 +302,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
super(command);
|
super(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final FreedomCommand getExecutor()
|
public FreedomCommand getExecutor()
|
||||||
{
|
{
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
@ -323,35 +312,37 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
this.cmd = cmd;
|
this.cmd = cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel, String[] args)
|
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())
|
cmd.sender = sender;
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (func1())
|
if (cooldownCheck())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (func2())
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
func3();
|
|
||||||
|
|
||||||
return cmd.onCommand(sender, this, commandLabel, args);
|
|
||||||
}
|
}
|
||||||
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)
|
if (perms.source() == SourceType.ONLY_CONSOLE && sender instanceof Player)
|
||||||
{
|
{
|
||||||
@ -368,11 +359,11 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,7 +375,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void func3()
|
public void assignApplicableCooldown()
|
||||||
{
|
{
|
||||||
if (perms.cooldown() != 0 && !isAdmin(sender))
|
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))
|
if (COOLDOWN_TIMERS.containsKey(sender) && COOLDOWN_TIMERS.containsValue(cmd))
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user