Class Config
java.lang.Object
com.github.mafelp.minecraft.commands.Config
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
public class Config
extends java.lang.Object
implements org.bukkit.command.CommandExecutor
Class that implements the /config command in the minecraft chat.
-
Constructor Summary
Constructors Constructor Description Config()
-
Method Summary
Modifier and Type Method Description boolean
onCommand(@NotNull org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, @NotNull java.lang.String label, java.lang.String[] args)
The command executing task.private boolean
sendSuccessMessage(org.bukkit.command.CommandSender commandSender, Command subCommand)
Sends a success message for the subcommands 'remove' and 'add'Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 java.lang.String label, java.lang.String[] args)The command executing task.- Specified by:
onCommand
in 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.
-