Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Command sender should be player when using Player::performCommand #53

Closed
wu-vincent opened this issue Sep 15, 2024 · 0 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wu-vincent
Copy link
Member

Describe the bug
When a plugin uses Player::performCommand to run a plugin command, the command executor is called with a generic CommandSender object instead of Player. This is due to the current implementation of Player::performCommand using VirtualCommandOrigin to execute the command, which is not correctly converted to Player upon callback.

To Reproduce

  1. Add a new plugin command
  2. Call Player::performCommand to run that plugin command
  3. Check the type of sender in onCommand callback.

Expected behavior
The type of sender should be Player.

@wu-vincent wu-vincent added the bug Something isn't working label Sep 15, 2024
@wu-vincent wu-vincent self-assigned this Sep 15, 2024
@wu-vincent wu-vincent added this to the v0.5.4 milestone Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant