2.8.6
Bugfix: If in a function the CustomSound was deactivated, the message came that the CustomSound does not exist, if none was specified and if one was specified, the CustomSound was played additionally. This has been fixed.
This commit is contained in:
parent
621f626707
commit
da4bd4975a
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>CommandGUI_V2</artifactId>
|
<artifactId>CommandGUI_V2</artifactId>
|
||||||
<version>2.8.5</version>
|
<version>2.8.6</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>CommandGUI</name>
|
<name>CommandGUI</name>
|
||||||
|
@ -28,14 +28,17 @@ public class Sound {
|
|||||||
break;
|
break;
|
||||||
case Click:
|
case Click:
|
||||||
if (!SelectConfig.getSound_Click_Enable()) return;
|
if (!SelectConfig.getSound_Click_Enable()) return;
|
||||||
if (!function.customSound_Enable) player.playSound(player.getLocation(), SelectConfig.getSound_Click(), 3, 1);
|
if (!function.customSound_Enable) {
|
||||||
|
player.playSound(player.getLocation(), SelectConfig.getSound_Click(), 3, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (function.customSound_NoSound) return;
|
if (function.customSound_NoSound) return;
|
||||||
try {
|
try {
|
||||||
player.playSound(player.getLocation(), org.bukkit.Sound.valueOf(function.customSound_Sound.toUpperCase().replace(".", "_")), 3, 1);
|
player.playSound(player.getLocation(), org.bukkit.Sound.valueOf(function.customSound_Sound.toUpperCase().replace(".", "_")), 3, 1);
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
send.console("§4\n§4\n§4\n" + SelectMessages.SoundNotFound.replace("[prefix]", prefix)
|
send.console("§4\n§4\n§4\n" + SelectMessages.SoundNotFound.replace("[prefix]", prefix)
|
||||||
.replace("[sound]", "§6GUI: §e" + Replace.replace(prefix, gui.guiName) + "§r §6Slot: §e" + slot.slot + " §6CustomSound: §9" + function.customSound_Sound));
|
.replace("[sound]", "§6GUI: §e" + gui.key + " §6Function: §e" + function.key + "§r §6Slot: §e" + (slot.slot + 1) + " §6CustomSound: §9" + function.customSound_Sound));
|
||||||
player.playSound(player.getLocation(), SelectConfig.getSound_Click(), 3, 1);
|
player.playSound(player.getLocation(), SelectConfig.getSound_Click(), 3, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user