Add a OnPlayerRunCmdPre forward#1760
Conversation
Addition of OnPlayerRunCmdPre forward
Only call forwards if they are required
Add missing bracket
remove unnecessary note from the include
correct the return type
constify arrays
|
I was about to merge this, but I wonder if we need a feature capability for it existing? There doesn't appear to be a way to detect if a forward has been registered (which is probably sane - there is no guarantee they'd be called), but it seems like it would be important in this case for plugins that want to support both 1.10 and 1.11. |
IMO this is merge-able with the understanding that we know a forward isn't registered if it's never called, by the time OPRC is called a plugin would be able to tell if the If we'd like to go the extra step and add the feature I'm not opposed, but it may be less important here |
As requested in this issue #1759, adds a OnPlayerRunCmdPre forward for use with certain plugins which want access to unmodified usercmds.
The name isn't ideal, but after a little discussion in the Discord, we've not been able to come up with anything better.
I'm also a little unsure if
hasUsercmdsPreFwdsandhasUsercmdsFwdsare the correct formatting for the new varaibles.I don't have an easy means to test this right now, so the changes are currently untested.
Closes #1759