feat(base): implement progression system
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package games.dmg.spigotbase;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
final class PluginMetadataTest {
|
||||
@Test
|
||||
void declaresPluginEntrypointCommandsAndPermissions() {
|
||||
InputStream stream = getClass().getClassLoader().getResourceAsStream("plugin.yml");
|
||||
assertNotNull(stream);
|
||||
|
||||
Map<?, ?> plugin = new Yaml().load(stream);
|
||||
assertEquals("SpigotBase", plugin.get("name"));
|
||||
assertEquals("games.dmg.spigotbase.SpigotBasePlugin", plugin.get("main"));
|
||||
assertEquals("1.20", plugin.get("api-version"));
|
||||
|
||||
Map<?, ?> commands = (Map<?, ?>) plugin.get("commands");
|
||||
for (String command : new String[] {
|
||||
"setbase", "base", "basenavigation", "baseflight",
|
||||
"basevisitors", "gotobase", "baseprogress", "baseadmin"
|
||||
}) {
|
||||
assertNotNull(commands.get(command), command);
|
||||
}
|
||||
|
||||
Map<?, ?> permissions = (Map<?, ?>) plugin.get("permissions");
|
||||
assertNotNull(permissions.get("spigotbase.admin"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user