Add stopSound for specific sound category & unit test for SoundCategory

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-11-19 14:27:18 +11:00
parent de0b8db8ad
commit 38fb5c2469
2 changed files with 26 additions and 2 deletions

View File

@@ -24,4 +24,18 @@ public class SoundTest {
assertNotNull(effect + "", Sound.valueOf(effect.a().replace('.', '_').toUpperCase(java.util.Locale.ENGLISH)));
}
}
@Test
public void testCategory() {
for (SoundCategory category : SoundCategory.values()) {
assertNotNull(category + "", net.minecraft.server.SoundCategory.valueOf(category.name()));
}
}
@Test
public void testCategoryReverse() {
for (net.minecraft.server.SoundCategory category : net.minecraft.server.SoundCategory.values()) {
assertNotNull(category + "", SoundCategory.valueOf(category.name()));
}
}
}