Open SOF3 opened 2 years ago
FakePlayer used to spawn in one, but now spawns two fake players by default. plugin_data/FakePlayer/players.json
contains a list of players to spawn in, users can modify the list to spawn in more (or remove existing) fake players, or use Loader::addPlayer()
to spawn a player during runtime.
I am kind of confused about the orientation of this plugin. If it is supposed to be controlled from other code like puppeteer, it should not do something by itself. If it is supposed to be user-friendly without code, it should provide commands for spawning fake players.
It's the latter, a player is spawned in with properties specified in players.json and (to a user) is indifferentiable from an actual player on the server.
The plugin does lack commands, I do intend to work on them. At the moment, the plugin is pretty useful in cases such as testing pvp mechanisms without needing another device or an emulator (like bluestacks).
It is sort of complicated to work on a /spawnplayer command because of how much data is associated with a player (see data associated with every entry in players.json). F.e., the user would at minimum have to specify xuid, uuid and gamertag for each player they choose to spawn in, and using random values for xuid and/or uuid or making a typo may cause inconsistency in plugins that use these properties to index player data. Though if an advanced user would still like to go overboard despite all of that, there's always an addPlayer() method to spawn fake players during runtime. For the rest of us, I feel like fake players are better managed when player data is pre-configured in players.json (which is currently the case) so the room for such issues is reduced (though definitely possible). Perhaps users can have the option to spawn in a selected set of players from players.json rather than the plugin spawning in all entries within players.json.
If I understand correctly, FakePlayer only spawns one fake player by default. Shouldn't this be customizable like Specter?