Skip to content

API Documentation v5 Plugins

Exopandora edited this page Jun 11, 2026 · 2 revisions

Plugins provide a way to extend the existing functionality of Shoulder Surfing Reloaded. The following section describes how to create and register a plugin.

Creating a plugin class

Create a class that implements IShoulderSurfingPlugin:

import com.github.exopandora.shouldersurfing.api.event.IEventBus;
import com.github.exopandora.shouldersurfing.api.plugin.IShoulderSurfingPlugin;

public class ExamplePlugin implements IShoulderSurfingPlugin {
    @Override
    public void register(IEventBus eventBus) {
    }
}

Registering a plugin

Create a file called shouldersurfing_plugin.json in the root folder of your mod (src/main/resources). The JSON must contain a single array field called "entrypoints", which points to the classes that should be loaded as a plugins:

{
    "entrypoints": [
        "com.example.ExamplePlugin"
    ]
}

When the game loads, Shoulder Surfing Reloaded will read that file and create instances for each entry. Entrypoints will be loaded at the end of the Minecraft class constructor invocation in the order listed.

Clone this wiki locally