NoteBlockAPI (Folia)

A developer API for playing .nbs note-block songs to players — ported to Folia, while remaining compatible with classic Paper.

27 downloads 0 followers

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 FoliaCompat scheduler 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; playTick is dispatched on each listener's region thread, avoiding cross-region entity/block access violations.
  • Region-aware events: SongEnd, SongStopped etc. 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/getActiveWorkers calls that throw UnsupportedOperationException on Folia, replaced with explicit cancellation and thread interruption.
  • Dependency bumps: Java 21 target, Paper API 1.21.1, plugin.yml marked folia-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.

No gallery available for this project.

Version Minecraft Loader Download

NoteBlockAPI-Folia 1.7.0

1.7.0-folia

26.1, 26.1.1, 26.1.2, 26.2
folia, paper
Download