File tree Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ Local<Value> BlockEntityClass::getNbt(const Arguments&) {
79
79
}
80
80
81
81
Local<Value> BlockEntityClass::setNbt (const Arguments& args) {
82
+ using namespace lse ::api;
82
83
CHECK_ARGS_COUNT (args, 1 );
83
84
84
85
try {
Original file line number Diff line number Diff line change @@ -1292,6 +1292,7 @@ Local<Value> EntityClass::getNbt(const Arguments&) {
1292
1292
}
1293
1293
1294
1294
Local<Value> EntityClass::setNbt (const Arguments& args) {
1295
+ using namespace lse ::api;
1295
1296
CHECK_ARGS_COUNT (args, 1 );
1296
1297
1297
1298
try {
Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ Player* PlayerClass::extract(Local<Value> v) {
334
334
}
335
335
336
336
// 公用API
337
+ using namespace lse ::api;
337
338
Local<Value> McClass::getPlayerNbt (const Arguments& args) {
338
339
CHECK_ARGS_COUNT (args, 1 );
339
340
CHECK_ARG_TYPE (args[0 ], ValueKind::kString );
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ LegacyScriptEngine& LegacyScriptEngine::getInstance() {
71
71
72
72
bool LegacyScriptEngine::enable () {
73
73
auto & logger = getSelf ().getLogger ();
74
- if (!MoreGlobal::onEnable ()) {
74
+ if (!api:: MoreGlobal::onEnable ()) {
75
75
logger.error (" Failed to enable MoreGlobal" _tr ());
76
76
}
77
77
ll::service::PlayerInfo::getInstance ();
@@ -97,7 +97,7 @@ void initializeLegacyStuff() {
97
97
98
98
InitBasicEventListeners ();
99
99
InitMessageSystem ();
100
- MoreGlobal::onLoad ();
100
+ api:: MoreGlobal::onLoad ();
101
101
}
102
102
103
103
bool LegacyScriptEngine::load () {
Original file line number Diff line number Diff line change 5
5
#include " mc/world/level/storage/DBStorage.h"
6
6
#include " mc/world/level/storage/DBStorageConfig.h"
7
7
8
- namespace MoreGlobal {
8
+ namespace lse ::api:: MoreGlobal {
9
9
DBStorage* dbStorage;
10
10
DefaultDataLoadHelper* helper;
11
11
DefaultDataLoadHelper& defaultDataLoadHelper () { return (DefaultDataLoadHelper&)helper; }
@@ -33,4 +33,4 @@ bool onEnable() {
33
33
}
34
34
return false ;
35
35
}
36
- } // namespace MoreGlobal
36
+ } // namespace lse::api:: MoreGlobal
Original file line number Diff line number Diff line change 1
1
#include " mc/dataloadhelper/DefaultDataLoadHelper.h"
2
2
class DBStorage ;
3
- namespace MoreGlobal {
3
+ namespace lse ::api:: MoreGlobal {
4
4
extern DBStorage* dbStorage;
5
5
extern DefaultDataLoadHelper& defaultDataLoadHelper ();
6
6
extern void onLoad ();
7
7
extern bool onEnable ();
8
- }; // namespace MoreGlobal
8
+ }; // namespace lse::api:: MoreGlobal
You can’t perform that action at this time.
0 commit comments