25 lines
478 B
Java
25 lines
478 B
Java
package mc.server.di;
|
|
|
|
import dagger.Module;
|
|
import dagger.Provides;
|
|
import mc.protocol.handler.ProtocolHandlersBus;
|
|
import mc.server.NettyServer;
|
|
|
|
import javax.inject.Singleton;
|
|
|
|
@Module
|
|
public class ServerModule {
|
|
|
|
@Provides
|
|
@Singleton
|
|
ProtocolHandlersBus providePacketProcessor() {
|
|
return new ProtocolHandlersBus();
|
|
}
|
|
|
|
@Provides
|
|
@Singleton
|
|
NettyServer provideNettyServer(ProtocolHandlersBus protocolHandlersBus) {
|
|
return new NettyServer(protocolHandlersBus);
|
|
}
|
|
}
|