private void OnEntityDeath(BaseCombatEntity victim, HitInfo info) { if (victim is BasePlayer) { BasePlayer player = (BasePlayer)victim; Backpack backpack = Backpack.LoadOrCreate(player.userID); backpack.ForceClose(); if (Configuration.EraseOnDeath) { backpack.EraseContents(); } else if (Configuration.DropOnDeath) { backpack.Drop(player.transform.position); } } }