EnglishParser
public interface EnglishParsing extends CMLibrary
idConverter
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
bumpDotContextNumber(java.lang.String srchStr,
int byThisMuch) |
Given a context-specific name, this method returns the
name with the number adjusted according to the given amount.
|
java.lang.String |
cleanPrepositions(java.lang.String s) |
If the given phrase begins with a preposition word
such as to, over, beside, than, since, it will strip
the word off and return the rest of the string.
|
boolean |
containsOneOfString(java.lang.String toSrchStr,
java.util.List<java.lang.String> srchForStrs) |
Returns whether the given string contains any of the srchForStr substrings.
|
boolean |
containsString(java.lang.String toSrchStr,
java.lang.String srchForStr) |
Returns whether the first string contains the second, case insensitive, and color
insensitive.
|
java.lang.String |
coordDescShort(long[] coords) |
Returns [best distance],[best distance],[best distance]
A [best distance] picks the best of dm, km, etc..
|
java.lang.String |
directionDescShort(double[] dir) |
Returns direction in [degrees.YY] mark [degrees.YY]
|
java.lang.String |
directionDescShortest(double[] dir) |
Returns direction in [degrees.Y] [space] [degrees.Y]
|
java.lang.String |
distanceDescShort(long distance) |
Returns [best distance] for the given number.
|
Environmental |
fetchAvailable(java.util.Collection<? extends Environmental> list,
java.lang.String srchStr,
Item goodLocation,
Filterer<Environmental> filter,
boolean exactOnly) |
Returns a matching environmental object from a collection of them
by using a search string to matching, a required filter, and for items,
a container which may be null.
|
Environmental |
fetchAvailable(java.util.Collection<? extends Environmental> list,
java.lang.String srchStr,
Item goodLocation,
Filterer<Environmental> filter,
boolean exactOnly,
int[] counterSlap) |
Returns a matching environmental object from a collection of them
by using a search string to matching, a required filter, and for items,
a container which may be null.
|
Item |
fetchAvailableItem(java.util.List<Item> list,
java.lang.String srchStr,
Item goodLocation,
Filterer<Environmental> filter,
boolean exactOnly) |
Returns a matching item from a collection of them
by using a search string to matching, a required filter, and
a container which may be null.
|
java.util.List<Item> |
fetchAvailableItems(java.util.List<Item> list,
java.lang.String srchStr,
Item goodLocation,
Filterer<Environmental> filter,
boolean exactOnly) |
Returns a set of matching items from a collection of them
by using a search string to matching, a required filter, and
a container which may be null.
|
Environmental |
fetchEnvironmental(java.lang.Iterable<? extends Environmental> list,
java.lang.String srchStr,
boolean exactOnly) |
Returns a matching environmental object from an iterable collection of them
by using a search string to matching.
|
Environmental |
fetchEnvironmental(java.util.Enumeration<? extends Environmental> iter,
java.lang.String srchStr,
boolean exactOnly) |
Returns a matching environmental object from an enumeration of them
by using a search string to matching.
|
Environmental |
fetchEnvironmental(java.util.Iterator<? extends Environmental> iter,
java.lang.String srchStr,
boolean exactOnly) |
Returns a matching environmental object from an iterator of them
by using a search string to matching.
|
Environmental |
fetchEnvironmental(java.util.Map<java.lang.String,? extends Environmental> list,
java.lang.String srchStr,
boolean exactOnly) |
Returns a matching environmental object from map of them
by using a search string to matching.
|
java.util.List<Environmental> |
fetchEnvironmentals(java.util.List<? extends Environmental> list,
java.lang.String srchStr,
boolean exactOnly) |
Returns a set of matching environmental objects from a collection of them
by using a search string to matching.
|
Exit |
fetchExit(java.lang.Iterable<? extends Environmental> list,
java.lang.String srchStr,
boolean exactOnly) |
Returns a matching exit object from an iterable collection of them
by using a search string to matching.
|
java.util.List<Item> |
fetchItemList(ItemPossessor from,
MOB mob,
Item container,
java.util.List<java.lang.String> matchWords,
Filterer<Environmental> filter,
boolean visionMatters) |
Returns a set of matching items from a given item possessor.
|
<T> T |
fetchReflective(java.lang.Iterable<T> list,
java.lang.String srchStr,
java.lang.String methodName,
boolean exactOnly) |
Returns a matching T object from an iterable collection of them
by using a search string to matching.
|
CMObject |
findCommand(MOB mob,
java.util.List<java.lang.String> commands) |
Given a user input array, this method will find the skill, command, social,
channel, or journal that is trying to be invoked by the user input and,
if found, return it.
|
java.util.List<java.lang.String> |
getAllContextNames(java.util.Collection<? extends Environmental> list,
Filterer<Environmental> filter) |
Given a list of objects and an optional filter, this method returns
a list of identical size and order, with the context-specific names
instead of the objects.
|
int |
getContextDotNumber(java.lang.String srchStr) |
Returns the context number of the given context-specific name.
|
java.lang.String |
getContextName(Environmental[] list,
Environmental E) |
Returns the context-qualified name of the item in the given
list is exactly the given environmental.
|
java.lang.String |
getContextName(ItemCollection cont,
Environmental E) |
Returns the context-qualified name of the item in the given
collection is exactly the given environmental.
|
java.lang.String |
getContextName(java.util.Collection<? extends Environmental> list,
Environmental E) |
Returns the context-qualified name of the item in the given
collection is exactly the given environmental.
|
int |
getContextNumber(Environmental[] list,
Environmental E) |
Returns the context number of the item in the given
list is exactly the given environmental.
|
int |
getContextNumber(ItemCollection cont,
Environmental E) |
Returns the context number of the item in the given
collection is exactly the given environmental.
|
int |
getContextNumber(java.util.Collection<? extends Environmental> list,
Environmental E) |
Returns the context number of the item in the given
collection is exactly the given environmental.
|
java.lang.String |
getContextSameName(Environmental[] list,
Environmental E) |
Returns the context-specific full name of the object in the
given list that is otherwise identical to the given
environmental.
|
java.lang.String |
getContextSameName(ItemCollection cont,
Environmental E) |
Returns the context-specific full name of the object in the
given collection that is otherwise identical to the given
environmental.
|
java.lang.String |
getContextSameName(java.util.Collection<? extends Environmental> list,
Environmental E) |
Returns the context-specific full name of the object in the
given collection that is otherwise identical to the given
environmental.
|
int |
getContextSameNumber(Environmental[] list,
Environmental E) |
Returns the context number of the object in the
given collection that is otherwise identical to the given
environmental.
|
int |
getContextSameNumber(ItemCollection cont,
Environmental E) |
Returns the context number of the object in the
given collection that is otherwise identical to the given
environmental.
|
int |
getContextSameNumber(java.util.Collection<? extends Environmental> list,
Environmental E) |
Returns the context number of the object in the
given list that is otherwise identical to the given
environmental.
|
java.lang.String |
getFirstWord(java.lang.String str) |
Returns the first word in the given phrase, ignoring color.
|
long |
getMillisMultiplierByName(java.lang.String timeName) |
Converts the given time specifier, or something that might
be a time specifier, into the appropriate number of milliseconds.
|
java.lang.String |
getSkillInvokeWord(MOB mob,
java.lang.String word) |
Given a user input array, this method will find the skill that is trying to be
invoked by the MAIN invocation word and, if found, return that word.
|
Ability |
getSkillToInvoke(MOB mob,
java.util.List<java.lang.String> commands) |
Given a user input array, this method will find the skill that is trying to be
invoked by the commands and return it.
|
boolean |
hasEnglishPunctuation(java.lang.String str) |
Returns true if the given string contains
any normal punctuation characters.
|
boolean |
hasPunctuation(java.lang.String str) |
Returns true if the given string contains
any extended punctuation characters.
|
java.lang.String |
insertAdjectives(java.lang.String paragraph,
java.lang.String[] adjsToChoose,
int pctChance) |
Inserts one of the given adjectives after an article word found in the
given paragraph, a given percentage chance of the time.
|
java.lang.String |
insertUnColoredAdjective(java.lang.String str,
java.lang.String adjective) |
Inserts the given adjective before a given word or noun phrase, replacing any
indefinite articles with the new correct one, and removing any "color"
characters from the final phrase.
|
void |
invokeSkill(MOB mob,
java.util.List<java.lang.String> commands) |
Given a user input array, this method will find the skill that is trying to be
invoked by the commands and invoke it.
|
boolean |
isAnArticle(java.lang.String s) |
Returns whether the given string is an
article, such as a, an, the, some, etc..
|
boolean |
isAnIndefiniteArticle(java.lang.String s) |
Returns whether the given string is an
indefinite article, such as a, an, some, etc..
|
boolean |
isEnglishPunctuation(byte b) |
Returns true if the given byte is
any normal punctuation character.
|
boolean |
isPunctuation(byte b) |
Returns true if the given byte is
any extended punctuation character.
|
java.lang.String |
makeNumberthWords(int num) |
Returns the english representation of the given numberst,
numberth, number-numberth, etc.
|
java.lang.String |
makeNumberWords(double num,
int precision) |
Returns the english representation of the given number
|
java.lang.String |
makePastTense(java.lang.String word,
java.lang.String defaultWord) |
Returns a best guess on the past-tense form
of the given word.
|
java.lang.String |
makePlural(java.lang.String str) |
Attempts to pluralize a given word.
|
java.lang.String |
makeSingular(java.lang.String str) |
Attempts to de-pluralize a given word.
|
java.lang.String |
matchAnyCurrencySet(java.lang.String moneyStr) |
For cases when a string input must contain an amount of money,
this method is used to determine the currency id reflect by
the whole denomination specified by the given user input.
|
double |
matchAnyDenomination(java.lang.String currency,
java.lang.String moneyStr) |
For cases when a string input must contain an amount of money,
this method is used to determine the Whole Denomination multiplier
specified by the given user input, and optionally, from the given
currency.
|
Item |
parseBestPossibleGold(MOB mob,
Container container,
java.lang.String moneyStr) |
Attempts to determine if the given user input specifies an amount
of currency owned by the given player, and if so, returns that precise
amount parsed from the players existing currency.
|
int |
parseMaxToGive(MOB mob,
java.util.List<java.lang.String> commands,
boolean breakPackages,
Environmental checkWhat,
boolean getOnly) |
Parses user input to determine if the user, who is
specifying an item of some sort, is intending to
specify multiples of those items by using a number
in front of their input.
|
Triad<java.lang.String,java.lang.Double,java.lang.Long> |
parseMoneyStringSDL(MOB mob,
java.lang.String moneyStr,
java.lang.String correctCurrency) |
For cases when a string input probably contains an amount of money,
this method is used to determine the currency, denomination, and
number of units of that currency.
|
long |
parseNumPossibleGold(Environmental mine,
java.lang.String moneyStr) |
For cases when a string input probably contains an amount of money,
this method is used to determine the amount (not value).
|
java.lang.String |
parseNumPossibleGoldCurrency(Environmental mine,
java.lang.String moneyStr) |
For cases when a string input probably contains an amount of money,
this method is used to determine the currency id.
|
double |
parseNumPossibleGoldDenomination(Environmental mine,
java.lang.String currency,
java.lang.String moneyStr) |
For cases when a string input probably contains an amount of money,
this method is used to determine the denomination.
|
Item |
parsePossibleContainer(MOB mob,
java.util.List<java.lang.String> commands,
boolean withStuff,
Filterer<Environmental> filter) |
Attempts to determine if the given user command input is specifying a container
as the last argument, for cases when that would be possible.
|
java.util.List<Container> |
parsePossibleContainers(MOB mob,
java.util.List<java.lang.String> commands,
Filterer<Environmental> filter,
boolean withContentOnly) |
Attempts to determine if the given user command input is specifying
one or more containers, for cases when that would be possible.
|
Item |
parsePossibleRoomGold(MOB seer,
Room room,
Container container,
java.lang.String moneyStr) |
Attempts to determine if the given user input specifies an amount
of currency in the given room, and if so, returns that precise
amount parsed from the rooms existing currency.
|
Environmental |
parseShopkeeper(MOB mob,
java.util.List<java.lang.String> matchWords,
java.lang.String fromTo,
java.lang.String error) |
Returns a matching shopkeeper from a given and his/her location, or null.
|
java.lang.Long |
parseSpaceDistance(java.lang.String dist) |
Returns the distance in decameters represented by the given
parsable user-entered string.
|
java.util.List<java.lang.String> |
parseWords(java.lang.String thisStr) |
Strips out all punctuation and returns the individual words in
an english sentence.
|
boolean |
preInvokeSkill(MOB mob,
java.util.List<java.lang.String> commands,
int secondsElapsed,
double actionsRemaining) |
Given a user input array, this method will find the skill that is trying to be
invoked by the commands, but which cannot be due to insufficient action points,
and then call preinvoke on it.
|
int |
probabilityOfBeingEnglish(java.lang.String str) |
Returns the probability 0-100 of the given string being
english.
|
java.lang.String |
properIndefiniteArticle(java.lang.String str) |
Returns the proper indefinite article -- a or an, for
the given noun or noun-phrase.
|
java.lang.String |
removeArticleLead(java.lang.String s) |
If the given phrase begins with an article word
such as a, an, some, etc..
|
java.lang.String |
sizeDescShort(long size) |
Returns [best distance] for the given number.
|
java.lang.String |
spaceOutPunctuation(java.lang.String str) |
Returns the given string with any
punctuation changed into spaces.
|
java.lang.String |
speedDescShort(double speed) |
Rounds the given speed and returns [speed]/sec
|
boolean |
startsWithAnArticle(java.lang.String s) |
Returns whether the given word or
phrase starts with an article, such as
a, an, the, some, etc..
|
boolean |
startsWithAnIndefiniteArticle(java.lang.String s) |
Returns whether the given word or
phrase starts with an indefinite article, such as
a, an, some, etc..
|
java.lang.String |
startWithAorAn(java.lang.String str) |
Returns the proper indefinite article for the given word/phrase
|
java.lang.String |
stringifyElapsedTimeOrTicks(long millis,
long ticks) |
Converts the given number of milliseconds into ms, s, m, h, d, etc...
|
java.lang.String |
stripEnglishPunctuation(java.lang.String str) |
Returns the given string with normal punctuation
removed.
|
java.lang.String |
stripPunctuation(java.lang.String str) |
Returns the given string with extended
punctuation removed.
|
java.lang.String |
toEnglishStringList(java.lang.Class<? extends java.lang.Enum<?>> enumer,
boolean andOr) |
Returns comma-space delimited list of the given emum names.
|
java.lang.String |
toEnglishStringList(java.lang.String[] V,
boolean andOr) |
Returns comma-space delimited list of the given objects.toString().
|
java.lang.String |
toEnglishStringList(java.util.Collection<? extends java.lang.Object> V) |
Returns comma-space delimited list of the given objects.toString().
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
boolean isAnArticle(java.lang.String s)
s
- the string to checkisAnIndefiniteArticle(String)
,
startsWithAnArticle(String)
,
startsWithAnIndefiniteArticle(String)
boolean isAnIndefiniteArticle(java.lang.String s)
s
- the string to checkisAnArticle(String)
,
startsWithAnArticle(String)
,
startsWithAnIndefiniteArticle(String)
java.lang.String removeArticleLead(java.lang.String s)
s
- the string to cleanjava.lang.String cleanPrepositions(java.lang.String s)
s
- the string to cleanboolean startsWithAnArticle(java.lang.String s)
s
- the string to checkisAnArticle(String)
,
isAnIndefiniteArticle(String)
,
startsWithAnIndefiniteArticle(String)
boolean startsWithAnIndefiniteArticle(java.lang.String s)
s
- the string to checkisAnArticle(String)
,
isAnIndefiniteArticle(String)
,
startsWithAnArticle(String)
java.lang.String stripPunctuation(java.lang.String str)
str
- the string to checkjava.lang.String spaceOutPunctuation(java.lang.String str)
str
- the string to convertboolean isPunctuation(byte b)
b
- the byte to checkboolean hasPunctuation(java.lang.String str)
str
- the string to checkboolean isEnglishPunctuation(byte b)
b
- the byte to checkboolean hasEnglishPunctuation(java.lang.String str)
str
- the string to checkjava.lang.String stripEnglishPunctuation(java.lang.String str)
str
- the string to checkjava.lang.String makePlural(java.lang.String str)
str
- the word to pluralizejava.lang.String makeSingular(java.lang.String str)
str
- the word to de-pluralizejava.lang.String makePastTense(java.lang.String word, java.lang.String defaultWord)
word
- the word to past-tensizedefaultWord
- the word to use if none givenjava.lang.String getFirstWord(java.lang.String str)
str
- the phrase to look injava.lang.String properIndefiniteArticle(java.lang.String str)
str
- the noun or noun phrasejava.lang.String toEnglishStringList(java.lang.String[] V, boolean andOr)
V
- the collection of things to treat as stringsandOr
- true to connect with AND, false for ORjava.lang.String toEnglishStringList(java.lang.Class<? extends java.lang.Enum<?>> enumer, boolean andOr)
enumer
- the collection of things to treat as stringsandOr
- true to use AND, false to use ORjava.lang.String toEnglishStringList(java.util.Collection<? extends java.lang.Object> V)
V
- the collection of things to treat as stringsjava.lang.String makeNumberWords(double num, int precision)
num
- the numberprecision
- the number of digits less than 0java.lang.String makeNumberthWords(int num)
num
- the num to translatejava.lang.String insertUnColoredAdjective(java.lang.String str, java.lang.String adjective)
str
- the word or noun phraseadjective
- the adjective to addjava.lang.String insertAdjectives(java.lang.String paragraph, java.lang.String[] adjsToChoose, int pctChance)
paragraph
- The paragraph with nouns after articlesadjsToChoose
- the list of adjectives to choose frompctChance
- the pct chance that any particular noun gets an adjectivejava.lang.String startWithAorAn(java.lang.String str)
str
- the word/phrase that needs an indefinite articleCMObject findCommand(MOB mob, java.util.List<java.lang.String> commands)
mob
- the player/mob trying to invoke a commandcommands
- the user input array of the invocationjava.lang.String getSkillInvokeWord(MOB mob, java.lang.String word)
mob
- the player/mob trying to invoke a skillword
- the user input of the invocationAbility getSkillToInvoke(MOB mob, java.util.List<java.lang.String> commands)
mob
- the player/mob trying to invoke a skillcommands
- the user input array of the invocationboolean preInvokeSkill(MOB mob, java.util.List<java.lang.String> commands, int secondsElapsed, double actionsRemaining)
mob
- the player mob trying to use a skillcommands
- the skill command words and argumentssecondsElapsed
- the seconds ellapsed since initial attemptactionsRemaining
- the additional action points requiredvoid invokeSkill(MOB mob, java.util.List<java.lang.String> commands)
mob
- the player/mob trying to invoke a skillcommands
- the user input array of the invocationboolean containsString(java.lang.String toSrchStr, java.lang.String srchForStr)
toSrchStr
- the string to search throughsrchForStr
- the string to search for in the first stringboolean containsOneOfString(java.lang.String toSrchStr, java.util.List<java.lang.String> srchForStrs)
toSrchStr
- the string to search inside ofsrchForStrs
- the strings to search forint getContextDotNumber(java.lang.String srchStr)
srchStr
- the context-specific namejava.lang.String bumpDotContextNumber(java.lang.String srchStr, int byThisMuch)
srchStr
- the context namebyThisMuch
- the amount to adjust by, + or -java.util.List<java.lang.String> getAllContextNames(java.util.Collection<? extends Environmental> list, Filterer<Environmental> filter)
list
- the list of objects to return the names offilter
- an optional filter, or nullint getContextNumber(Environmental[] list, Environmental E)
list
- the list containing the environmentalE
- the object to find in the listint getContextNumber(java.util.Collection<? extends Environmental> list, Environmental E)
list
- the collection containing the environmentalE
- the object to find in the collectionint getContextNumber(ItemCollection cont, Environmental E)
cont
- the collection containing the environmentalE
- the object to find in the collectionjava.lang.String getContextName(java.util.Collection<? extends Environmental> list, Environmental E)
list
- the collection containing the environmentalE
- the object to find in the collectionjava.lang.String getContextName(Environmental[] list, Environmental E)
list
- the list containing the environmentalE
- the object to find in the listjava.lang.String getContextName(ItemCollection cont, Environmental E)
cont
- the collection containing the environmentalE
- the object to find in the collectionint getContextSameNumber(Environmental[] list, Environmental E)
list
- the collection to find a match inE
- the environmental to find in the collectionint getContextSameNumber(java.util.Collection<? extends Environmental> list, Environmental E)
list
- the list to find a match inE
- the environmental to find in the collectionint getContextSameNumber(ItemCollection cont, Environmental E)
cont
- the collection to find a match inE
- the environmental to find in the collectionjava.lang.String getContextSameName(java.util.Collection<? extends Environmental> list, Environmental E)
list
- the collection to find a match inE
- the environmental to find in the collectionjava.lang.String getContextSameName(Environmental[] list, Environmental E)
list
- the collection to find a match inE
- the environmental to find in the collectionjava.lang.String getContextSameName(ItemCollection cont, Environmental E)
cont
- the collection to find a match inE
- the environmental to find in the collectionjava.util.List<java.lang.String> parseWords(java.lang.String thisStr)
thisStr
- the sentenceExit fetchExit(java.lang.Iterable<? extends Environmental> list, java.lang.String srchStr, boolean exactOnly)
list
- the collection of exit objects to search throughsrchStr
- the search stringexactOnly
- true for exact matching, false for inexactEnvironmental fetchEnvironmental(java.lang.Iterable<? extends Environmental> list, java.lang.String srchStr, boolean exactOnly)
list
- the collection of environmental objects to search throughsrchStr
- the search stringexactOnly
- true for exact matching, false for inexact<T> T fetchReflective(java.lang.Iterable<T> list, java.lang.String srchStr, java.lang.String methodName, boolean exactOnly)
T
- the matching T objectlist
- the collection of environmental objects to search throughsrchStr
- the search stringmethodName
- the method to match againstexactOnly
- true for exact matching, false for inexactEnvironmental fetchEnvironmental(java.util.Enumeration<? extends Environmental> iter, java.lang.String srchStr, boolean exactOnly)
iter
- the enumeraton of environmental objects to search throughsrchStr
- the search stringexactOnly
- true for exact matching, false for inexactEnvironmental fetchEnvironmental(java.util.Map<java.lang.String,? extends Environmental> list, java.lang.String srchStr, boolean exactOnly)
list
- the map of environmental objects to search throughsrchStr
- the search stringexactOnly
- true for exact matching, false for inexactEnvironmental fetchEnvironmental(java.util.Iterator<? extends Environmental> iter, java.lang.String srchStr, boolean exactOnly)
iter
- the iterator of objects to search throughsrchStr
- the search stringexactOnly
- true for exact matching, false for inexactjava.util.List<Environmental> fetchEnvironmentals(java.util.List<? extends Environmental> list, java.lang.String srchStr, boolean exactOnly)
list
- the list of objects to search throughsrchStr
- the search stringexactOnly
- true for exact matching, false for inexactItem fetchAvailableItem(java.util.List<Item> list, java.lang.String srchStr, Item goodLocation, Filterer<Environmental> filter, boolean exactOnly)
list
- the list of items to search throughsrchStr
- the search stringgoodLocation
- a container, or nullfilter
- the required filterexactOnly
- true for exact matching, false for inexactjava.util.List<Item> fetchAvailableItems(java.util.List<Item> list, java.lang.String srchStr, Item goodLocation, Filterer<Environmental> filter, boolean exactOnly)
list
- the list of items to search throughsrchStr
- the search stringgoodLocation
- a container, or nullfilter
- the required filterexactOnly
- true for exact matching, false for inexactEnvironmental fetchAvailable(java.util.Collection<? extends Environmental> list, java.lang.String srchStr, Item goodLocation, Filterer<Environmental> filter, boolean exactOnly)
list
- the list of objects to search throughsrchStr
- the search stringgoodLocation
- a container, or nullfilter
- the required filterexactOnly
- true for exact matching, false for inexactEnvironmental fetchAvailable(java.util.Collection<? extends Environmental> list, java.lang.String srchStr, Item goodLocation, Filterer<Environmental> filter, boolean exactOnly, int[] counterSlap)
list
- the list of objects to search throughsrchStr
- the search stringgoodLocation
- a container, or nullfilter
- the required filterexactOnly
- true for exact matching, false for inexactcounterSlap
- a one-dimensional array, usually with 0java.util.List<Item> fetchItemList(ItemPossessor from, MOB mob, Item container, java.util.List<java.lang.String> matchWords, Filterer<Environmental> filter, boolean visionMatters)
from
- The room or mob that possess items to select.mob
- the mob in the room, or the viewer of the itemscontainer
- the required container that the items should be in, or nullmatchWords
- the words that must be matched to select an itemfilter
- the required filter for itemsvisionMatters
- true if the items must be seen by the mob, or false otherwiseEnvironmental parseShopkeeper(MOB mob, java.util.List<java.lang.String> matchWords, java.lang.String fromTo, java.lang.String error)
mob
- the mob looking for a shopkeeper nearbymatchWords
- the search words, possibly modifiedfromTo
- whether from or to is the proper separatorerror
- the error message to send for bad argumentslong parseNumPossibleGold(Environmental mine, java.lang.String moneyStr)
mine
- someone with money, like a mob, or nullmoneyStr
- a user input string to parsejava.lang.String parseNumPossibleGoldCurrency(Environmental mine, java.lang.String moneyStr)
mine
- someone with money, like a mob, or nullmoneyStr
- a user input string to parsedouble parseNumPossibleGoldDenomination(Environmental mine, java.lang.String currency, java.lang.String moneyStr)
mine
- someone with money, like a mob, or nullcurrency
- currency to use if mine is unavailmoneyStr
- a user input string to parseTriad<java.lang.String,java.lang.Double,java.lang.Long> parseMoneyStringSDL(MOB mob, java.lang.String moneyStr, java.lang.String correctCurrency)
mob
- the user to use to find the right currencymoneyStr
- the parsable user inputcorrectCurrency
- a currency id to use, or null to use mob abovejava.lang.String matchAnyCurrencySet(java.lang.String moneyStr)
moneyStr
- the user input that contains a denominationdouble matchAnyDenomination(java.lang.String currency, java.lang.String moneyStr)
currency
- currency id, or null will check all currencies, but why?moneyStr
- the user input that contains a denominationItem parsePossibleRoomGold(MOB seer, Room room, Container container, java.lang.String moneyStr)
seer
- the player looking to get some moneyroom
- the room the money is incontainer
- the container the money is in, or nullmoneyStr
- the user inputItem parseBestPossibleGold(MOB mob, Container container, java.lang.String moneyStr)
mob
- the player looking to give away their moneycontainer
- the container it must be in, or nullmoneyStr
- the user inputjava.util.List<Container> parsePossibleContainers(MOB mob, java.util.List<java.lang.String> commands, Filterer<Environmental> filter, boolean withContentOnly)
mob
- the player whose commands are parsedcommands
- the commands to parse and checkfilter
- filter for allowed containers, or nullwithContentOnly
- true if the container must not be emptyItem parsePossibleContainer(MOB mob, java.util.List<java.lang.String> commands, boolean withStuff, Filterer<Environmental> filter)
mob
- the player whose commands are parsedcommands
- the commands to parse and checkwithStuff
- true if the container must not be emptyfilter
- filter for allowed containers, or nulljava.lang.String stringifyElapsedTimeOrTicks(long millis, long ticks)
millis
- the number of ellapsed milliseconds to convertticks
- the number of ticks to average ms byint parseMaxToGive(MOB mob, java.util.List<java.lang.String> commands, boolean breakPackages, Environmental checkWhat, boolean getOnly)
mob
- the player to parse commands fromcommands
- the parsed input from the userbreakPackages
- true to allow package breakingcheckWhat
- Possessor (MOB or Room) to check.getOnly
- true if getting from a roomlong getMillisMultiplierByName(java.lang.String timeName)
timeName
- an amount of time wordint probabilityOfBeingEnglish(java.lang.String str)
str
- the text to inspectjava.lang.String sizeDescShort(long size)
size
- the full dm distancedistanceDescShort(long)
java.lang.String distanceDescShort(long distance)
distance
- the full dm distancesizeDescShort(long)
java.lang.String coordDescShort(long[] coords)
coords
- the 3-absolute coordssizeDescShort(long)
java.lang.String speedDescShort(double speed)
speed
- the raw speed doublejava.lang.String directionDescShort(double[] dir)
dir
- the direction in radiansdirectionDescShortest(double[])
java.lang.String directionDescShortest(double[] dir)
dir
- the direction in radiansdirectionDescShort(double[])
java.lang.Long parseSpaceDistance(java.lang.String dist)
dist
- the user-entered string