private void Init() { _pluginInstance = this; _pluginConfig = Config.ReadObject <Configuration>(); permission.RegisterPermission(Permission_Allow_All, this); permission.RegisterPermission(Permission_Allow_ScrapHeli, this); permission.RegisterPermission(Permission_Allow_MiniCopter, this); permission.RegisterPermission(Permission_Allow_RHIB, this); permission.RegisterPermission(Permission_Allow_Rowboat, this); permission.RegisterPermission(Permission_Ownership_All, this); permission.RegisterPermission(Permission_Ownership_MiniCopter, this); permission.RegisterPermission(Permission_Ownership_ScrapHeli, this); permission.RegisterPermission(Permission_Ownership_Rowboat, this); permission.RegisterPermission(Permission_Ownership_RHIB, this); permission.RegisterPermission(Permission_Ownership_RidableHorse, this); permission.RegisterPermission(Permission_Free_All, this); permission.RegisterPermission(Permission_Free_Minicopter, this); permission.RegisterPermission(Permission_Free_ScrapHeli, this); permission.RegisterPermission(Permission_Free_Rowboat, this); permission.RegisterPermission(Permission_Free_RHIB, this); permission.RegisterPermission(Permission_Free_RidableHorse, this); _pluginConfig.Vehicles.RegisterCustomPricePermissions(); }
private void Unload() { CostLabelUI.DestroyAll(); _scrapItem?.Remove(); _pluginInstance = null; _pluginConfig = null; }