more missing documentations

This commit is contained in:
Samuel Pizette
2022-12-11 14:17:16 -05:00
parent 8424baa285
commit 01aa1e708a
2 changed files with 15 additions and 8 deletions

View File

@@ -55,6 +55,12 @@ public interface CommandBase {
*/
@NotNull List<CommandBase> getSubcommands();
/**
* Intended for returning the enclosing CommandBase,
* when this instance is serving as the delegate command base.
*
* @return the wrapping object of this delegate.
*/
@NotNull CommandBase getWrapped();
/**

View File

@@ -1,6 +1,5 @@
package com.willfp.eco.core.command.impl;
import java.util.List;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginIdentifiableCommand;
@@ -9,12 +8,14 @@ import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Deprecated(forRemoval = true)
import java.util.List;
/**
* Delegates a bukkit command to an eco command (for registrations).
*/
@Deprecated(forRemoval = true)
public final class DelegatedBukkitCommand extends Command implements TabCompleter,
PluginIdentifiableCommand {
PluginIdentifiableCommand {
/**
* The delegate command.
@@ -34,16 +35,16 @@ public final class DelegatedBukkitCommand extends Command implements TabComplete
@Override
public boolean execute(@NotNull final CommandSender commandSender,
@NotNull final String label,
@NotNull final String[] args) {
@NotNull final String label,
@NotNull final String[] args) {
return false;
}
@Override
public List<String> onTabComplete(@NotNull final CommandSender commandSender,
@NotNull final Command command,
@NotNull final String label,
@NotNull final String[] args) {
@NotNull final Command command,
@NotNull final String label,
@NotNull final String[] args) {
return List.of();
}