fix nulls getting displayed
This commit is contained in:
parent
58c39b0775
commit
35c19bfa38
@ -1,4 +1,5 @@
|
|||||||
using Axwabo.Helpers;
|
using Axwabo.Helpers;
|
||||||
|
using PlayerRoles;
|
||||||
using PlayerRoles.PlayableScps;
|
using PlayerRoles.PlayableScps;
|
||||||
using PlayerStatsSystem;
|
using PlayerStatsSystem;
|
||||||
using PluginAPI.Core;
|
using PluginAPI.Core;
|
||||||
@ -41,6 +42,8 @@ public sealed class DeathLogPlugin {
|
|||||||
|
|
||||||
[PluginEvent(ServerEventType.PlayerDying)]
|
[PluginEvent(ServerEventType.PlayerDying)]
|
||||||
private void OnPlayerDeath(Player player, Player attacker, DamageHandlerBase handler) {
|
private void OnPlayerDeath(Player player, Player attacker, DamageHandlerBase handler) {
|
||||||
|
if (player.Role == RoleTypeId.None || string.IsNullOrEmpty(player.ReferenceHub.nicknameSync._myNickSync))
|
||||||
|
return;
|
||||||
if (attacker != null && handler is AttackerDamageHandler adh)
|
if (attacker != null && handler is AttackerDamageHandler adh)
|
||||||
LogHandler.LogAttackerDeathMessage(player, attacker, adh, Config.VisibilityRequirement, Config.KillOnSightPermitted, Config.DefaultFontSizeScalar);
|
LogHandler.LogAttackerDeathMessage(player, attacker, adh, Config.VisibilityRequirement, Config.KillOnSightPermitted, Config.DefaultFontSizeScalar);
|
||||||
else if (Config.LogSimpleDeaths)
|
else if (Config.LogSimpleDeaths)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user