Roleplay Character Cards
Players can create their own "Character Cards." These cards are visible via chat by way of commands or by simply right clicking on another player. Each card has a name, age, sex, race, and description attached to it. However, if one doesn't have one of these fields populated, you simply won't see it when requesting their card. Cards persist through sessions: they're saved in files.
/card name [name] - Allows the player to set their name for their character card.
/card age [age] - Allows the player to set their age for their character card. Must be greater than 0.
/card description - Gives the player their description book. They may edit their description from this book. Finish by clicking 'Done' on the book GUI.
/card race [race] - Allows the player to set their race. This can be any string.
/card sex [sex] - Allows the player to set their sex. This is "Male" or "Female."
/card reload - Reloads all of the saved character cards.
/card delete - Deletes your character card.
With the permission node "cards.edit.other," one can use any of these commands (with the exception of reload) with another player's name as a preceding argument to change another player's character card. For example, to change the name of a player named "Steve," one would use: /card name Steve [name].
/c [sub command] [arguments] - Any command can be accessed via /c. This is simply a shortened version of /card.
Using /c or /card:
/<c or card> r - Edit race. Works with editing other players' information, too.
/<c or card> re - Reloads all cards.
/<c or card> n - Edits name. Works with editing other players' information, too.
/<c or card> a - Edits age. Works with editing other players' information, too.
/<c or card> d - Edits description. Works with editing other players' information, too.
/<c or card> desc - Edits description. Works with editing other players' information, too.
/<c or card> de - Deletes the card. Works with editing other players' information, too.
/<c or card> del - Deletes the card. Works with editing other players' information, too.
cards.base - Allows for basic editing of one's own character card. This is defaulted to all players.
cards.reload - Allows one to reload all of the character cards. Defaults to ops only.
cards.edit.other - Allows one to edit other players' character cards as well as one's own. Defaults to ops only.
Editing Descriptions via Books
When you use /card description, your description book is given to you. This book's first page has text which binds it you: DO NOT EDIT THIS PAGE. Page 2 to Page N can be filled with whatever text you like. Trying to use /card description again with the book still in your inventory will not allow you to get the book again. However, dropping the book and using the command again exploits an issue described in the issues section.
- Players may use /card description to get their description book, drop the book, then use the command again to get another book. This can be used to spawn an infinite number of books.
- String fields (name, race, etc.) which are filled with "null" will not be read back when the plugin reloads.
- Probably a lot of other stuff. Please give feedback.
Just drop the plugin into your /server/plugins folder, then start the server. That's it.
Character cards are saved as text files whose names are the unique id for the player. The format of the files are:
- description line 1
- description line 2
- description line n
The information can be edited from the text file outside of the game. However, this is untested, so you might get unexpected behavior when loading the files with the plugin.