Made requested changes
This commit is contained in:
parent
0db877fd64
commit
730d8573a5
|
@ -2,6 +2,8 @@ package dev.frogmc.frogloader.api.mod;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public interface ModDependencies {
|
public interface ModDependencies {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,17 +44,45 @@ public interface ModDependencies {
|
||||||
PROVIDE
|
PROVIDE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a mod's dependency.
|
||||||
|
*/
|
||||||
interface Entry {
|
interface Entry {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get this dependency's type.
|
||||||
|
*
|
||||||
|
* @return This dependency's type.
|
||||||
|
*/
|
||||||
Type type();
|
Type type();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get this dependency's mod ID.
|
||||||
|
*
|
||||||
|
* @return This dependency's mod ID.
|
||||||
|
*/
|
||||||
String id();
|
String id();
|
||||||
|
|
||||||
String range();
|
/**
|
||||||
|
* Get this dependency's version range.
|
||||||
|
*
|
||||||
|
* @return This dependency's version range.
|
||||||
|
*/
|
||||||
|
@Nullable String range();
|
||||||
|
|
||||||
String link();
|
/**
|
||||||
|
* Get this dependency's installation link.
|
||||||
|
*
|
||||||
|
* @return This dependency's installation link.
|
||||||
|
*/
|
||||||
|
@Nullable String link();
|
||||||
|
|
||||||
String name();
|
/**
|
||||||
|
* Get this dependency's friendly name.
|
||||||
|
*
|
||||||
|
* @return This dependency's name.
|
||||||
|
*/
|
||||||
|
@Nullable String name();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,9 @@ package dev.frogmc.frogloader.impl.mod;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import org.jetbrains.annotations.ApiStatus;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
||||||
import dev.frogmc.frogloader.api.mod.ModProperties;
|
import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
import dev.frogmc.frogloader.api.mod.SemVer;
|
import dev.frogmc.frogloader.api.mod.SemVer;
|
||||||
import dev.frogmc.frogloader.api.mod.ModDependencies.Entry;
|
|
||||||
import dev.frogmc.frogloader.api.mod.ModDependencies.Type;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A mod's dependencies.
|
* A mod's dependencies.
|
||||||
|
@ -37,7 +32,6 @@ public final class ModDependenciesImpl implements ModDependencies {
|
||||||
* @param suggests <code>Type.SUGGEST</code> entries
|
* @param suggests <code>Type.SUGGEST</code> entries
|
||||||
* @param provides <code>Type.PROVIDE</code> entries
|
* @param provides <code>Type.PROVIDE</code> entries
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Internal
|
|
||||||
public ModDependenciesImpl(Collection<ModDependencies.Entry> depends, Collection<ModDependencies.Entry> breaks, Collection<ModDependencies.Entry> suggests, Collection<ModDependencies.Entry> provides) {
|
public ModDependenciesImpl(Collection<ModDependencies.Entry> depends, Collection<ModDependencies.Entry> breaks, Collection<ModDependencies.Entry> suggests, Collection<ModDependencies.Entry> provides) {
|
||||||
entries.put(Type.DEPEND, depends);
|
entries.put(Type.DEPEND, depends);
|
||||||
entries.put(Type.BREAK, breaks);
|
entries.put(Type.BREAK, breaks);
|
||||||
|
|
Loading…
Reference in a new issue