Class AccountCommand
java.lang.Object
com.github.mafelp.minecraft.commands.AccountCommand
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
The class that is being called on the execution of the command
/account
, executed as a minecraft player.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
incidentReport(@NotNull org.bukkit.command.CommandSender commandSender, Command cmd)
The method used to check thePermissions
:accountEdit
of a command Sender.boolean
onCommand(@NotNull org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, @NotNull String label, String[] args)
The method that handles the execution of the command.
-
Constructor Details
-
AccountCommand
public AccountCommand()
-
-
Method Details
-
onCommand
public boolean onCommand(@NotNull @NotNull org.bukkit.command.CommandSender commandSender, @NotNull org.bukkit.command.Command command, @NotNull @NotNull String label, String[] args)The method that handles the execution of the command.- Specified by:
onCommand
in interfaceorg.bukkit.command.CommandExecutor
- Parameters:
commandSender
- The Player (or console) who executed this command.command
- The command that the Player (or console) executed. In this case:account
label
- The label of the command.args
- Additional arguments passed into the command.- Returns:
- If the command was executed successfully and if not displays the usage message.
-
incidentReport
private static boolean incidentReport(@NotNull @NotNull org.bukkit.command.CommandSender commandSender, Command cmd)The method used to check thePermissions
:accountEdit
of a command Sender.- Parameters:
commandSender
- The command sender to check the permission of.cmd
- The command that will be shown into the console, if the permission is denied.- Returns:
- If the permission was granted.
-