|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmondocommand.FormatConfig
public class FormatConfig
Allow customizing response strings from MondoCommand. Creating a FormatConfig is similar to doing so for MondoCommand: use argument chaining.
| Constructor Summary | |
|---|---|
FormatConfig()
|
|
| Method Summary | |
|---|---|
String |
getPermissionWarning()
|
String |
getReplyPrefix()
|
String |
getUsageHeading()
|
void |
registerColorAliases()
Register MondoCommand color aliases upon initialization of the MondoCommand. |
FormatConfig |
setPermissionWarning(String permissionWarning)
Set the permission warning to be displayed when a user cannot access a command. |
FormatConfig |
setReplyPrefix(String replyPrefix)
Set the prefix to be placed before all command replies. |
FormatConfig |
setUsageHeading(String usageHeading)
Set the heading to be shown when displaying command usage. |
void |
writeUsageLine(org.bukkit.command.CommandSender sender,
String commandLabel,
SubCommand sub)
Write out one entry of the usage output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormatConfig()
| Method Detail |
|---|
public String getPermissionWarning()
public String getUsageHeading()
public String getReplyPrefix()
public FormatConfig setPermissionWarning(String permissionWarning)
permissionWarning - a String which accepts color codes.
public FormatConfig setUsageHeading(String usageHeading)
usageHeading - A string which accepts color codes.
public FormatConfig setReplyPrefix(String replyPrefix)
replyPrefix - a String which accepts color codes.
public void registerColorAliases()
public void writeUsageLine(org.bukkit.command.CommandSender sender,
String commandLabel,
SubCommand sub)
This method exists so that users can subclass it and do their own formatting of MondoCommand's usage output. It's the responsibility of this method to also send the usage output, this way customized line wrapping, multi-line messages, etc can be implemented.
sender - The CommandSender requesting usage.commandLabel - The current base command label. Will be prefixed with a / if a player command.sub - The SubCommand we're generating a usage screen for.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||