File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -779,17 +779,14 @@ Local<Value> DataClass::getAllPlayerInfo(const Arguments& args) {
779779 auto arr = Array::newArray ();
780780 auto level = ll::service::getLevel ();
781781 if (level.has_value ()) {
782- ll::service::PlayerInfo::getInstance ().forEach ([&arr](const ll::service::PlayerInfo::PlayerInfoEntry& entry
783- ) {
784- auto obj = Object::newObject ();
785- obj.set (" name" , String::newString (entry.name ));
786- obj.set (" xuid" , String::newString (entry.xuid ));
787- obj.set (" uuid" , String::newString (entry.uuid .asString ()));
788- arr.add (obj);
789- return true ;
790- });
782+ for (auto & entry : ll::service::PlayerInfo::getInstance ().entries ()) {
783+ auto object = Object::newObject ();
784+ object.set (" xuid" , entry.xuid );
785+ object.set (" name" , entry.name );
786+ object.set (" uuid" , entry.uuid .asString ());
787+ arr.add (object);
788+ }
791789 }
792-
793790 return arr;
794791 }
795792 CATCH (" Fail in getAllPlayerInfo!" );
You can’t perform that action at this time.
0 commit comments