This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
me/simplicitee/project/addons Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323hs_err_pid *
2424/bin /
2525/target /
26+ .idea /*
27+ * .iml
Original file line number Diff line number Diff line change @@ -486,16 +486,16 @@ public void onChat(AsyncPlayerChatEvent event) {
486486 } else if (args .length != 2 ) {
487487 player .sendMessage (ProjectAddons .instance .prefix () + ChatColor .RED + " Invalid format, try `@vocalsound <sound>`" );
488488 } else {
489- Sound sound = Sound . valueOf ( args [ 1 ]. toUpperCase ());
490-
491- if ( sound != null ) {
489+ try {
490+ Sound sound = Sound . valueOf ( args [ 1 ]. toUpperCase ());
491+
492492 if (plugin .getConfig ().getStringList ("Abilities.Air.VocalMimicry.SoundBlacklist" ).contains (sound .toString ())) {
493493 player .sendMessage (ProjectAddons .instance .prefix () + ChatColor .RED + " Cannot use that sound!" );
494494 } else {
495495 VocalMimicry .selectSound (player , sound );
496496 player .sendMessage (ProjectAddons .instance .prefix () + ChatColor .GREEN + " Successfully set vocal sound to " + args [1 ].toLowerCase ());
497497 }
498- } else {
498+ } catch ( IllegalArgumentException e ) {
499499 player .sendMessage (ProjectAddons .instance .prefix () + ChatColor .RED + " Unknown sound!" );
500500 }
501501 }
Original file line number Diff line number Diff line change 11name : ProjectAddons
22author : Simplicitee
33api-version : 1.16
4- version : 1.2.2
4+ version : 1.2.3
55main : me.simplicitee.project.addons.ProjectAddons
66depend : [ProjectKorra]
77commands :
You can’t perform that action at this time.
0 commit comments