Closed BlitzOffline closed 2 years ago
OK so I was really blind, and also this is really stupid but we register the argument in the registerCommands method.
Anyways we need to add extra checks here. First of all, if player == null, we need to send the offline-player message instead.
Currently the invalid-argument message is being send if the receiver is a ChatUser and that user is offline. We should be sending the user-offline message instead.
EDIT: We might want to register the ChatUser as a parameter with our own validator and stuff since right now I'm pretty sure triumph-cmds uses the SenderMapper we register when creating the BukkitCommandManager.
https://github.com/HelpChat/ChatChat/blob/6a38248a9c117c1befd88b8389f2097a0dca46e6/plugin/src/main/java/at/helpch/chatchat/ChatChatPlugin.java#L62