bool CanUpdateSign(Signage sign, BasePlayer player) { if (m_configData.SignBlocks.ContainsKey(player.userID)) { SignBlock signBlock = m_configData.SignBlocks[player.userID]; player.ChatMessage(m_configData.Messages["forbidden"].Replace("%reason", signBlock.reason).Replace("%player_name", player.displayName)); sign.Kill(); return(false); } return(true); }
private void OnDestroy() { Destroy(boxCollider); if (secondary != null && !secondary.IsDestroyed) { secondary.SetParent(null); secondary.Kill(BaseNetworkable.DestroyMode.None); } if (primary != null && !primary.IsDestroyed) { primary.SetParent(null); primary.Kill(); } }