public class ResourcePackManager extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
private List<ResourcePackProfile> |
enabled |
private ResourcePackProfile.Factory |
profileFactory |
private Map<String,ResourcePackProfile> |
profiles |
private Set<ResourcePackProvider> |
providers |
Constructor and Description |
---|
ResourcePackManager(ResourcePackProfile.Factory profileFactory,
ResourcePackProvider[] providers) |
ResourcePackManager(ResourcePackProvider[] resourcePackProvider) |
Modifier and Type | Method and Description |
---|---|
private List<ResourcePackProfile> |
buildEnabledProfiles(Collection<String> enabledNames) |
void |
close() |
List<ResourcePack> |
createResourcePacks() |
Collection<String> |
getEnabledNames() |
Collection<ResourcePackProfile> |
getEnabledProfiles() |
Collection<String> |
getNames() |
ResourcePackProfile |
getProfile(String name) |
Collection<ResourcePackProfile> |
getProfiles() |
boolean |
hasProfile(String name) |
private Map<String,ResourcePackProfile> |
providePackProfiles() |
void |
scanPacks() |
void |
setEnabledProfiles(Collection<String> enabled) |
private Stream<ResourcePackProfile> |
streamProfilesByName(Collection<String> names) |
private final Set<ResourcePackProvider> providers
private Map<String,ResourcePackProfile> profiles
private List<ResourcePackProfile> enabled
private final ResourcePackProfile.Factory profileFactory
public ResourcePackManager(ResourcePackProfile.Factory profileFactory, ResourcePackProvider[] providers)
public ResourcePackManager(ResourcePackProvider[] resourcePackProvider)
public void scanPacks()
private Map<String,ResourcePackProfile> providePackProfiles()
public void setEnabledProfiles(Collection<String> enabled)
private List<ResourcePackProfile> buildEnabledProfiles(Collection<String> enabledNames)
private Stream<ResourcePackProfile> streamProfilesByName(Collection<String> names)
public Collection<String> getNames()
public Collection<ResourcePackProfile> getProfiles()
public Collection<String> getEnabledNames()
public Collection<ResourcePackProfile> getEnabledProfiles()
@Nullable public ResourcePackProfile getProfile(String name)
public void close()
close
in interface AutoCloseable
public boolean hasProfile(String name)
public List<ResourcePack> createResourcePacks()