+ Added lua user and stats

This commit is contained in:
Matthew Cech
2019-04-21 01:29:23 -07:00
parent 6d1b4aa9f3
commit b01b4be00f
6 changed files with 52 additions and 22 deletions
+4 -6
View File
@@ -3,6 +3,7 @@ package main;
import javax.security.auth.login.LoginException;
import core.*;
import core.lua.PluginManager;
import core.lua.PluginUser;
import dataStructures.KittyChannel;
import dataStructures.KittyGuild;
import dataStructures.KittyRole;
@@ -52,7 +53,7 @@ public class Main extends ListenerAdapter
@Override
public void onGuildMessageReceived(GuildMessageReceivedEvent event)
{
{
// Tweak the event as necessary
if(!PreProcessSetup(event))
return;
@@ -71,19 +72,16 @@ public class Main extends ListenerAdapter
return;
// Track beans!
user.ChangeBeans(1);
user.ChangeBeans(1);
// RP logging system
RPManager.instance.addLine(channel, user, input);
//
// Attempt to spin up a command. If the command doesn't exist.
// Run plugins right before invoking the commands but after all other setup.
if(commandManager.InvokeOnNewThread(guild, channel, user, input, response) == false)
{
String pluginOutput = pluginManager.RunAll(input.message);
String pluginOutput = pluginManager.RunAll(input.message, user);
if(pluginOutput != null)
response.Call(pluginOutput);