mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
Skip legacy materials when setting up registries.
Doesn't make a difference normally, but avoids errors in special envs.
This commit is contained in:
parent
2f734d4570
commit
90797d12f4
@ -132,7 +132,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
|||||||
}
|
}
|
||||||
// Block & Item
|
// Block & Item
|
||||||
for (Material material : Material.values()) {
|
for (Material material : Material.values()) {
|
||||||
if (material.isBlock()) {
|
if (material.isBlock() && !material.isLegacy()) {
|
||||||
BlockType.REGISTRY.register(material.getKey().toString(), new BlockType(material.getKey().toString(), blockState -> {
|
BlockType.REGISTRY.register(material.getKey().toString(), new BlockType(material.getKey().toString(), blockState -> {
|
||||||
// TODO Use something way less hacky than this.
|
// TODO Use something way less hacky than this.
|
||||||
ParserContext context = new ParserContext();
|
ParserContext context = new ParserContext();
|
||||||
@ -154,7 +154,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (material.isItem()) {
|
if (material.isItem() && !material.isLegacy()) {
|
||||||
ItemType.REGISTRY.register(material.getKey().toString(), new ItemType(material.getKey().toString()));
|
ItemType.REGISTRY.register(material.getKey().toString(), new ItemType(material.getKey().toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user