Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
chore: Adapted for Levilamina 0.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
engsr6982 committed Jul 24, 2024
1 parent 46b90ce commit 1755e45
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

## [Unreleased]

### Changed

- 适配 Levilamina 0.13.4

## [0.10.0] - 2024-6-20

### Changed
Expand Down
1 change: 0 additions & 1 deletion src/Command/Command.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <ll/api/command/Optional.h>
#include <ll/api/command/Overload.h>
#include <ll/api/i18n/I18n.h>
#include <ll/api/plugin/NativePlugin.h>
#include <ll/api/service/Bedrock.h>
#include <ll/api/service/PlayerInfo.h>
#include <ll/api/service/Service.h>
Expand Down
2 changes: 1 addition & 1 deletion src/DB/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void db::loadLevelDB() {
auto& mSelf = entry::entry::getInstance().getSelf();
auto& logger = mSelf.getLogger();
try {
const auto& dirLevelDB = mSelf.getPluginDir() / "LevelDB";
const auto& dirLevelDB = mSelf.getModDir() / "LevelDB";
mKVDB = std::make_unique<ll::data::KeyValueDB>(dirLevelDB);
} catch (...) {
logger.fatal("Failed to load the permission group database"_tr());
Expand Down
6 changes: 3 additions & 3 deletions src/Entry/Entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <memory>

#include "ll/api/i18n/I18n.h"
#include "ll/api/plugin/NativePlugin.h"
#include "ll/api/plugin/RegisterHelper.h"
#include "ll/api/mod/NativeMod.h"
#include "ll/api/mod/RegisterHelper.h"


// my
Expand Down Expand Up @@ -48,4 +48,4 @@ bool entry::disable() {

} // namespace pmc

LL_REGISTER_PLUGIN(pmc::entry, pmc::instance);
LL_REGISTER_MOD(pmc::entry, pmc::instance);
8 changes: 4 additions & 4 deletions src/Entry/Entry.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "ll/api/plugin/NativePlugin.h"
#include "ll/api/mod/NativeMod.h"

namespace pmc {

Expand All @@ -9,9 +9,9 @@ class entry {
public:
static entry& getInstance();

entry(ll::plugin::NativePlugin& self) : mSelf(self) {}
entry(ll::mod::NativeMod& self) : mSelf(self) {}

[[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; }
[[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; }

/// @return True if the plugin is loaded successfully.
bool load();
Expand All @@ -27,7 +27,7 @@ class entry {
// bool unload();

private:
ll::plugin::NativePlugin& mSelf;
ll::mod::NativeMod& mSelf;
};

} // namespace pmc
6 changes: 3 additions & 3 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/engsr6982/PermissionCore",
"version": "0.10.0",
"version": "0.10.1",
"info": {
"name": "PermissionCore",
"description": "权限组前置",
Expand All @@ -13,9 +13,9 @@
"library"
]
},
"asset_url": "https://github.com/engsr6982/PermissionCore/releases/download/v0.10.0/PermissionCore-windows-x64.zip",
"asset_url": "https://github.com/engsr6982/PermissionCore/releases/download/v0.10.1/PermissionCore-windows-x64.zip",
"prerequisites": {
"github.com/LiteLDev/LeviLamina": "0.13.x"
"github.com/LiteLDev/LeviLamina": "0.13.4"
},
"files": {
"place": [
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
-- add_requires("levilamina develop") to use develop version
-- please note that you should add bdslibrary yourself if using dev version
add_requires(
"levilamina 0.13.0"
"levilamina 0.13.4"
)

if not has_config("vs_runtime") then
Expand Down

0 comments on commit 1755e45

Please sign in to comment.