public static void Init() { if (_isInitialized) return; _isInitialized = true; Config = new ProtectionConfig(); Load(); _handtoolCache = new HandtoolCache(); MyAPIGateway.Session.DamageSystem.RegisterBeforeDamageHandler(0, DamageHandler); }
public static void Init_Server() { if (_isInitialized) { return; } _isInitialized = true; _isServer = true; Config = new ProtectionConfig(); Load(); _handtoolCache = new HandtoolCache(); _sentFailedMessage = new Dictionary <IMyPlayer, DateTime>(); // every 30 seconds _cleanupTimer = new ThreadsafeTimer(30000); _cleanupTimer.Elapsed += CleanUp; _cleanupTimer.Start(); MyAPIGateway.Session.DamageSystem.RegisterBeforeDamageHandler(0, DamageHandler_Server); ChatCommandLogic.Instance.AllowBuilding = true; }