Overview
Oyasai Server Platform uses a monorepo structure to manage all Minecraft plugins. Plugins are built using Kotlin, Gradle, and the Purpur API. All development tools are provided through Nix to ensure consistent environments.Available Plugins
The platform includes the following plugins:- DynamicProfile - Player profile and statistics management
- EntityPose - Entity positioning utilities
- OyasaiAdminTools - Administrative tools for server management
- OyasaiPets - Pet system with BigWolf feature
- OyasaiUtilities - Collection of utility features (NotNBT, OreReappears, AdminBP, etc.)
- PaintTools - Painting and building tools
- SocialLikes3 - Social interaction features
- SocialVotes - Voting system
- TPswitch - Teleportation switching
- Vertex - Additional server utilities
Development Environment Setup
Prerequisites
Install Nix
- Install Nix from nixos.org. Multi-user installation is recommended:
- Enable experimental features:
- Restart your terminal and verify the installation:
- Enter the development shell:
- Java (Temurin JDK 25)
- Gradle 9
- Node.js 24
- Terraform
- gradle2nix CLI
nix/devshells.nix:9-20 for the complete package list.
Project Structure
Building Plugins
Build All Plugins
From the repository root:Build a Specific Plugin
Build Configuration
All plugins underplugins/ are automatically configured by the root build.gradle.kts with:
- Kotlin JVM plugin
- Shadow plugin for creating fat JARs
- Version property expansion in
plugin.yml - Duplicate strategy handling
- Custom Maven repositories (Purpur, Frengor, Scarsz)
build.gradle.kts:21-53 for the complete configuration.
Creating a New Plugin
1. Create Plugin Directory
2. Create build.gradle.kts
Createplugins/MyPlugin/build.gradle.kts:
3. Create plugin.yml
Createplugins/MyPlugin/src/main/resources/plugin.yml:
4. Create Main Plugin Class
Createplugins/MyPlugin/src/main/kotlin/com/oyasai/myplugin/MyPlugin.kt:
5. Register in Nix Build
The plugin will be automatically discovered bysettings.gradle.kts:3-6 and built as part of the batch build in nix/oyasai-scope.nix:50-76.
Managing Dependencies
Adding Dependencies
- Add the dependency to your plugin’s
build.gradle.kts:
- Regenerate the Nix lockfile:
gradle.lock to include the new dependencies for reproducible Nix builds.
Available Repositories
Configured inbuild.gradle.kts:13-18:
- Maven Central
- Purpur MC:
https://repo.purpurmc.org/snapshots - Frengor:
https://nexus.frengor.com/repository/public/ - Scarsz:
https://nexus.scarsz.me/content/groups/public/
Plugin Examples
Example: Simple Command
Example: Event Listener
Testing Plugins Locally
See Testing for information on running a local Purpur server with your plugins.Next Steps
Gradle Workflow
Learn about Gradle build tasks and workflows
Testing
Test your plugins with a local server
Nix Packages
Create server configurations with Nix
Contributing
Submit your changes via pull request