NullReferenceException at GetMessageError
Failed to call hook 'CanMountEntity' on plugin 'NoMLRSMount v1.0.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NoMLRSMount.GetMessage (Oxide.Core.Libraries.Covalence.IPlayer player, System.String messageName, System.Object[] args) [0x00000] in <5ad95b8d131e4626ad776de01b27c658>:0 
  at Oxide.Plugins.NoMLRSMount.ChatMessage (BasePlayer player, System.String messageName, System.Object[] args) [0x00000] in <5ad95b8d131e4626ad776de01b27c658>:0 
  at Oxide.Plugins.NoMLRSMount.CanMountEntity (BasePlayer player, MLRS entity) [0x00028] in <5ad95b8d131e4626ad776de01b27c658>:0 
  at Oxide.Plugins.NoMLRSMount.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00074] in <5ad95b8d131e4626ad776de01b27c658>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <dfcb48ea05694263bbc08e62a39c274c>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <dfcb48ea05694263bbc08e62a39c274c>:0

Happens here and then. I dont know why.
I cannot reproduce it when mounting manually.

Thanks for letting me know, i will look into it.

DrbNpR3DUOp1M2p.png Lincoln

Thanks for letting me know, i will look into it.

Looks like the IPlayer isn't available being as it may be something other than a player trying to mount the entity. I'd probably consolate the methods like below:

        private void ChatMessage(BasePlayer player, string messageName, params object[] args) =>
            player.ChatMessage(string.Format(GetMessage(player.UserIDString, messageName), args));

        private string GetMessage(string playerId, string messageName, params object[] args)
        {
            var message = lang.GetMessage(messageName, this, playerId);
            return args.Length > 0 ? string.Format(message, args) : message;
        }

And add a check in CanMountEntity (assuming it's because of an NPC):

        object CanMountEntity(BasePlayer player, MLRS entity)
        {
            if (!player.IsNpc && !permission.UserHasPermission(player.UserIDString, permBypass)))
            {
                ChatMessage(player, "Disabled");
                return false;
            }

            return null;
        }

I wasn't aware NPCs or anything else besides a player could mount an entity :) I will add a check for this.

4mhA8Won9KHDeTQ.png Lincoln

I wasn't aware NPCs or anything else besides a player could mount an entity :) I will add a check for this.

I'm assuming it's an NPC being as they are BasePlayers generally, and I do think some can, though I'd probably add a check to see. You could always do a test build for the user to determine if that is the case, but either way, you don't really need the IPlayer usage for this or that extra GetMessage method.