Main error (line 785)
This is the function that selects the time threshold from DamageScale:

var scaleKey = _config.DamageScaleKeys.FirstOrDefault(x => x <= lastOnline.Hours);


DamageScaleKeys is sorted in ascending order, i.e. [1, 3, 6, 12, 24, 48]. FirstOrDefault returns the first match from the beginning of the list, i.e. the smallest key, and it should return the largest threshold, which is less than/equal to the number of offline hours. Let's track a player offline for 12 hours: List: [1, 3, 6, 12, 24, 48] FirstOrDefault(x => x <= 12) checks 1 → 1 <= 12? yes → returns 1 So instead of threshold 12 (= 0.35) it takes threshold 1. And in my config:

"1": 0.0

0.0 means "0% damage" = 100% protection.
And so it will be for every offline player ≥ 1 hour - it will always hit the key 1 = 0.0. That's exactly what i see. Then scale = 0.0 goes to MitigateDamage(hitInfo, 0), where scale == 0 → returns true → blocks all damage.

Fix: change FirstOrDefault to LastOrDefault (in an ascending sorted list this will give the largest matching threshold).

Second error (line 726)

if ((DateTime.Now - clanLastOnline.LastOnlineTime).Minutes <= _config.MinutesSinceLastAttackToProtect)

Here, .Minutes (TimeSpan minutes component, range 0–59) is used instead of .TotalMinutes. For an offline player 12h 03min .Minutes = 3, i.e. <= 10 → UpdateLastOnline(targetId) resets the "last online" time to now → the database looks again as if the owner just logged out → 100% protection. This happens randomly (when the end of minutes is ≤ 10) and adds to the first error.

I have corrected this plugin and if you want, I can send it to you so you can check it. For me it works as intended.