Class ItemCollector
java.lang.Object
games.stendhal.server.maps.quests.logic.ItemCollector
Holds a list of items to collect, together with the required quantities and
messages to describe them (
ItemCollectorData
). Uses
ItemCollectorSetters
to build the list in a fluent way.
Example usage:
new ItemCollector().require().item("wood").pieces(2).bySaying("Bring me %s, please.");
-
Constructor Details
-
ItemCollector
public ItemCollector()
-
-
Method Details
-
require
Starts adding a new required item. Returns anItemCollectorSetters
to allow describing the required item in a fluent way. It may add a single item. To build a list of different items, call the method multiple times. See the class documentation for example usage.- Returns:
- the collector setters
-
requiredItems
Gets the list of required items, in the order that they were added by subsequent calls torequire()
.- Returns:
- a list of items to collect
-