Class Config
java.lang.Object
com.github.mafelp.minecraft.commands.Config
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
Class that implements the /config command in the minecraft chat.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanonCommand(@NotNull org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, @NotNull String label, String[] args)The command executing task.private booleansendSuccessMessage(org.bukkit.command.CommandSender commandSender, Command subCommand)Sends a success message for the subcommands 'remove' and 'add'
-
Constructor Details
-
Config
public Config()
-
-
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 command executing task.- Specified by:
onCommandin interfaceorg.bukkit.command.CommandExecutor- Parameters:
commandSender- The player/console who sent the command.command- The command sent by the commandSender.label- The command being passed in, aka. argument 0.args- Additional arguments passed into the command.- Returns:
- The success state of the command and if the usage text should be displayed.
-
sendSuccessMessage
private boolean sendSuccessMessage(org.bukkit.command.CommandSender commandSender, Command subCommand)Sends a success message for the subcommands 'remove' and 'add'- Parameters:
commandSender- The person who initially sent the message.subCommand- The subcommand the person executed.- Returns:
- the success of the execution.
-