Skip to content

Commit

Permalink
chore: update command manual
Browse files Browse the repository at this point in the history
  • Loading branch information
WillowSauceR authored and WillowSauceR committed Aug 30, 2023
1 parent fe6ec06 commit 6de9453
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 44 deletions.
60 changes: 38 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,30 @@ This project uses the [LittleHooker](https://github.com/ExtcanaRy/LittleHooker)
### NBS music playback
NBS music files should be placed in the ``plugins\MediaPlayer\nbs`` folder

Use ``/mpm`` as the main command in the game
The subcommands are ``list``, ``play`` and ``stop``.

| Subcommands | Parameters | Examples | Explanation |
| ----------- | ------------------------------------------------------------- | --------------- | ----------------------------------------------------------------- |
| list | None | /mpm list | Get song index |
| play | song index, optional: loop count, optional: progress bar type | /mpm play 1 3 1 | play song (index 1, loop 3 times, use bossbar to show progress) |
| stop | none | /mpm stop | stop play |

Progress bar type:
0: not displayed
1: bossbar
2: actionbar: JUKEBOX_POPUP
3: actionbar: POPUP
4: actionbar: TIP
#### Commands

``mpm``
- Main command, executed for help

``mpm list [name: string]``
- Lists all music and displays the name and index.
- If you provide the parameter: search keyword ``name``, only the items that match the search will be displayed.

``mpm play <index: number> [loop: number] [music bar type: number]``
- Play the music at the specified index ``index``.
- If parameter is provided: loop number ``loop``, then play the music in a loop for the specified number of times.
- If parameter: music bar type ``music bar type`` is provided, the specified type is used, and one of the following codes must be entered

| code | progress bar type |
| ---- | ------------------------ |
| 0 | do not show |
| 1 | bossbar |
| 2 | actionbar: JUKEBOX_POPUP |
| 3 | actionbar: POPUP |
| 4 | actionbar: TIP |

``mpm stop``
- Stop playing music, or video if playing video at the same time.

Note: Before playing music, please use ``/mpm list`` to get the music list first.
You can also use the ``/mpm`` command inside the game to see how to use it
Expand All @@ -49,14 +58,21 @@ It's not easy to make original nbs music ~ come and support them!
### Video playback
Please place the video folder in the ``plugins\MediaPlayer\video`` folder

Use ``/mpv`` as the main command in the game
The subcommands are ``list``, ``play`` and ``stop``.
#### Commands

``mpv``
- Main command, executed for help

``mpv list [name: string]``
- Lists all music and displays the name and index.
- If you provide the parameter: search keyword ``name``, then only the items with successful search matches will be displayed.

``mpv play <index: number> [loop: number]``
- Play the music at the specified index ``index``.
- If you provide a parameter: loop number ``loop``, then play the video in a loop for the specified number of times.

| Subcommands | Parameters | Examples | Explanation |
| ----------- | -------------------------------------- | ------------- | -------------------------------------- |
| list | none | /mpv list | Get video index |
| play | Video index, Optional: Number of loops | /mpv play 1 3 | Play video (index 1, loop three times) |
| stop | none | /mpv stop | stop playing |
``mpv stop``
- Stop the video.

Note: Please use ``/mpv list`` to get the video list before playing the video. And must be holding the used map
You can also use the ``/mpv`` command in-game to see how to use it
Expand Down
62 changes: 40 additions & 22 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,32 @@
### NBS 音乐播放
NBS音乐文件请放置到``plugins\MediaPlayer\nbs``文件夹中

在游戏中使用``/mpm``作为主命令
子命令为``list````play````stop``

| 子命令 | 参数 | 示例 | 解释 |
| ------ | ------------------------------------------ | --------------- | -------------------------------------------------- |
| list || /mpm list | 获取歌曲索引 |
| play | 歌曲索引,可选:循环次数,可选:进度条类型 | /mpm play 1 3 1 | 播放歌曲(索引为1, 循环3次,使用bossbar显示进度) |
| stop || /mpm stop | 停止播放 |

进度条类型:
0: 不显示
1: bossbar
2: actionbar: JUKEBOX_POPUP
3: actionbar: POPUP
4: actionbar: TIP
#### 命令

``mpm``
- 主命令,执行后可获取帮助

``mpm list [name: string]``
- 列出所有的音乐并显示名称与索引。
- 若提供参数:搜索关键词 ``name``,则只显示搜索匹配成功的项目

``mpm play <index: number> [loop: number] [music bar type: number]``
- 播放指定索引 ``index`` 的音乐
- 若提供参数:循环次数 ``loop``,则循环播放音乐指定次数
- 若提供参数:音乐栏类型 ``music bar type``,则使用指定的类型,必须填入下表代码之一

| 代码 | 进度条类型 |
| ---| -----------------------|
| 0 | 不显示 |
| 1 | bossbar |
| 2 | actionbar: JUKEBOX_POPUP |
| 3 | actionbar: POPUP |
| 4 | actionbar: TIP |

``mpm stop``
- 停止播放音乐,若同时播放视频,也会停止播放视频



注意:在播放音乐之前,请先使用``/mpm list``来获取音乐列表。
具体使用方法,也可以在游戏内使用``/mpm``命令查看
Expand All @@ -50,14 +61,21 @@ NBS音乐文件请放置到``plugins\MediaPlayer\nbs``文件夹中
### 视频播放
视频文件夹请放置到``plugins\MediaPlayer\video``文件夹中

在游戏中使用``/mpv``作为主命令
子命令为``list````play````stop``
#### 命令

``mpv``
- 主命令,执行后可获取帮助

``mpv list [name: string]``
- 列出所有的音乐并显示名称与索引。
- 若提供参数:搜索关键词 ``name``,则只显示搜索匹配成功的项目

``mpv play <index: number> [loop: number]``
- 播放指定索引 ``index`` 的音乐
- 若提供参数:循环次数 ``loop``,则循环播放视频指定次数

| 子命令 | 参数 | 示例 | 解释 |
| ------ | ------------------------ | ------------- | --------------------------- |
| list || /mpv list | 获取视频索引 |
| play | 视频索引,可选:循环次数 | /mpv play 1 3 | 播放视频(索引为1, 循环3次) |
| stop || /mpv stop | 停止播放 |
``mpv stop``
- 停止播放视频

注意:在播放视频之前,请先使用``/mpv list``来获取视频列表。且必须手持已使用的地图
具体使用方法,也可以在游戏内使用``/mpv``命令查看
Expand Down

0 comments on commit 6de9453

Please sign in to comment.