Skip to content

Commit

Permalink
fix: pass arguments by reference for override functions
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Mar 7, 2024
1 parent 3fda97f commit 8376e0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/endstone_python/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class PyCommandExecutor : public CommandExecutor {
bool onCommand(const endstone::CommandSender &sender, const endstone::Command &command,
const std::vector<std::string> &args) override
{
PYBIND11_OVERRIDE_NAME(bool, endstone::CommandExecutor, "on_command", onCommand, sender, command, args);
PYBIND11_OVERRIDE_NAME(bool, endstone::CommandExecutor, "on_command", onCommand, std::ref(sender),
std::ref(command), std::ref(args));
}
};

Expand Down

0 comments on commit 8376e0b

Please sign in to comment.