mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Item Registry Test is now functional
This commit is contained in:
@ -354,6 +354,7 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
||||
|
||||
private void loadConfig() {
|
||||
createDefaultConfiguration("config-legacy.yml"); // Create the default configuration file
|
||||
|
||||
config = new BukkitConfiguration(new YAMLProcessor(new File(getDataFolder(), "config-legacy.yml"), true), this);
|
||||
config.load();
|
||||
// Create schematics folder
|
||||
|
@ -20,21 +20,20 @@
|
||||
package com.sk89q.worldedit.bukkit;
|
||||
|
||||
import com.sk89q.worldedit.world.item.ItemType;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import org.bukkit.Material;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class ItemRegistryTest {
|
||||
|
||||
@Test
|
||||
public void testTreeTypeMapping() {
|
||||
public void testItemRegistry() {
|
||||
for (Material material : Material.values()) {
|
||||
if (material.isItem() && !material.isLegacy()) {
|
||||
ItemType.REGISTRY.register(material.getKey().toString(), new ItemType(material.getKey().toString()));
|
||||
System.out.println(material.getKey().toString());
|
||||
}
|
||||
}
|
||||
System.out.println(ItemType.REGISTRY.getKnownNamespaces().toString());
|
||||
Assertions.assertNotNull(ItemType.REGISTRY.get("minecraft:wooden_axe"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user