dev.aurelium.auraskills.api.loot.LootOptioned Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of auraskills-api Show documentation
Show all versions of auraskills-api Show documentation
API for AuraSkills, the ultra-versatile RPG skills plugin for Minecraft
package dev.aurelium.auraskills.api.loot;
import org.jetbrains.annotations.Nullable;
import java.util.Map;
public class LootOptioned {
protected final Map options;
public LootOptioned(Map options) {
this.options = options;
}
public Map getOptions() {
return options;
}
@Nullable
public T getOption(String key, Class type) {
Object o = options.get(key);
if (o == null) return null;
return type.cast(o);
}
public T getOption(String key, Class type, T def) {
Object o = options.get(key);
if (o == null) return def;
return type.cast(o);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy