-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
bugSomething isn't workingSomething isn't workingimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Description
CommandAPI version
9.1.0
Minecraft version
1.20.1
Are you shading the CommandAPI?
Yes
What I did
I encountered an issue when trying to use Bukkit#createCommandSender
in combination with Bukkit#dispatchCommand
.
val myCommandSender = Bukkit.createCommandSender { }
Bukkit.dispatchCommand(myCommandSender, "<anycommandapicommand>")
What actually happened
Executing commands from custom senders generated by Bukkit#createCommandSender
results in a NullPointerException
(see below) due to incorrect handling by the CommandAPI.
What should have happened
The CommandAPI should support the special CommandSender
returned by Bukkit#createCommandSender
.
Server logs and CommandAPI config
Cannot invoke "[...].dev.jorel.commandapi.commandsenders.AbstractCommandSender.getSource()"
because "this.val$sender" is null
Other
Given this method, the CommandAPI assumes that CommandSender
will only be the types provided by Spigot. However, on Paper, Bukkit#createCommandSender
returns io.papermc.paper.commands.FeedbackForwardingSender
, which extends CommandSender
.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release