use of org.spongepowered.api.network.ChannelBinding.RawDataChannel in project ChangeSkin by games647.
the class ChangeSkinSponge method onInit.
@Listener
public void onInit(GameInitializationEvent initEvent) {
if (!initialized)
return;
CommandManager cmdManager = Sponge.getCommandManager();
// command and event register
cmdManager.register(this, injector.getInstance(SelectCommand.class).buildSpec(), "skin-select", "skinselect");
cmdManager.register(this, injector.getInstance(InfoCommand.class).buildSpec(), "skin-info");
cmdManager.register(this, injector.getInstance(UploadCommand.class).buildSpec(), "skin-upload");
cmdManager.register(this, injector.getInstance(SetCommand.class).buildSpec(), "changeskin", "setskin", "skin");
cmdManager.register(this, injector.getInstance(InvalidateCommand.class).buildSpec(), "skininvalidate", "skin-invalidate");
Sponge.getEventManager().registerListeners(this, injector.getInstance(LoginListener.class));
RawDataChannel pluginChannel = Sponge.getChannelRegistrar().createRawChannel(this, PomData.ARTIFACT_ID);
pluginChannel.addListener(injector.getInstance(BungeeListener.class));
}
Aggregations