Clean up some Bukkit code

This commit is contained in:
Alexander Söderberg 2020-09-07 12:12:56 +02:00
parent 62abfa5e95
commit a8d3fa7c5e
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
7 changed files with 82 additions and 6 deletions

View file

@ -29,10 +29,21 @@ import org.bukkit.plugin.Plugin;
import javax.annotation.Nonnull;
import java.util.function.Function;
/**
* Command manager for the Bukkit platform, using {@link BukkitCommandSender} as the
* command sender type
*/
public class BukkitCommandManager extends CommandManager<BukkitCommandSender> {
private final Plugin owningPlugin;
/**
* Construct a new Bukkit command manager
*
* @param owningPlugin Plugin that is constructing the manager
* @param commandExecutionCoordinator Coordinator provider
* @throws Exception If the construction of the manager fails
*/
public BukkitCommandManager(@Nonnull final Plugin owningPlugin,
@Nonnull final Function<CommandTree<BukkitCommandSender>,
CommandExecutionCoordinator<BukkitCommandSender>> commandExecutionCoordinator)
@ -42,6 +53,11 @@ public class BukkitCommandManager extends CommandManager<BukkitCommandSender> {
this.owningPlugin = owningPlugin;
}
/**
* Get the plugin that owns the manager
*
* @return Owning plugin
*/
@Nonnull
public Plugin getOwningPlugin() {
return this.owningPlugin;