Compatibility
Minecraft: Java Edition
26.2
26.1.x
Platforms
Links
Tags
Creators
Details
Licensed LGPL-3.0-or-later
Published 3 days ago
Updated 2 months ago
NoteBlockAPI (Folia)
A developer API for playing .nbs note-block songs to players — ported to Folia, while remaining compatible with classic Paper.
This repository is a Folia-compatible fork of koca2000/NoteBlockAPI.
What's in this fork
- Folia support: a
FoliaCompatscheduler bridge that transparently routes all Bukkit scheduler calls to Folia's Global / Region / Async / Entity Scheduler (falling back to the classic scheduler on ordinary Paper). - Thread-safe playback: song playback moved from a shared async pool to a tracked dedicated thread;
playTickis dispatched on each listener's region thread, avoiding cross-region entity/block access violations. - Region-aware events:
SongEnd,SongStoppedetc. are fired on the song's region (block players on the block region, entity players on the entity region), so downstream plugins can safely touch the related blocks/entities. - Clean enable/disable: removed the
BukkitScheduler.cancelTasks/getActiveWorkerscalls that throwUnsupportedOperationExceptionon Folia, replaced with explicit cancellation and thread interruption. - Dependency bumps: Java 21 target, Paper API 1.21.1,
plugin.ymlmarkedfolia-supported: true.
Requirements
| Component | Version |
|---|---|
| Server | Folia 26.x (or Paper 1.21+) |
| Java | 21+ |
Build
mvn clean install
Artifact: target/NoteBlockAPI-*-SNAPSHOT.jar (shaded with bstats). install also publishes it to your local Maven repository, for downstream plugins such as MusicBox (Folia).
Usage
Declare depend: [NoteBlockAPI] in your plugin's plugin.yml, then use the SongPlayer API to play .nbs songs. See the Spigot resource page for details.
Credits & License
- Original: xxmicloxx et al.; fork: koca2000/NoteBlockAPI
- License: LGPL v3 (see LICENSE), inherited from the original project.

