mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-08 09:27:45 +01:00
[Fix] Fix Command registration
Issue was caused by no call to registerCommands was made at runtime.
This commit is contained in:
parent
7f9146fcf4
commit
ade810ca8c
@ -88,7 +88,6 @@ class BukkitPlanModule {
|
||||
@Singleton
|
||||
@Named("mainCommand")
|
||||
CommandNode provideMainCommand(PlanCommand command) {
|
||||
command.registerCommands();
|
||||
return command;
|
||||
}
|
||||
}
|
||||
@ -132,7 +131,9 @@ public class Plan extends BukkitPlugin implements PlanPlugin {
|
||||
logger.error("This error should be reported at https://github.com/Rsl1122/Plan-PlayerAnalytics/issues");
|
||||
onDisable();
|
||||
}
|
||||
registerCommand("plan", component.planCommand());
|
||||
PlanCommand command = component.planCommand();
|
||||
command.registerCommands();
|
||||
registerCommand("plan", command);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,7 +69,6 @@ class BungeePlanModule {
|
||||
@Singleton
|
||||
@Named("mainCommand")
|
||||
CommandNode provideMainCommand(PlanBungeeCommand command) {
|
||||
command.registerCommands();
|
||||
return command;
|
||||
}
|
||||
}
|
||||
@ -113,7 +112,9 @@ public class PlanBungee extends BungeePlugin implements PlanPlugin {
|
||||
logger.error("This error should be reported at https://github.com/Rsl1122/Plan-PlayerAnalytics/issues");
|
||||
onDisable();
|
||||
}
|
||||
registerCommand("planbungee", component.planCommand());
|
||||
PlanBungeeCommand command = component.planCommand();
|
||||
command.registerCommands();
|
||||
registerCommand("planbungee", command);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,7 +76,6 @@ class SpongePlanModule {
|
||||
@Singleton
|
||||
@Named("mainCommand")
|
||||
CommandNode provideMainCommand(PlanCommand command) {
|
||||
command.registerCommands();
|
||||
return command;
|
||||
}
|
||||
}
|
||||
@ -134,7 +133,9 @@ public class PlanSponge extends SpongePlugin implements PlanPlugin {
|
||||
slf4jLogger.error("This error should be reported at https://github.com/Rsl1122/Plan-PlayerAnalytics/issues");
|
||||
onDisable();
|
||||
}
|
||||
registerCommand("plan", component.planCommand());
|
||||
PlanCommand command = component.planCommand();
|
||||
command.registerCommands();
|
||||
registerCommand("plan", command);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ import com.djrapitops.plugin.command.TreeCmdNode;
|
||||
import dagger.Lazy;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
/**
|
||||
* TreeCommand for the /plan command, and all subcommands.
|
||||
@ -22,6 +23,7 @@ import javax.inject.Inject;
|
||||
* @author Rsl1122
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Singleton
|
||||
public class PlanBungeeCommand extends TreeCmdNode {
|
||||
|
||||
private final NetworkCommand networkCommand;
|
||||
|
@ -12,6 +12,7 @@ import com.djrapitops.plugin.command.TreeCmdNode;
|
||||
import dagger.Lazy;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
/**
|
||||
* TreeCommand for the /plan command, and all SubCommands.
|
||||
@ -21,6 +22,7 @@ import javax.inject.Inject;
|
||||
* @author Rsl1122
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Singleton
|
||||
public class PlanCommand extends TreeCmdNode {
|
||||
|
||||
private final PlanConfig config;
|
||||
|
Loading…
Reference in New Issue
Block a user