BSLib
BSLib Library aims to eliminate boilerplate code, streamline development workflows, and introduce modern reactive programming paradigms to the Minecraft ecosystem.
BSLib
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.
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:
* Live Reload Capabilities: Create dynamic and responsive GUIs, scoreboards, and other in-game elements that automatically update when your data changes, similar to modern web frameworks. * Live Reload Capabilities: With `@AutoScan` and `FrameworkPlugin`, BSLib handles dependency injection, command registration, event listening, and configuration loading automatically, significantly reducing setup time. * Live Reload Capabilities: Safely manage complex asynchronous tasks with `AsyncChain`, preventing common concurrency issues and ensuring smooth server performance. * Live Reload Capabilities: Define commands and subcommands using simple annotations, complete with automatic tab completion and permission handling. * Live Reload Capabilities: 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.
```yaml 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`.
```yaml 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`:
```groovy dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { mavenCentral() maven { url 'https://jitpack.io' } } } ```
Step 2. Add the dependency to your `build.gradle`:
```groovy dependencies { implementation 'com.github.Fragmer2.BSLib:bslib-api:7a5257256f' } ```
Gradle (Kotlin DSL)
Step 1. Add the JitPack repository to your `settings.gradle.kts`:
```kotlin 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`:
```kotlin dependencies { implementation("com.github.Fragmer2.BSLib:bslib-api:7a5257256f") } ```
Maven
Step 1. Add the JitPack repository to your `pom.xml`:
```xml <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> ```
Step 2. Add the dependency to your `pom.xml`:
```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`:
```scala resolvers += "jitpack" at "https://jitpack.io" ```
Step 2. Add the dependency to your `build.sbt`:
```scala libraryDependencies += "com.github.Fragmer2.BSLib" % "bslib-api" % "7a5257256f" ```
Leiningen
Step 1. Add the JitPack repository to your `project.clj`:
```clojure :repositories [["jitpack" "https://jitpack.io"]] ```
Step 2. Add the dependency to your `project.clj`:
```clojure :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!