From f0d44f1756c9223f7de278272c223aa4b7317f6f Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 19 Nov 2020 12:43:31 -0600 Subject: [PATCH 1/2] Fixed an issue with incompatible sounds. --- .../com/songoda/epicvouchers/voucher/VoucherExecutor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/epicvouchers/voucher/VoucherExecutor.java b/src/main/java/com/songoda/epicvouchers/voucher/VoucherExecutor.java index 1f5ad75..2847148 100644 --- a/src/main/java/com/songoda/epicvouchers/voucher/VoucherExecutor.java +++ b/src/main/java/com/songoda/epicvouchers/voucher/VoucherExecutor.java @@ -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(); From 4160786a30c7d6d89028ed2b0144d63ebd5e7f15 Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 19 Nov 2020 12:44:47 -0600 Subject: [PATCH 2/2] version 2.1.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ebae39e..2f30a9e 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ com.songoda EpicVouchers 4.0.0 - 2.1.19 + 2.1.20 clean install EpicVouchers-${project.version}