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
Add a new plugin command
Call Player::performCommand to run that plugin command
Check the type of sender in onCommand callback.
Expected behavior
The type of sender should be Player.
Describe the bug When a plugin uses
Player::performCommand
to run a plugin command, the command executor is called with a genericCommandSender
object instead ofPlayer
. This is due to the current implementation ofPlayer::performCommand
usingVirtualCommandOrigin
to execute the command, which is not correctly converted toPlayer
upon callback.To Reproduce
Player::performCommand
to run that plugin commandsender
inonCommand
callback.Expected behavior The type of
sender
should bePlayer
.