Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 21:10:10 +01:00
Add test for WorldType's
Dieser Commit ist enthalten in:
Ursprung
a43d621c01
Commit
764c3f24ee
31
src/test/java/org/bukkit/WorldTypeTest.java
Normale Datei
31
src/test/java/org/bukkit/WorldTypeTest.java
Normale Datei
@ -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<WorldType> missingTypes = new ArrayList<WorldType>();
|
||||||
|
|
||||||
|
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!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren