Skip to content

Commit 4e82320

Browse files
committed
feat(plugin): Add Call method to TerrariaPlugin base class
Adds a virtual Call method with params object[] args parameter to allow plugins to implement custom method invocation functionality.
1 parent 9dc7827 commit 4e82320

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

TerrariaServerAPI/TerrariaApi.Server/TerrariaPlugin.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,14 @@ protected virtual void Dispose(bool disposing)
130130
/// Invoked after the plugin is constructed. Initialization logic should occur here.
131131
///</summary>
132132
public abstract void Initialize();
133+
134+
/// <summary>
135+
/// Implements weak inter-plugin communication. Allows interaction with other plugins without referencing their types or namespaces.
136+
/// </summary>
137+
public virtual object Call(params object[] args)
138+
{
139+
return null;
140+
}
141+
133142
}
134143
}

0 commit comments

Comments
 (0)