▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/BSLib
BSLib

BSLib

BSLib Library aims to eliminate boilerplate code, streamline development workflows, and introduce modern reactive programming paradigms to the Minecraft ecosystem.

14
0

BSLib First Snapshot Release: Modernizing Minecraft Plugin Development

I GAVE UP ON THIS LIBBARY IT'S GETTING TO COMPLICATED!!

We are thrilled to announce the first snapshot release of BSLib, a powerful and comprehensive framework designed to revolutionize the way you develop plugins for Minecraft Paper servers. BSLib aims to eliminate boilerplate code, streamline development workflows, and introduce modern reactive programming paradigms to the Minecraft ecosystem.

DOCUMENTATION

Why BSLib?

BSLib is built on the principle of state-driven development, allowing you to define your plugin's logic and UI in a declarative manner. This means less time wrestling with manual updates and more time focusing on innovative features. Key highlights include:

  • Reactive UI: Create dynamic and responsive GUIs, scoreboards, and other in-game elements that automatically update when your data changes, similar to modern web frameworks.
  • Zero-Boilerplate Setup: With @AutoScan and FrameworkPlugin, BSLib handles dependency injection, command registration, event listening, and configuration loading automatically, significantly reducing setup time.
  • Robust Asynchronous Operations: Safely manage complex asynchronous tasks with AsyncChain, preventing common concurrency issues and ensuring smooth server performance.
  • Declarative Command System: Define commands and subcommands using simple annotations, complete with automatic tab completion and permission handling.
  • Flexible State Persistence: Easily save and load plugin data to YAML or JSON with automatic dirty tracking and configurable autosave intervals.
  • Live Reload Capabilities: Update plugin configurations and re-inject services without a full server restart, drastically speeding up your development cycle.

Getting Started

To integrate BSLib into your project, you need to declare a dependency on the BSLib-paper plugin in your plugin.yml file and add the BSLib library dependency to your build configuration. Replace LATEST_SNAPSHOT_TAG with the actual latest commit hash or release tag from the BSLib GitHub repository.

Plugin Dependency (plugin.yml)

For your plugin to correctly utilize BSLib-paper, you must declare it as a dependency in your plugin.yml file. This ensures that BSLib-paper is loaded before your plugin and its services are available.

name: YourPluginName
version: 1.0.0
main: com.yourplugin.YourPluginMainClass
author: YourName
depend: [BSLib]

Alternatively, if your plugin can function with reduced features when BSLib is not present, you can use softdepend instead of depend.

name: YourPluginName
version: 1.0.0
main: com.yourplugin.YourPluginMainClass
author: YourName
softdepend: [BSLib]

Library Dependency (Build System)

Gradle (Groovy DSL)

Step 1. Add the JitPack repository to your settings.gradle:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency to your build.gradle:

	dependencies {
	        implementation 'com.github.Fragmer2.BSLib:bslib-api:7a5257256f'
	}

Gradle (Kotlin DSL)

Step 1. Add the JitPack repository to your settings.gradle.kts:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

Step 2. Add the dependency to your build.gradle.kts:

	dependencies {
	        implementation("com.github.Fragmer2.BSLib:bslib-api:7a5257256f")
	}

Maven

Step 1. Add the JitPack repository to your pom.xml:

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

Step 2. Add the dependency to your pom.xml:

	<dependency>
	    <groupId>com.github.Fragmer2.BSLib</groupId>
	    <artifactId>bslib-api</artifactId>
	    <version>7a5257256f</version>
	</dependency>

SBT

Step 1. Add the JitPack resolver to your build.sbt:

resolvers += "jitpack" at "https://jitpack.io"

Step 2. Add the dependency to your build.sbt:

	libraryDependencies += "com.github.Fragmer2.BSLib" % "bslib-api" % "7a5257256f"	

Leiningen

Step 1. Add the JitPack repository to your project.clj:

:repositories [["jitpack" "https://jitpack.io"]]

Step 2. Add the dependency to your project.clj:

	:dependencies [[com.github.Fragmer2.BSLib/bslib-api "7a5257256f"]]	

Feedback and Contributions

This is an early snapshot, and we highly encourage you to experiment with BSLib and provide your valuable feedback. Your input will be crucial in shaping the future development of this framework. Please report any issues or suggest features on the GitHub repository.

Thank you for being a part of the BSLib journey!

Совместимость

Minecraft: Java Edition

1.21.x1.20.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:Apache-2.0
Опубликован:1 месяц назад
Обновлён:1 месяц назад
Главная