wyvern.kernel.player
Class Aliases

java.lang.Object
  extended bywyvern.kernel.player.Aliases

public final class Aliases
extends java.lang.Object

Tracks the standard mappings for keys that come in from the client.

Version:
1.0, Oct 17, 2001
Author:
Steve Yegge

Constructor Summary
Aliases()
           
 
Method Summary
static java.lang.String getDefaultAlias(java.lang.String key)
          Returns the default alias for the passed key-string.
static java.util.Map parseAliases(PropertyList plist)
          Returns a map of aliases to commands, parsed from a PropertyList containing zero or more properties named "alias-whatever", where the value is the command to substitute when the player types "whatever".
static java.util.List parseMacro(java.lang.String command)
          Supports multi-command macros.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Aliases

public Aliases()
Method Detail

getDefaultAlias

public static java.lang.String getDefaultAlias(java.lang.String key)
Returns the default alias for the passed key-string.

Returns:
the alias, or null if not found

parseMacro

public static java.util.List parseMacro(java.lang.String command)
Supports multi-command macros.

Parameters:
command - the command the user typed
Returns:
the command split into separate commands, using the default command delimiter

parseAliases

public static java.util.Map parseAliases(PropertyList plist)
Returns a map of aliases to commands, parsed from a PropertyList containing zero or more properties named "alias-whatever", where the value is the command to substitute when the player types "whatever".

Parameters:
plist - the player, or any PropertyList implementation
Returns:
a Map of aliases to commands