Onsharp
  • What is Onsharp?
  • Changelog
  • Onsharp Environment
    • Onsharp Runtime Environment
    • Installation
    • Configuration
  • Basic Usage
    • Preparation
    • Create a Basic Plugin
    • Concept of Entry Points
    • Create Commands
    • The EventAPI of Onsharp
    • Configs and DataStorage
    • Logging
    • Debugging
  • Advance Usage
    • Auto Updater
    • Overriding Entity Factories
    • Interop of LUA and vice versa
    • Entity Pool Refreshing
    • Create Console Commands
    • Providing LUA packages
  • Modules
    • Lazy Mover
    • I18n
Powered by GitBook
On this page

Was this helpful?

  1. Basic Usage

Concept of Entry Points

On this page we will explain the concept of entry points.

PreviousCreate a Basic PluginNextCreate Commands

Last updated 4 years ago

Was this helpful?

The concept of entry points is quite simple: You cannot access the Onsharp API statically, so you need some kind of "entry points". Therefore we want to introduce the interface Onsharp.IEntryPoint . An entry point will be initialized automatically when the plugin gets loaded, and you can access specific parts of the Onsharp API with these entry points. A plugin main class is extending the entry point and offers the access to the rest of the Onsharp API. Here is a list of features the entry points are offering:

  • Access to the API for the plugin management

  • Access to the Onsharp.IServer interface of the current plugin

  • Access to the Onsharp.Native.IRuntime interface to control the Onsharp runtime

  • Entry Points are automatically registers as holder for , , as well as

console commands
ingame commands
exportables
server and remote events