added docs for chat/color plugn
This commit is contained in:
parent
29eb6c1975
commit
349c2f17cf
3 changed files with 79 additions and 17 deletions
|
@ -123,6 +123,7 @@ Walter Higgins
|
|||
* [Usage](#usage-8)
|
||||
* [alias Plugin](#alias-plugin)
|
||||
* [Examples](#examples-2)
|
||||
* [chat Plugin](#chat-plugin)
|
||||
* [Classroom Plugin](#classroom-plugin)
|
||||
* [classroom.allowScripting() function](#classroomallowscripting-function)
|
||||
* [Commando Plugin](#commando-plugin)
|
||||
|
@ -2479,6 +2480,37 @@ Aliases can be used at the in-game prompt by players or in the server
|
|||
console. Aliases will not be able to avail of command autocompletion
|
||||
(pressing the TAB key will have no effect).
|
||||
|
||||
## chat Plugin
|
||||
|
||||
This plugin lets players choose a text color to use when chatting. Players can list colors by typing...
|
||||
|
||||
/jsp list_colors
|
||||
|
||||
... and can set the color to use when chatting by typing...
|
||||
|
||||
/jsp chat_color {color}
|
||||
|
||||
... where {color} is one of the following colors...
|
||||
|
||||
* black
|
||||
* blue
|
||||
* darkgreen
|
||||
* darkaqua
|
||||
* darkred
|
||||
* purple
|
||||
* gold
|
||||
* gray
|
||||
* darkgray
|
||||
* indigo
|
||||
* brightgreen
|
||||
* aqua
|
||||
* red
|
||||
* pink
|
||||
* yellow
|
||||
* white
|
||||
|
||||
This plugin's source code is useful to study because it is short and demonstrates use of the `plugin()`, and `command()` functions, persistence and event handling.
|
||||
|
||||
## Classroom Plugin
|
||||
|
||||
The `classroom` object contains a couple of utility functions for use
|
||||
|
@ -2624,8 +2656,8 @@ The `jsp home` command has the following options...
|
|||
|
||||
* `/jsp home` ..command will return you to your home, if you have set one.
|
||||
|
||||
* `/jsp home <player>` Will take you to the home of <player> (where
|
||||
<player> is the name of the player whose home you wish to visit.
|
||||
* `/jsp home {player}` Will take you to the home of {player} (where
|
||||
{player} is the name of the player whose home you wish to visit.
|
||||
|
||||
* `/jsp home delete` Deletes your home location from the location
|
||||
database. This does not actually remove the home from the world or
|
||||
|
@ -2640,8 +2672,8 @@ visit.
|
|||
|
||||
* `/jsp home list` Lists home which you can visit.
|
||||
* `/jsp home ilist` Lists players who can visit your home.
|
||||
* `/jsp home invite <player>` Invites the named player to your home.
|
||||
* `/jsp home uninvite <player>` Uninvites (revokes invitation) the named player to your home.
|
||||
* `/jsp home invite {player}` Invites the named player to your home.
|
||||
* `/jsp home uninvite {player}` Uninvites (revokes invitation) the named player to your home.
|
||||
* `/jsp home public` Opens your home to all players (all players can visit your home).
|
||||
* `/jsp home private` Makes your home private (no longer visitable by all).
|
||||
|
||||
|
@ -2649,7 +2681,7 @@ visit.
|
|||
The following administration options can only be used by server operators...
|
||||
|
||||
* `/jsp home listall` List all of the homes
|
||||
* `/jsp home clear <player>` Removes the player's home
|
||||
* `/jsp home clear {player}` Removes the player's home
|
||||
location. Again, this command does not destroy any structures in
|
||||
the world, it simply removes the location from the database. No
|
||||
blocks are destroyed by this command.
|
||||
|
|
|
@ -1,6 +1,36 @@
|
|||
/*
|
||||
TODO: Document this module
|
||||
*/
|
||||
/*************************************************************************
|
||||
## chat Plugin
|
||||
|
||||
This plugin lets players choose a text color to use when chatting. Players can list colors by typing...
|
||||
|
||||
/jsp list_colors
|
||||
|
||||
... and can set the color to use when chatting by typing...
|
||||
|
||||
/jsp chat_color {color}
|
||||
|
||||
... where {color} is one of the following colors...
|
||||
|
||||
* black
|
||||
* blue
|
||||
* darkgreen
|
||||
* darkaqua
|
||||
* darkred
|
||||
* purple
|
||||
* gold
|
||||
* gray
|
||||
* darkgray
|
||||
* indigo
|
||||
* brightgreen
|
||||
* aqua
|
||||
* red
|
||||
* pink
|
||||
* yellow
|
||||
* white
|
||||
|
||||
This plugin's source code is useful to study because it is short and demonstrates use of the `plugin()`, and `command()` functions, persistence and event handling.
|
||||
|
||||
***/
|
||||
var _store = { players: { } },
|
||||
colorCodes = {},
|
||||
i,
|
||||
|
|
|
@ -28,8 +28,8 @@ The `jsp home` command has the following options...
|
|||
|
||||
* `/jsp home` ..command will return you to your home, if you have set one.
|
||||
|
||||
* `/jsp home <player>` Will take you to the home of <player> (where
|
||||
<player> is the name of the player whose home you wish to visit.
|
||||
* `/jsp home {player}` Will take you to the home of {player} (where
|
||||
{player} is the name of the player whose home you wish to visit.
|
||||
|
||||
* `/jsp home delete` Deletes your home location from the location
|
||||
database. This does not actually remove the home from the world or
|
||||
|
@ -44,8 +44,8 @@ visit.
|
|||
|
||||
* `/jsp home list` Lists home which you can visit.
|
||||
* `/jsp home ilist` Lists players who can visit your home.
|
||||
* `/jsp home invite <player>` Invites the named player to your home.
|
||||
* `/jsp home uninvite <player>` Uninvites (revokes invitation) the named player to your home.
|
||||
* `/jsp home invite {player}` Invites the named player to your home.
|
||||
* `/jsp home uninvite {player}` Uninvites (revokes invitation) the named player to your home.
|
||||
* `/jsp home public` Opens your home to all players (all players can visit your home).
|
||||
* `/jsp home private` Makes your home private (no longer visitable by all).
|
||||
|
||||
|
@ -53,7 +53,7 @@ visit.
|
|||
The following administration options can only be used by server operators...
|
||||
|
||||
* `/jsp home listall` List all of the homes
|
||||
* `/jsp home clear <player>` Removes the player's home
|
||||
* `/jsp home clear {player}` Removes the player's home
|
||||
location. Again, this command does not destroy any structures in
|
||||
the world, it simply removes the location from the database. No
|
||||
blocks are destroyed by this command.
|
||||
|
@ -74,21 +74,21 @@ var homes = plugin( 'homes', {
|
|||
return [
|
||||
/* basic functions */
|
||||
'/jsp home : Return to your own home',
|
||||
'/jsp home <player> : Go to player home',
|
||||
'/jsp home {player} : Go to player home',
|
||||
'/jsp home set : Set your current location as home',
|
||||
'/jsp home delete : Delete your home location',
|
||||
|
||||
/* social */
|
||||
'/jsp home list : List homes you can visit',
|
||||
'/jsp home ilist : List players who can visit your home',
|
||||
'/jsp home invite <player> : Invite <player> to your home',
|
||||
'/jsp home uninvite <player> : Uninvite <player> to your home',
|
||||
'/jsp home invite {player} : Invite {player} to your home',
|
||||
'/jsp home uninvite {player} : Uninvite {player} to your home',
|
||||
'/jsp home public : Open your home to all players',
|
||||
'/jsp home private : Make your home private',
|
||||
|
||||
/* administration */
|
||||
'/jsp home listall : Show all houses (ops only)',
|
||||
'/jsp home clear <player> : Clears player home location (ops only)'
|
||||
'/jsp home clear {player} : Clears player home location (ops only)'
|
||||
];
|
||||
},
|
||||
/* ========================================================================
|
||||
|
|
Reference in a new issue