Skip to content

Commit

Permalink
feat: add lib version check
Browse files Browse the repository at this point in the history
  • Loading branch information
KobeBryant114514 committed Feb 8, 2024
1 parent ee60bd0 commit 6103ce1
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,23 @@ Plugin::Plugin(ll::plugin::NativePlugin& self) : mSelf(self) {

bool Plugin::enable() {
// Code for enabling the plugin goes here.
RegisterCommands();
listenEvent();
logger.info("GMBlacklist Loaded!");
logger.info("Author: Tsubasa6848");
logger.info("Repository: https://github.com/GroupMountain/GMBlacklist");
return true;
auto requireLibVersion = SemVersion(0, 7, 2, "", "");
if (GMLIB::Version::checkLibVersionMatch(requireLibVersion)) {
RegisterCommands();
listenEvent();
logger.info("GMBlacklist Loaded!");
logger.info("Author: Tsubasa6848");
logger.info("Repository: https://github.com/GroupMountain/GMBlacklist");
return true;
} else {
logger.error("GMLIB Version is outdated! Please update your GMLIB!");
logger.error(
"Current GMLIB Version {}, Required Lowest GMLIB Version {}",
GMLIB::Version::getLibVersionString(),
requireLibVersion.asString()
);
return false;
}
}

bool Plugin::disable() {
Expand Down

0 comments on commit 6103ce1

Please sign in to comment.