adapt: adapt GMLIB v0.12.6
This commit is contained in:
+34
-3
@@ -1,9 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <ll/api/plugin/NativePlugin.h>
|
||||
#include "Config.h"
|
||||
#include "Global.h"
|
||||
|
||||
namespace InventoryCheck {
|
||||
|
||||
[[nodiscard]] auto getSelfPluginInstance() -> ll::plugin::NativePlugin&;
|
||||
using namespace GMLIB::Files::I18n;
|
||||
|
||||
class Entry {
|
||||
|
||||
public:
|
||||
static std::unique_ptr<Entry>& getInstance();
|
||||
|
||||
Entry(ll::plugin::NativePlugin& self) : mSelf(self) {}
|
||||
|
||||
[[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; }
|
||||
|
||||
/// @return True if the plugin is loaded successfully.
|
||||
bool load();
|
||||
|
||||
/// @return True if the plugin is enabled successfully.
|
||||
bool enable();
|
||||
|
||||
/// @return True if the plugin is disabled successfully.
|
||||
bool disable();
|
||||
|
||||
/// @return True if the plugin is unloaded successfully.
|
||||
bool unload();
|
||||
|
||||
Config& getConfig();
|
||||
|
||||
LangI18n& getI18n();
|
||||
|
||||
private:
|
||||
ll::plugin::NativePlugin& mSelf;
|
||||
std::optional<Config> mConfig;
|
||||
std::optional<LangI18n> mI18n;
|
||||
};
|
||||
|
||||
} // namespace InventoryCheck
|
||||
|
||||
Reference in New Issue
Block a user