Advertisement
Hightension

Untitled

Oct 29th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public static SoundType matchSound(String input)
  2. {
  3. if (input == null)
  4. return null;
  5.  
  6. input = StringUtils.stripChars(input.toLowerCase(), " _-");
  7.  
  8. for (SoundType sound : Sponge.getRegistry().getAllOf(SoundType.class))
  9. {
  10. if (StringUtils.stripChars(sound.getName().replace("minecraft:", "").toLowerCase(), "_").equals(input))
  11. return sound;
  12. }
  13. return null;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement