Repository navigation
feat: add simulated players to the plugin api - #24
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Simulated players for plugins, in every language of the API:
serverSpawnSimulatedPlayer(name, level, position, yaw, gameMode)/Server::spawnSimulatedPlayer: a player the server plays, as the game's simulated players. It joins with the usual message, shows in the player list and in the world, and stays until removed. Null / empty when the name or place is refused.playerIsSimulated/Player::isSimulatedplayerRemoveSimulated/Player::removeSimulated: leaves as a player who disconnects; false for any other player.C ABI (
falcon_api.h, three entries at the end of the table), C++ (Server.hpp,Player.hpp), Java (Server,Player) and Wasm (falcon.wit). README updated with an example.Why
To bring in players from a plugin, for videos and load tests (a
/botscommand), without a GameTest structure on the map.Server side
Falcon-MC/Falcon#459 pins this commit and implements the three entries.
Checks
The C++ headers build with
-Wallagainst a call to each new function. Java and Wasm bindings follow the existing generated ones; CI builds them.