Class AccountCommand

java.lang.Object
com.github.mafelp.minecraft.commands.AccountCommand
All Implemented Interfaces:
org.bukkit.command.CommandExecutor

public class AccountCommand
extends java.lang.Object
implements org.bukkit.command.CommandExecutor
The class that is being called on the execution of the command /account, executed as a minecraft player.
  • Constructor Summary

    Constructors
    Constructor Description
    AccountCommand()  
  • Method Summary

    Modifier and Type Method Description
    private static boolean incidentReport​(@NotNull org.bukkit.command.CommandSender commandSender, Command cmd)
    The method used to check the Permissions: accountEdit of a command Sender.
    boolean onCommand​(@NotNull org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, @NotNull java.lang.String label, java.lang.String[] args)
    The method that handles the execution of the command.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 java.lang.String label, java.lang.String[] args)
      The method that handles the execution of the command.
      Specified by:
      onCommand in interface org.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 the Permissions: 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.