PlayMoreSounds | Assign sounds to player events 播放更多声音 | 为玩家事件分配声音
当事件被触发时播放声音。
点此下载插件详细介绍
PlayMoreSounds 是一款功能全面的 Minecraft 插件,允许你为各种事件分配自定义声音。它的主要目标是在玩家触发特定事件(例如,动作)时播放声音。
✨ 简介
PlayMoreSounds 需要 EpicPluginLib 才能运行!
- 原生 Minecraft 版本: 1.18
- 测试 Minecraft 版本: 1.17, 1.18
- 支持语言: 可自定义,默认提供中文、葡萄牙语和西班牙语
🔊 音效事件
PlayMoreSounds 拥有许多事件,有些事件支持为特定场合设置不同的声音。
只有你使用的事件才会被注册,因此即使你只想为一个事件设置声音,也不用担心插件的性能消耗!
- 服务器封禁玩家
- 切换手持物品 - 支持特定物品!
- 改变等级
- 切换世界
- 聊天 - 支持特定聊天内容!
- 合成物品
- 丢弃物品
- 编辑书本
- 实体碰撞 - 支持特定实体互相碰撞,并支持手持特定物品!
- 实体跳跃 (需要 Paper)
- 首次加入服务器
- 熔炉取出物品
- 游戏模式切换 - 支持切换到特定游戏模式!
- 点击物品栏 - 支持点击特定物品!
- 关闭物品栏
- 加入服务器
- 服务器踢出玩家
- 离开服务器
- 躺入床上 | 离开床上
- 进入和离开特定生物群系 - 支持循环播放声音!
- 玩家死亡 - 支持特定死亡类型!
- 玩家跳跃 (需要 Paper)
- 玩家击杀或被击杀
- 玩家挥动手臂 - 支持挥动特定物品!
- 传送门创建
- 进入和离开区域 - 支持循环播放声音!
- 重生
- 发送命令 - 支持特定命令!
- 开始飞行 | 停止飞行
- 切换主副手
- 通过命令传送
- 切换潜行状态
- 起床
- 天气下雨 | 雨停
- 世界特定时间
要设置声音,请编辑 'sounds.yml' 文件。以下是一个教程:
###########################################################################################################
# Set a sound to play when an event is triggered. #
# #
# Create a section with the name of the event you want to play a sound, for example: #
# #
Teleport: # The event that when triggered, a sound will be played. #
# Cancellable prevents the sound from playing if another plugin cancelled the event. This boolean helps #
#sounds be compatible with other plugins. #
Cancellable: true #
# Enables or disables a sound. In sounds.yml when this boolean is set to false the event is unregistered#
#as well, so you can use this plugin if you want to play sounds just for one event and don't worry about#
#performance being spent on things you don't use. #
Enabled: true #
# This is a list of sounds that will be played. You can copy and paste the options below to play #
#multiple sounds, each section must have a different name, here I numbered them just for organization. #
Sounds: #
'1': #
# The category this sound will be played. #
Category: MASTER #
# This is a delay in ticks the sound will wait before playing. Set to 0 for no delay. #
Delay: 0 #
# Sounds can have multiple options, all of them are optional. #
Options: #
# Even if a player has toggled their sounds off using "/pms toggle", the sound will be played. #
Ignores Disabled: false #
# The sound will be only played if the player has this permission. #
# In case the event is not triggered by a player, this option is ignored. #
Permission Required: 'playmoresounds.reproduce.teleport' #
# The sound will be only listened by who have this permission. #
# In case this is a Radius sound and the player has the Permission Required and not #
#Permission To Listen, the sound will be played anyway, but only those in the Radius with the #
#Permission To Listen will hear. #
Permission To Listen: 'playmoresounds.listen.teleport' #
# A range of blocks the sound will be hearable. #
# A distance in blocks is calculated to every player in the world if the value is greater than 0. #
# If you want the sound to play only to the player who triggered the event, set this to 0. #
# If you want the sound to play to everyone online in the server, set this to -1. #
# If you want the sound to play to everyone in the event's world, set this to -2. #
Radius: 15.2 #
# A location is added to the event's final location. This will always respect where the player is #
#looking, i.e. if you add blocks to right the sound will be played to the player's right ear. #
# Relative location option consumes a lot of memory, I recommend you leave it disabled if your #
#server has a lot of players. #
# Set negative to add blocks to the opposite direction, for example: #
Relative Location: #
FRONT_BACK: 1.3 # This will be played relative to the back. #
RIGHT_LEFT: -0.01 # This will be played relative to the right. #
UP_DOWN: 0.13 # This will be played relative to up. #
# What the sound pitch is, values greater than 2 have no difference. #
Pitch: 1.0 #
# You can set this to either a Sound Type or a Custom Sound. #
# Custom sounds do not need to be listed anywhere in the plugin, just set this value to the name of #
#custom sound you set in your resource pack's sounds.json. #
# PlayMoreSounds' sound types are different than bukkit's sound types, PlayMoreSounds' sound types #
#are always the same no matter which version of the server you are running, so sounds have the same #
#names in 1.7 to 1.18. #
Sound: ENTITY_ENDERMAN_TELEPORT #
# The volume of the sound. The way minecraft does it is by distance, volume 1 = ~15 blocks. #
# If you are playing region sounds you might want to set this to a big number so it plays with the #
#same volume the whole region. #
# You will notice the volume go lower if you set it to a decimal lower than 1. #
Volume: 0.9 #
# #
# Any of the above options are optional, here's an example of a sound that doesn't need to use all of #
#these options: #
Player Death: #
Enabled: true #
Sounds: #
'1': #
Sound: ENTITY_WITHER_SPAWN #
# #
# If you don't want to use a sound, you can either completely remove it from this configuration or set #
#'Enabled' to false, like this: #
Bed Leave: #
Enabled: false # Disabled sounds will be unregistered and not affect server performance. #
###########################################################################################################
🗺️ 区域
PlayMoreSounds 拥有自己的区域系统,每个玩家都可以拥有自己的区域,并为该区域添加进入、离开和循环播放的声音。
你可以通过命令或区域工具选择区域。
区域工具:
- 输入命令
/pms region wand以获取区域选择工具。 - 要选择区域,请点击要创建区域的两个端点。左键单击选择位置 1,右键单击选择位置 2。
命令:
如果你在游戏中,可以使用命令 /pms region set p1 或 /pms region set p2 将当前位置设置为选点。
如果你在控制台中,可以使用命令 /pms region set p1|p2 <world> <x> <y> <z> 选择位置。
要创建区域,请使用命令 /pms region create [name] [description]。
目前,设置区域声音的唯一方法是将其添加到 'Sounds' 文件夹中的 'regions.yml' 文件中。请阅读该文件,了解如何操作的教程。未来,我计划创建一个 GUI 来更轻松地向区域添加声音。
⚙️ 插件 Hook
PlayMoreSounds 支持插件 Hook,这些 Hook 可以为任何你想要的插件添加兼容性。
如何安装 Hook:
要安装 Hook,请输入命令 '/pms addons'。这将打开 Hook 管理 GUI,点击 "安装 Hook":
插件将从 PlayMoreSounds 的 GitHub 下载最新的 Hook。
完成后,将弹出另一个包含你要安装的 Hook 的界面:
安装完成后,点击 "完成" 以关闭界面。
这些 Hook 将在下次服务器重启时加载。安装 Hook 后,Hook 管理界面的外观如下:
PlayMoreSounds 目前有 13 个 Hook:
- AuthMe Hook: 为 AuthMe 的登录和注册事件添加声音。
- ChatReaction Hook: 为 ChatReaction 的反应失败、开始和获胜添加声音。
- CMI Hook: 为 CMI 的 afk 和 vanish 切换事件添加声音。
- Custom Discs: 添加可以用作点唱机中的光盘来播放自定义声音的自定义物品。
- Essentials Hook: 为 Essentials 的 afk、god 和 vanish 切换事件添加声音。
- EssentialsChat Hook: 允许你在本地、喊话和问题频道中说话时分配声音。
- Nature Sound Replacer: 替换或停止服务器中播放的默认 Minecraft 声音。
- NBS Song Player: 使用 NoteBlockAPI 播放 .nbs 歌曲。
- Sound Commands: 在播放声音时执行命令。
- Sound Factors: 如果玩家不在高度或时间的范围内,则阻止播放声音。
- SuperVanish Hook: 为 SuperVanish 的 vanish 事件添加声音。
- VentureChat Hook: 允许你在特定频道中说话时分配声音。
- WorldGuard Regions: 允许你为 WorldGuard 区域播放进入、离开和循环播放的声音。
你可以在 PlayMoreSounds 的论坛上找到更多关于 Hook 的教程。
🛠️ 安装
- 下载 PlayMoreSounds 和 EpicPluginLib。
- 将 PlayMoreSounds 和 EpicPluginLib 放入你的 plugins 文件夹。
- 重启你的服务器。
- (可选) 安装兼容性插件 Hook。
- (可选) 编辑 sounds.yml 文件以设置默认声音,或编辑 Sounds 文件夹中的文件以设置特定声音。
- (可选) 向玩家添加权限。
🔑 权限
playmoresounds.player- 默认向玩家添加 toggle 命令权限。playmoresounds.bypass.invisibility- 允许玩家在拥有隐身效果时隐藏他们的范围声音。
命令权限:
playmoresounds.confirm- 允许玩家确认待处理的请求(例如,删除区域)。playmoresounds.disc.give- 允许玩家使用 '/pms disc' 命令从配置中获取自定义点唱机光盘。playmoresounds.disc.give.others- 允许玩家使用 '/pms disc' 命令将配置中的自定义点唱机光盘赠送给其他玩家。playmoresounds.disc.use- 允许玩家使用自定义点唱机光盘。playmoresounds.editor- 允许玩家浏览 PlayMoreSounds 文件夹并查看可用的文件和声音。playmoresounds.editor.save- 允许玩家在 PlayMoreSounds 文件夹中创建和编辑文件的声音。playmoresounds.help- 允许玩家查看他们有权使用的命令列表。playmoresounds.help.command- 允许玩家查看他们有权使用的特定命令的描述。playmoresounds.list- 允许玩家查看可用的声音列表。playmoresounds.list.gui- 允许玩家打开一个 GUI 列出可用的声音。playmoresounds.play- 允许玩家播放声音。playmoresounds.play.others- 允许玩家向其他玩家播放声音。playmoresounds.region- 允许玩家使用区域命令。playmoresounds.region.create- 允许玩家从他们的选择中创建一个区域。playmoresounds.region.create.unlimited.area- 允许玩家绕过配置中设置的区域块数量限制。playmoresounds.region.create.unlimited.regions- 允许玩家绕过配置中设置的已声明区域数量限制。playmoresounds.region.description- 允许玩家更改其区域的描述。playmoresounds.region.description.others- 允许玩家更改其他人创建的区域的描述。playmoresounds.region.info- 允许玩家查看所有区域的信息。playmoresounds.region.list- 允许玩家列出他们的区域。playmoresounds.region.list.others- 允许玩家列出其他人的区域。playmoresounds.region.remove- 允许玩家删除他们的区域。playmoresounds.region.remove.others- 允许玩家删除其他人创建的区域。playmoresounds.region.rename- 允许玩家重命名他们的区域。playmoresounds.region.rename.others- 允许玩家重命名其他人创建的区域。playmoresounds.region.select.command- 允许玩家使用命令进行选择。playmoresounds.region.select.overlap- 允许玩家在他们不拥有的其他区域内进行选择。playmoresounds.region.select.wand- 允许玩家使用魔杖工具进行选择。playmoresounds.region.sound.enter- 允许玩家保存一个制作好的声音,以便在人们进入他们拥有的区域时播放。playmoresounds.region.sound.loop- 允许玩家保存一个制作好的声音,以便在他们拥有的区域中循环播放。playmoresounds.region.sound.leave- 允许玩家保存一个制作好的声音,以便在人们离开他们拥有的区域时播放。playmoresounds.region.sound.others- 允许玩家保存一个制作好的声音,以便在其他人创建的区域中播放。playmoresounds.region.teleport- 允许玩家传送到他们的区域。playmoresounds.region.teleport.others- 允许玩家传送到其他人创建的区域。playmoresounds.region.wand- 允许玩家获取区域选择工具。playmoresounds.stopsound- 允许玩家停止他们当前播放的声音。playmoresounds.stopsound.others- 允许玩家停止其他人当前播放的声音。playmoresounds.toggle- 允许玩家切换他们的声音。playmoresounds.toggle.check- 允许玩家检查他们的声音是否已启用。playmoresounds.toggle.check.others- 允许玩家检查其他玩家的声音是否已启用。playmoresounds.toggle.others- 允许玩家切换其他玩家的声音。playmoresounds.update- 允许玩家检查更新。playmoresounds.update.joinmessage- 允许玩家在加入服务器时收到更新可用消息。
⌨️ 命令
/playmoresounds addons [list|uninstall]- 打开一个 GUI,帮助你安装或卸载插件 Hook。/playmoresounds check [target]- 检查目标的声音是否已启用。/playmoresounds confirm [id|list]- 确认待处理的操作。/playmoresounds editor- 打开一个 GUI,显示 PlayMoreSounds 数据文件夹文件,你可以在其中播放或添加声音。/playmoresounds help [command]- 显示命令的描述。/playmoresounds list [page] [--gui]- 通过 GUI 或文本列出你版本中可用的声音。/playmoresounds play <sound|path> [target] [vol] [pitch]- 向目标播放声音或配置声音。/playmoresounds region <create|info|list|remove|rename|set|sound|teleport|wand>- 区域命令。/playmoresounds stopsound [target] [sounds]- 停止目标的声音。/playmoresounds toggle [target] [on|off]- 切换目标的声音。/playmoresounds update [download [--force]]- 检查或下载 PlayMoreSounds 更新。
📊 指标
PlayMoreSounds 使用 bStats 收集匿名指标,这些指标可以帮助我决定如何开发插件。如果你不想发送指标,请在 bStats 配置中禁用它。