Add '/paper mobcaps' and '/paper playermobcaps'
Add commands to get the mobcaps for a world, as well as the mobcaps for each player when per-player mob spawning is enabled. Also has a hover text on each mob category listing what entity types are in said category
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package io.papermc.paper.command.subcommands;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import org.bukkit.support.environment.Normal;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Normal
|
||||
public class MobcapsCommandTest {
|
||||
@Test
|
||||
public void testMobCategoryColors() {
|
||||
final Set<String> missing = new HashSet<>();
|
||||
for (final MobCategory value : MobCategory.values()) {
|
||||
if (!MobcapsCommand.MOB_CATEGORY_COLORS.containsKey(value)) {
|
||||
missing.add(value.getName());
|
||||
}
|
||||
}
|
||||
Assertions.assertTrue(missing.isEmpty(), "MobcapsCommand.MOB_CATEGORY_COLORS map missing TextColors for [" + String.join(", ", missing + "]"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user