Package games.stendhal.common.grammar
Class ItemParser
java.lang.Object
games.stendhal.common.grammar.ItemParser
- Direct Known Subclasses:
Behaviour
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetErrormessage(ItemParserResult res, String userAction, String npcAction)
Answer with an error message in case the request could not be fulfilled.Search for a matching name in the available names.
-
Field Details
-
itemNames
ItemNames contains all valid item names.
-
-
Constructor Details
-
ItemParser
public ItemParser() -
ItemParser
-
ItemParser
-
-
Method Details
-
getItemNames
- Returns:
- the recognized item names
-
parse
Search for a matching name in the available names.- Parameters:
sentence
-- Returns:
- parsing result
-
getErrormessage
Answer with an error message in case the request could not be fulfilled.- Parameters:
res
-userAction
-npcAction
-- Returns:
- error message
-