NullReferenceException at OnEntityTakeDamageFixed

I installed the latest versiob abd it spamed my console with the message below so I rolled back and it stopped.

(13:21:18) | Failed to call hook 'OnEntityTakeDamage' on plugin 'NoDecay v1.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NoDecay.OnEntityTakeDamage (BaseCombatEntity entity, HitInfo info) [0x0006c] in <8a04f79777e2410cbf6cd6d6a90aa076>:0
  at Oxide.Plugins.NoDecay.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00099] in <8a04f79777e2410cbf6cd6d6a90aa076>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0
Thanks for this, looking into it now. Just make sure that you are not still using the same config from previous versions.
Shoud I delete the config first? Then install the latest version.
BigredNZ
Shoud I delete the config first? Then install the latest version.

Yes, the config has been completely changed, keep an eye on the docs, I am rewriting them right now.

Yep that fixed it. Thanks for the speedy reply :)
No problem :)
Got the same issue. Like 50 Exceptions per Minute.
Failed to call hook 'OnEntityTakeDamage' on plugin 'NoDecay v1.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NoDecay.OnEntityTakeDamage (BaseCombatEntity entity, HitInfo info) [0x0006c] in <cab14c7b9f5e404d8dc4c30922ca27d5>:0
  at Oxide.Plugins.NoDecay.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00099] in <cab14c7b9f5e404d8dc4c30922ca27d5>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <80b90e8213db44b29ec2d4111764172c>:0                                                                       44b/s in, 936b/s out
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ec05e0208c9149bba43236ca58fea105>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ec05e0208c9149bba43236ca58fea105>:0​

Hadn't isntalled the Plugin before...

The Player query thing is causing the exception. Funny thing aswell. Why you impelent a swtich for UsePermission and never using it i Plugin?

That would do the trick here:

            if (config.General.usePermission) {
                BasePlayer player = BasePlayer.FindByID(entity.OwnerID);
                if (entity.OwnerID != 0UL && (player == null || !permission.UserHasPermission(player.UserIDString, config.usePermission)))
                {
                    Output(lang.GetMessage("NoPermission", this).Replace("{0}", $"{player.displayName} ({player.userID})"));
                    return;
                }
            }
5fa36167a1cbb.png OldSpice

The Player query thing is causing the exception. Funny thing aswell. Why you impelent a swtich for UsePermission and never using it i Plugin?

That would do the trick here:

Oops. Looks like I forgot to implement it. Thanks for letting me know.
Locked automatically