@occultus/music-api
v0.20.0
Published
Star Tenon music api
Maintainers
Readme
Star Tenon Music API
本包提供了音乐相关的 API,可以方便的创建新的音乐唱片。
MusicDisc 和 MusicDiscServer
本包提供了两个类:MusicDisc 和 MusicDiscServer,其分别用于储存自定义的音乐唱片的数据和管理音乐唱片服务器端逻辑。
具体用法如下:
// 创建音乐唱片服务器实例
const musicServer = new MusicDiscServer();
// 创建一个新的音乐唱片实例
const disc = new MusicDisc(
"occultus:music_disc_example",
"Example Track",
"Example Disc",
"Example Artist"
);
// 添加唱片到服务器
musicServer.addDisc(disc);支持版本
本 API 支持任意可以运行 Script API v2.0.0+ 的游戏版本,包括:
- 1.21.90;
- 1.21.100;
- 1.21.110;
- 以及更多……
注意:本包理论上可以在部分更旧的版本上运作,但未经过严格的测试。
协议
本项目使用 MIT License 授权:
The MIT License (MIT)
Copyright © 2025 CTN Studios
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.