A Fake Player mod for LeviLamina
This mod modify generate fake player based on BDS builtin SimulatedPlayer with some modification
This mod aims to let BDS builtin SimulatedPlayer work like a normal player
lip install ...
You can use this nod by command or exported api
The full command name of this mod is levifakeplayer, and default alias is lfp
-
/lfp help- Show help for this command -
/lfp list [onlineOnly: false]- List fake players, the online -
/lfp create <name: string> [pos: x y z] [dim: Dimension]- Create a fake player at world spawn point by default, unless pass pos param -
/lfp login <name: string>- Login a fake player by name -
/lfp logout <name: string>- Logout a fake player by name -
/lfp remove <name: string>- Remove a fake player by name -
/lfp swap <name: string>- Swap bag data with fake player by name -
/lfp autologin <name: string>- Switch fake player's auto login config by name
NameSpace: LeviFakePlayerAPI, exported apis:
SimulatedPlayeris alias ofPlayer,ListenerIdis alias ofnumber, andFakePlayerInfoTypenow is jsonstringofFakePlayerInfo, and may be changed toFakePlayerInfoobject in future
FakePlayerInfo:{name: string, xuid: string, uuid: UuidString, online: boolean, autoLogin: boolean}
getApiVersion:() => numbergetVersion:() => stringgetOnlineList:() => SimulatedPlayer[]getInfo:(name: string) => FakePlayerInfoTypegetAllInfo:() => FakePlayerInfoType[]list:() => string[]login:(name: string) => SimulatedPlayerlogout:(name: string) => booleancreate:(name: string) => booleancreateWithData:(name: string, data: NbtCompound) => booleancreateAt:(name: string, position: IntPos) => SimulatedPlayerremove:(name: string) => booleansetAutoLogin:(name: string, autoLogin: boolean) => booleanimportClientFakePlayer:(name: string) => booleansubscribeEvent:(eventName: EventName, callbackNamespace: string, callbackName: string) => ListenerIdunsubscribeEvent:(listenerId: ListenerId) => boolean
create:[name: string, info: FakePlayerInfoType]remove:[name: string, info: FakePlayerInfoType]login:[name: string, info: FakePlayerInfoType, player: SimulatedPlayer]logout:[name: string, info: FakePlayerInfoType]update:[name: string, info: FakePlayerInfoType]
You can directly use api wrapper provided by this project
-
Clone project:
git clone ... -
Run
xmake repo -uin the root of the repository. -
Run
xmake f -m release --test=nto config release mode -
Run
xmaketo build the mod.
Now the build is complete at bin/.
-
xmake f -m release --test=y -
xmake -y
LGPL-3.0-or-later