PluginContext
이 콘텐츠는 아직 번역되지 않았습니다.
Namespace NetWiv · Assembly NetWiv.Core
public sealed class PluginContextProperties
Section titled “Properties”Config
Section titled “Config”public JsonElement Config { get; }The value of plugins[name], or JSON null when it is absent.
Methods
Section titled “Methods”Permission
Section titled “Permission”public void Permission(PermissionDefinition permission);PermissionSet
Section titled “PermissionSet”public void PermissionSet(string identifier, params string[] permissions);Defines a permission set. Unqualified members belong to this plugin; qualified members may refer to other plugins.
ReadConfig
Section titled “ReadConfig”public T ReadConfig<T>(JsonTypeInfo<T> typeInfo);Reads typed plugin configuration using generated NativeAOT serialization metadata.
RegisterCommand
Section titled “RegisterCommand”public void RegisterCommand(string name, CommandHandler handler);RegisterGeneratedCommands
Section titled “RegisterGeneratedCommands”public void RegisterGeneratedCommands<TPlugin>(params string[] names);Registers selected generated commands using this plugin’s name and ACL namespace.
| Parameter | Description |
|---|---|
names |
Local external names, after [Command] naming, without a plugin prefix. |
RegisterResponseCommand
Section titled “RegisterResponseCommand”public void RegisterResponseCommand(string name, ResponseCommandHandler handler);