Permissions

The permission customdiscs.command is now required to run /customdisc .
This commit is contained in:
Navoei
2022-07-10 18:14:24 -05:00
parent 7794ca19de
commit 0c0307607c
3 changed files with 2 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ public class CustomDisc implements CommandExecutor {
Player p = (Player) sender;
// /customdisc wewontbealone "We wont be alone"
if (command.getName().equalsIgnoreCase("customdisc")) {
if (command.getName().equalsIgnoreCase("customdisc") && p.hasPermission("customdiscs.command")) {
if (isMusicDisc(p)) {
if (args.length >= 2) {

View File

@@ -65,9 +65,6 @@ public class JukeBox implements Listener {
LocationalAudioChannel audioChannel = VoicePlugin.voicechatServerApi.createLocationalAudioChannel(id, VoicePlugin.voicechatApi.fromServerLevel(block.getLocation().getWorld()), VoicePlugin.voicechatApi.createPosition(block.getLocation().getX() + 0.5d, block.getLocation().getY() + 0.5d, block.getLocation().getZ() + 0.5d));
try {
AudioPlayer audioPlayer = VoicePlugin.voicechatServerApi.createAudioPlayer((AudioChannel) audioChannel, VoicePlugin.voicechatApi.createEncoder(), readSoundFile(soundFilePath));
playerMap.put(id, audioPlayer);
audioPlayer.startPlaying();