This is a small addon for OpenAudioMc that can disable some gameplay features (or any player events) when players aren't connected to the audio client or aren't using voicechat
Installation:
Download
Dump in your plugins folder
Restart
Profit
Config:
Code (Text):
# The following events will be canceled if the player isn't connected to voice chat, and the player
# will receive in game messages
message-when-canceled: '&4You need to have the audio client open in order to do this (/audio)'
require-voice-chat: true
timeout-seconds: 5
events:
- 'org.bukkit.event.block.BlockBreakEvent'
- 'org.bukkit.event.block.BlockPlaceEvent'
- 'org.bukkit.event.entity.EntityCombustEvent'
- 'org.bukkit.event.entity.EntityDamageByEntityEvent'
- 'org.bukkit.event.entity.EntityDamageEvent'
- 'org.bukkit.event.player.PlayerCommandPreprocessEvent'
- 'org.bukkit.event.player.PlayerDropItemEvent'
- 'org.bukkit.event.player.PlayerInteractEvent'
- 'org.bukkit.event.entity.ProjectileLaunchEvent'
- 'org.bukkit.event.player.PlayerMoveEvent'