diff --git a/src/test/java/org/bukkit/WorldTypeTest.java b/src/test/java/org/bukkit/WorldTypeTest.java new file mode 100644 index 0000000000..8d063ca57d --- /dev/null +++ b/src/test/java/org/bukkit/WorldTypeTest.java @@ -0,0 +1,31 @@ +package org.bukkit; + +import static org.junit.Assert.fail; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.server.WorldType; +import org.junit.Test; + +public class WorldTypeTest { + @Test + public void testTypes() { + List missingTypes = new ArrayList(); + + for (WorldType type : WorldType.types) { + if (type == null) continue; + + if (org.bukkit.WorldType.getByName(type.name()) == null) { + missingTypes.add(type); + } + } + + if (!missingTypes.isEmpty()) { + for (WorldType type : missingTypes) { + System.out.println(type.name() + " is missing!"); + } + fail("Missing (" + missingTypes.size() + ") WorldTypes!"); + } + } +}