Skip to content

Developer API

whereareiam edited this page Feb 25, 2025 · 3 revisions

Socialismus provides a powerful and flexible Developer API, enabling you to extend its functionality, create custom modules, and integrate seamlessly with your server. Whether you're building custom commands, modifying chat behavior, or creating entirely new features, our API has you covered!


πŸ“¦ Dependency Setup

The Socialismus API is available through JitPack. We offer two types of releases:

  • dev-SNAPSHOT: Contains the latest API changes from the most recent commit.
  • Release Versions: Stable releases, such as 2.0.0-RC1.

To add the API to your project, include the following repository and dependency:

πŸ”Ή Gradle (Groovy)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.whereareiam:Socialismus:version'
}

πŸ”Ή Gradle (Kotlin)

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.whereareiam:Socialismus:version")
}

πŸ”Ή Maven

<repositories>
    <repository>
        <id>jitpack</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.whereareiam</groupId>
        <artifactId>Socialismus</artifactId>
        <version>version</version>
    </dependency>
</dependencies>

Replace version with either a stable release (e.g., 2.0.0-RC1) or dev-SNAPSHOT for the latest development version.


πŸ”‘ Key API Features

The Socialismus API offers a wide range of features for plugin and module developers:

  1. 🎈 Events:

    • Listen to and handle custom Socialismus events.
    • Modify chat messages, module handling and other stuff.
  2. βš™οΈ Workers (Pipelines):

    • Use the pipeline system to inject your own tasks into Socialismus logic.
    • For example, you can override the default chat handling and implement your own logic.
  3. ⚑ Advanced Command Framework:

    • Build powerful commands effortlessly with Socialismus' streamlined command system.
    • Built on top of the Cloud Framework, enhanced with Socialismus utilities for easier development.
    • Write cleaner code with less boilerplate while maintaining flexibility and control.
  4. πŸͺ„ Module Loading & Handling:

    • Easily create and manage custom modules.
    • Register new functionality without modifying the core plugin.

πŸ“– Example Usage

Examples of API usage can be found:

  • Within the Socialismus plugin itself.
  • In the official Socialismus modules.

For practical examples and templates, explore the source code or check the example modules.


πŸ› οΈ Creating Custom Modules

If you'd like to create a custom module for Socialismus, we've made it easy with a module template.
πŸ‘‰ Socialismus Module Template


For further assistance, feel free to reach out via Telegram or Discord.

Getting started

  1. Home
  2. Installation
  3. Placeholders

Modules

  1. Chat
  2. Chirper
  3. Bubbler
  4. Mentionator

Config explanation

  1. settings
  2. commands
  3. messages

Logic explanation

  1. Chat search
  2. Requirements

Other

  1. Developer API

Clone this wiki locally