use of org.lanternpowered.server.asset.AssetRepository in project LanternServer by LanternPowered.
the class LanternScriptGameRegistry method construct.
public <T extends CatalogType> T construct(Object plugin, String asset, String id, Class<T> objectType) {
final AssetRepository assetRepository = Lantern.getAssetRepository();
final Asset theAsset = assetRepository.get(plugin, asset).orElseThrow(() -> new IllegalArgumentException("There is no asset with the specified id: " + asset));
return construct(theAsset, id, objectType);
}
Aggregations