mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 06:28:54 +00:00
Delegate sponge and velocity player suggestions
This commit is contained in:
2 files changed
+6
No files matched your search
@@ -22,6 +22,8 @@ package net.draycia.carbon.sponge;
|
||||
import cloud.commandframework.CommandManager;
|
||||
import cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator;
|
||||
import cloud.commandframework.sponge.SpongeCommandManager;
|
||||
import cloud.commandframework.sponge.argument.SingleEntitySelectorArgument;
|
||||
import cloud.commandframework.sponge.argument.SinglePlayerSelectorArgument;
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Provides;
|
||||
import com.google.inject.Singleton;
|
||||
@@ -87,6 +89,7 @@ public final class CarbonChatSpongeModule extends AbstractModule {
|
||||
this.bind(Path.class).annotatedWith(ForCarbon.class).toInstance(this.configDir);
|
||||
this.bind(CarbonChat.class).toInstance(this.carbonChat);
|
||||
this.bind(CarbonServer.class).to(CarbonServerSponge.class);
|
||||
this.bind(PlayerSuggestions.class).toInstance(new SinglePlayerSelectorArgument.Parser<Commander>()::suggestions);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,7 @@ package net.draycia.carbon.velocity;
|
||||
import cloud.commandframework.CommandManager;
|
||||
import cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator;
|
||||
import cloud.commandframework.velocity.VelocityCommandManager;
|
||||
import cloud.commandframework.velocity.arguments.PlayerArgument;
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Provides;
|
||||
import com.google.inject.Singleton;
|
||||
@@ -34,6 +35,7 @@ import net.draycia.carbon.api.CarbonServer;
|
||||
import net.draycia.carbon.common.CarbonCommonModule;
|
||||
import net.draycia.carbon.common.ForCarbon;
|
||||
import net.draycia.carbon.common.command.Commander;
|
||||
import net.draycia.carbon.common.command.argument.PlayerSuggestions;
|
||||
import net.draycia.carbon.velocity.command.VelocityCommander;
|
||||
import net.draycia.carbon.velocity.command.VelocityPlayerCommander;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -94,6 +96,7 @@ public final class CarbonChatVelocityModule extends AbstractModule {
|
||||
this.bind(Logger.class).toInstance(this.logger);
|
||||
this.bind(Path.class).annotatedWith(ForCarbon.class).toInstance(this.dataDirectory);
|
||||
this.bind(CarbonServer.class).to(CarbonServerVelocity.class);
|
||||
this.bind(PlayerSuggestions.class).toInstance(new PlayerArgument.PlayerParser<Commander>()::suggestions);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user