Permalink
Browse files

Do compile time check for valid sounds on our own list

  • Loading branch information...
PseudoKnight committed Aug 14, 2018
1 parent 73a1ee7 commit fe32b4f58638df5c0b8acbf4e131d179e2fc065d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/laytonsmith/core/functions/Environment.java
@@ -1504,7 +1504,7 @@ public ParseTree optimizeDynamic(Target t, List<ParseTree> children, FileOptions
if(children.get(0).getData().val().equals("sound")
&& children.get(1).getData() instanceof CString) {
try {
MCSound.valueOf(children.get(1).getData().val().toUpperCase());
MCSound.MCVanillaSound.valueOf(children.get(1).getData().val().toUpperCase());
} catch (IllegalArgumentException ex) {
CHLog.GetLogger().w(CHLog.Tags.DEPRECATION, ex.getMessage(), t);
}

0 comments on commit fe32b4f

Please sign in to comment.