NFive

NFive

  • Docs
  • Help
  • API
  • Plugins
  • GitHub
  • Languages iconEnglish
    • Čeština
    • Español
    • Norsk
    • Português (Brasil)
    • Help Translate

›Server Side

Getting Started

  • Overview
  • Components
  • Database Setup
  • Server Setup
  • Installing Plugins
  • Administration
  • Troubleshooting

Plugin Manager

  • Overview
  • Command Reference

Plugin Development

  • Overview
  • Setup
  • Hub
  • Definition
  • Server Side

    • Life Cycle
    • Controller
    • Configurable Controller
    • Dependency Injection
    • Database Access
    • RCON

    Client Side

    • Life Cycle
    • Service
Edit

Configurable Controller

NFive.SDK.Server.Controllers.ConfigurableController<T : IControllerConfiguration>

NFive also provides ConfigurableController<T>, a subclass of Controller, for convenience. The configurable controller allows you to supply a model type which will automatically be used as the plugin's configuration object and be loaded from a YAML file.

Constructor

ConfigurableController<T>(ILogger logger, IEventManager events, IRpcHandler rpc, IRconManager rcon, T configuration)

The configurable controller constructor is the same as the standard controller except that the 5th argument will be an instance of the provided configuration type. This instance is created by NFive deserializing the plugin YAML configuration file at startup, which is stored in a local property this.Configuration.

Methods

The configurable controller has the same methods as the standard controller except for Reload().

  • Reload()

Reload()

public virtual void Reload(T configuration)

Triggered by user request, this method should run code to reset and reload any plugin configuration or cache.

The configurable controller is provided with a freshly loaded configuration object and by default updates the local configuration property.

Last updated on 5/16/2019
← ControllerDependency Injection →
  • Constructor
  • Methods
    • Reload()
NFive
Docs
Getting StartedPlugin ManagerAPI Reference
Community
Getting HelpProject ChatDiscord NFive chat
More
Plugin HubGitHubNFive stargazers on GitHub