Merge branch 'development'

This commit is contained in:
Brianna 2020-11-19 12:44:55 -06:00
commit 20e40dd223
2 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>EpicVouchers</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>2.1.19</version>
<version>2.1.20</version>
<build>
<defaultGoal>clean install</defaultGoal>
<finalName>EpicVouchers-${project.version}</finalName>

View File

@ -1,5 +1,6 @@
package com.songoda.epicvouchers.voucher;
import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.TextUtils;
import com.songoda.epicvouchers.EpicVouchers;
import com.songoda.epicvouchers.events.VoucherRedeemEvent;
@ -142,7 +143,11 @@ public class VoucherExecutor {
}
if (voucher.getSound() != null && !voucher.getSound().isEmpty()) {
player.playSound(player.getLocation(), Sound.valueOf(voucher.getSound()), Integer.MAX_VALUE, voucher.getSoundPitch());
try {
CompatibleSound sound = CompatibleSound.valueOf(voucher.getSound());
sound.play(player, Integer.MAX_VALUE, voucher.getSoundPitch());
} catch (IllegalArgumentException ignored) {
}
}
String particle = voucher.getParticle();