Skip to content

Commit

Permalink
Remove erroneous class argument
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 21, 2020
1 parent ec1a639 commit bc9f749
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -517,13 +517,14 @@ public GameProfile getProfile(SkullMeta meta) {
@Override
public String getSound(String flag) throws CommandException {
try {
Sound sound = Sound.valueOf(flag.toUpperCase());
if (CRAFTSOUND_GETSOUND != null) {
String ret = (String) CRAFTSOUND_GETSOUND.invoke(CraftSound.class, Sound.valueOf(flag.toUpperCase()));
String ret = (String) CRAFTSOUND_GETSOUND.invoke(sound);
if (ret == null)
throw new CommandException(Messages.INVALID_SOUND);
return ret;
} else {
SoundEffect effect = CraftSound.getSoundEffect(Sound.valueOf(flag.toUpperCase()));
SoundEffect effect = CraftSound.getSoundEffect(sound);
if (effect == null)
throw new CommandException(Messages.INVALID_SOUND);
MinecraftKey key = (MinecraftKey) SOUNDEFFECT_KEY.invoke(effect);
Expand Down

0 comments on commit bc9f749

Please sign in to comment.