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&) {
7979}
8080
8181Local<Value> BlockEntityClass::setNbt (const Arguments& args) {
82+ using namespace lse ::api;
8283 CHECK_ARGS_COUNT (args, 1 );
8384
8485 try {
Original file line number Diff line number Diff line change @@ -1292,6 +1292,7 @@ Local<Value> EntityClass::getNbt(const Arguments&) {
12921292}
12931293
12941294Local<Value> EntityClass::setNbt (const Arguments& args) {
1295+ using namespace lse ::api;
12951296 CHECK_ARGS_COUNT (args, 1 );
12961297
12971298 try {
Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ Player* PlayerClass::extract(Local<Value> v) {
334334}
335335
336336// 公用API
337+ using namespace lse ::api;
337338Local<Value> McClass::getPlayerNbt (const Arguments& args) {
338339 CHECK_ARGS_COUNT (args, 1 );
339340 CHECK_ARG_TYPE (args[0 ], ValueKind::kString );
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ LegacyScriptEngine& LegacyScriptEngine::getInstance() {
7171
7272bool LegacyScriptEngine::enable () {
7373 auto & logger = getSelf ().getLogger ();
74- if (!MoreGlobal::onEnable ()) {
74+ if (!api:: MoreGlobal::onEnable ()) {
7575 logger.error (" Failed to enable MoreGlobal" _tr ());
7676 }
7777 ll::service::PlayerInfo::getInstance ();
@@ -97,7 +97,7 @@ void initializeLegacyStuff() {
9797
9898 InitBasicEventListeners ();
9999 InitMessageSystem ();
100- MoreGlobal::onLoad ();
100+ api:: MoreGlobal::onLoad ();
101101}
102102
103103bool LegacyScriptEngine::load () {
Original file line number Diff line number Diff line change 55#include " mc/world/level/storage/DBStorage.h"
66#include " mc/world/level/storage/DBStorageConfig.h"
77
8- namespace MoreGlobal {
8+ namespace lse ::api:: MoreGlobal {
99DBStorage* dbStorage;
1010DefaultDataLoadHelper* helper;
1111DefaultDataLoadHelper& defaultDataLoadHelper () { return (DefaultDataLoadHelper&)helper; }
@@ -33,4 +33,4 @@ bool onEnable() {
3333 }
3434 return false ;
3535}
36- } // namespace MoreGlobal
36+ } // namespace lse::api:: MoreGlobal
Original file line number Diff line number Diff line change 11#include " mc/dataloadhelper/DefaultDataLoadHelper.h"
22class DBStorage ;
3- namespace MoreGlobal {
3+ namespace lse ::api:: MoreGlobal {
44extern DBStorage* dbStorage;
55extern DefaultDataLoadHelper& defaultDataLoadHelper ();
66extern void onLoad ();
77extern bool onEnable ();
8- }; // namespace MoreGlobal
8+ }; // namespace lse::api:: MoreGlobal
You can’t perform that action at this time.
0 commit comments