Fix HelpCommand not working without static CommandsExecutor

This commit is contained in:
P0nk
2023-03-31 07:57:31 +02:00
parent 699da37f06
commit 785f74ed21
7 changed files with 33 additions and 13 deletions

View File

@@ -6,5 +6,9 @@ import server.shop.ShopFactory;
/**
* @author Ponk
*/
public record CommandContext(DropProvider dropProvider, ShopFactory shopFactory) {
public record CommandContext(CommandsExecutor commandsExecutor, DropProvider dropProvider, ShopFactory shopFactory) {
public CommandContext with(CommandsExecutor ce) {
return new CommandContext(ce, this.dropProvider, this.shopFactory);
}
}