8000 GitHub - o7Moon/qol-core: Quality Of Life Core
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

o7Moon/qol-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Quality Of Life Core

READ THIS IF YOU WANT YOUR MOD TO USE /UPDATE

if you make a release on github make sure the tag is like "0.0.1" and also set that version in 7B7C your .csproj, then make sure you put in your github username+repo when registering your mod

Example.cs

using BepInEx;
using BepInEx.IL2CPP;
using HarmonyLib;
using System;
using System.Collections.Generic;
using qol_core;

namespace example
{
    [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
    public class Plugin : BasePlugin
    {
        public static Mod modInstance;

        public override void Load()
        {
            Harmony.CreateAndPatchAll(typeof(Plugin));

            modInstance = Mods.RegisterMod(PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION, "An example mod.", "LualtOfficial/Example");

            Commands.RegisterCommand("test", "test", "A test command.", modInstance, TestCommand);

            Log.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
        }


        public static bool TestCommand(List<string> arguments)
        {
            qol_core.Plugin.SendMessage("Hello, world! " + string.Join(", ", arguments), modInstance);
        }
    }
}

Message

qol_core.Plugin.SendMessage("Hello, world!", modInstance);

Mods

// with updater
Mods.RegisterMod(PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION, "Description", "UserName/RepoName");
// without updater
Mods.RegisterMod(PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION, "Description");

Mods.UnregisterMod(PluginInfo.PLUGIN_NAME);
Mods.ModExists("mod-name");
Mods.GetMod("mod-name");

Commands

Commands.RegisterCommand("command-name", "/command-name (optional|optional2) [required|required2]", "description of the command", modInstance, Callback);
Commands.UnregisterCommand("mod-name:command-name");
Commands.CommandExists("mod-name:command-name");
Commands.GetCommand("mod-name:command-name");
Commands.FindName("command-name");

About

Quality Of Life Core

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%
0