Respect sound enable/disable setting in config.

This commit is contained in:
NovaFox161 2018-05-14 11:37:19 -05:00
parent c89ec14608
commit cb6289109d

View File

@ -12,8 +12,12 @@ public class References {
public References() {
try {
prefix = Lang.PREFIX.getConfigValue() + " ";
playSound = UltimateKits.getInstance().getConfig().getBoolean("Main.Sounds Enabled");
sound = Sound.valueOf(UltimateKits.getInstance().getConfig().getString("Main.Sound Played While Clicking In Inventories"));
if (playSound) {
sound = Sound.valueOf(UltimateKits.getInstance().getConfig().getString("Main.Sound Played While Clicking In Inventories"));
}
} catch (Exception ex) {
Debugger.runReport(ex);
}