Search in sources :

Example 1 with BaseVkActor

use of com.ubivashka.lamp.commands.vk.core.BaseVkActor in project MC-Auth-with-VK by U61vashka.

the class MessageListener method onMessage.

@EventHandler
public void onMessage(VKMessageEvent event) {
    VkHandler.getInstances().forEach((commandHandler) -> {
        CommandActor commandActor = new VKCommandActorWrapper(new BaseVkActor(event.getMessage(), commandHandler));
        ArgumentStack argumentStack = ArgumentStack.fromString(event.getMessage().getText());
        commandHandler.dispatch(commandActor, argumentStack);
    });
}
Also used : BaseVkActor(com.ubivashka.lamp.commands.vk.core.BaseVkActor) CommandActor(revxrsal.commands.command.CommandActor) VKCommandActorWrapper(me.mastercapexd.auth.link.vk.VKCommandActorWrapper) ArgumentStack(revxrsal.commands.command.ArgumentStack) EventHandler(net.md_5.bungee.event.EventHandler)

Aggregations

BaseVkActor (com.ubivashka.lamp.commands.vk.core.BaseVkActor)1 VKCommandActorWrapper (me.mastercapexd.auth.link.vk.VKCommandActorWrapper)1 EventHandler (net.md_5.bungee.event.EventHandler)1 ArgumentStack (revxrsal.commands.command.ArgumentStack)1 CommandActor (revxrsal.commands.command.CommandActor)1