Map org.bukkit.Sound to String values for sending to client.
This change was done to remove the internal sound names from the API. Along with moving the internal names into CraftBukkit, a unit test was added for any new sounds added in the API to assure they have a non-null mapping. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
4277872612
commit
f57bc0f77f
4 changed files with 160 additions and 2 deletions
17
paper-server/src/test/java/org/bukkit/SoundTest.java
Normal file
17
paper-server/src/test/java/org/bukkit/SoundTest.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
package org.bukkit;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.bukkit.craftbukkit.CraftSound;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
public class SoundTest {
|
||||
|
||||
@Test
|
||||
public void testGetSound() {
|
||||
for (Sound sound : Sound.values()) {
|
||||
assertNotNull(sound.name(), CraftSound.getSound(sound));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue