Class ItemEntrySetup
- java.lang.Object
-
- org.rspeer.game.config.item.entry.setup.ItemEntrySetup
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BlowpipeSetup
,DivineRunePouchSetup
,RunePouchSetup
public abstract class ItemEntrySetup extends Object implements Serializable
An interface representing the setup that an ItemEntry needs. For example when adding a blowpipe ItemEntry to a loadout, we need to know what darts they want in it- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getConfig()
<T> T
getConfig(String promptTitle)
<T> T
getConfig(Prompt prompt)
abstract List<Prompt>
getPrompts()
abstract boolean
isRequired(InventoryLoadout loadout)
-
-
-
Method Detail
-
isRequired
public abstract boolean isRequired(InventoryLoadout loadout)
- Returns:
true
if the given inventory loadout requires config for this item. For example, loadout instanceof BackpackLoadout would mean the entry only needs additional setup if it's added to a backpack loadout
-
getPrompts
public abstract List<Prompt> getPrompts()
- Returns:
- A list of
Prompt
to configure this item
-
getConfig
public final Map<String,Object> getConfig()
- Returns:
- A config map where the key is a
Prompt
title and the value is a boolean, String, int or Item
-
getConfig
public final <T> T getConfig(String promptTitle)
- Returns:
- A config value for the given prompt title
-
getConfig
public final <T> T getConfig(Prompt prompt)
- Returns:
- A config value for the given prompt
-
-