BlockBook User Guide

BlockBook is a desktop app for managing contacts, optimized for use via a Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, BlockBook can get your contact management tasks done faster than traditional GUI apps.

BlockBook makes it easy to manage the contacts of other gamers you meet on servers, allowing you to manage contacts through not just names, but other gaming attributes too.


Quick start

  1. Ensure you have Java 17 or above installed in your Computer.
    Mac users: Ensure you have the precise JDK version prescribed here.

  2. Download the latest .jar file from here.

  3. Copy the file to the folder you want to use as the home folder for BlockBook.

  4. Open a command terminal, cd into the folder you put the jar file in, and use the java -jar BlockBook.jar command to run the application.
    A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
    Ui

  5. Type the command in the command box and press Enter to execute it. e.g. typing help and pressing Enter will open this User Guide in a browser window.
    Some example commands you can try:

    • list : Lists all contacts.

    • add name/John Doe gamertag/JD910 : Adds a contact named John Doe to BlockBook with the gamertag JD910.

    • delete 3 : Deletes the 3rd contact shown in the current list.

    • clear : Deletes all contacts.

    • exit : Exits the app.

  6. Refer to the Features below for details of each command.


Features

Notes about the command format:

  • Words in UPPER_CASE are the parameters to be supplied by the user.

    • e.g. in add name/NAME, NAME is a parameter which can be used as add name/John Doe.
  • Items in square brackets are optional.

    • e.g name/NAME [t/TAG] can be used as name/John Doe t/friend or as name/John Doe.
  • Items with after them can be used multiple times including zero times.

    • e.g. [t/TAG]… can be used as   (i.e. 0 times), t/friend, t/friend t/family etc.
  • Parameters can be in any order.
    e.g. if the command specifies name/NAME gamertag/GAMERTAG, gamertag/GAMERTAG name/NAME is also acceptable.

  • Extraneous parameters for commands that do not take in parameters (such as help, list, exit and clear) will be ignored.
    e.g. if the command specifies help 123, it will be interpreted as help.

  • If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application.

Viewing help : help

Opens this User Guide in a browser window.

Format: help

Adding a gamer: add

Adds a gamer to BlockBook with a required gamertag and optional details such as name, phone number, email address, group, server, favourite status, region, country, and notes.

Format: add gamertag/GAMERTAG [name/NAME] [phone/PHONE] [email/EMAIL] [group/GROUP] [server/SERVER] [favourite/FAVOURITE] [country/COUNTRY] [region/REGION] [note/NOTE]

Tip: Only gamertag/ is required. All other fields are optional.

- `email/`, must be a valid email in the format `local-part@domain`. - `favourite/` accepts `fav` or `unfav`. - `region/` accepts `NA`, `SA`, `EU`, `AFRICA`, `ASIA`, `OCEANIA` or `ME`.

Examples:

  • add gamertag/ilovesteve name/Herobrine phone/99999 email/brine@gmail.com group/DestroySteve server/127.0.0.1:8080 favourite/fav country/Singapore region/ASIA note/I hate steve
  • add gamertag/Notch name/Notch phone/+12345 email/notch@example.com group/Redstone Crew server/mc.example.net:25565 favourite/unfav country/Malaysia region/ASIA note/Usually plays survival

Listing all gamers : list

Shows a list of all gamers stored in BlockBook.

Format: list

Editing a gamer : edit

Edits an existing gamer stored in BlockBook. TAKE NOTE! This command does not allow the editing of fields that do not exist, such as p/, e/, a/ etc. These fields are a work in progress.

Format: edit INDEX [name/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]

  • Edits the gamer at the specified INDEX. The index refers to the index number shown in the displayed gamer list. The index must be a positive integer 1, 2, 3, ...
  • At least one of the optional fields must be provided.
  • Existing values will be updated to the input values.
  • When editing tags, the existing tags of the gamer will be removed i.e adding of tags is not cumulative.
  • You can remove all the gamer's tags by typing t/ without specifying any tags after it.

Examples:

  • edit 1 p/91234567 e/johndoe@example.com Edits the phone number and email address of the 1st gamer to be 91234567 and johndoe@example.com respectively.
  • edit 2 name/Betsy Crower t/ Edits the name of the 2nd gamer to be Betsy Crower and clears all existing tags.

Editing a gamer’s favourite status : favourite/unfavourite

Updates a gamer’s favourite status via index

Format: favourite INDEX or unfavourite INDEX

  • Updates the favourite status of the gamer at the specified INDEX. The index refers to the index number shown in the displayed gamer list.

Examples:

  • favourite 1 Updates the favourite status of the first gamer to favourite.
  • unfavourite 1 Remove the first gamer from favourites.

Locating gamers by name: find

Finds gamers whose names contain any of the given keywords.

Format: find KEYWORD [MORE_KEYWORDS]

  • The search is case-insensitive. e.g hans will match Hans
  • The order of the keywords does not matter. e.g. Hans Bo will match Bo Hans
  • Only the name is searched.
  • Only full words will be matched e.g. Han will not match Hans
  • gamers matching at least one keyword will be returned (i.e. OR search). e.g. Hans Bo will return Hans Gruber, Bo Yang

Examples:

  • find John returns john and John Doe
  • find alex david returns Alex Yeoh, David Li
    result for 'find alex david'

Sorting gamers : sort

Sorts the displayed contact list by one or more attributes.

Format: sort [ATTRIBUTE/]...

  • If no attributes are provided, contacts are sorted by gamertag by default.
  • When multiple attributes are provided, they are applied in order of priority (left to right). The first attribute is the primary sort key, the second is used to break ties, and so on.
  • Each attribute can only be specified once (no duplicates).

Valid attributes:

Attribute Description
name/ Sort by name
gamertag/ Sort by gamertag
phone/ Sort by phone number
email/ Sort by email address
group/ Sort by group
server/ Sort by server
favourite/ Sort by favourite status (favourites first)
country/ Sort by country
region/ Sort by region
note/ Sort by note

Examples:

  • sort sorts all contacts by gamertag (default).
  • sort name/ sorts all contacts by name.
  • sort phone/ gamertag/ sorts all contacts by phone number, using gamertag to break ties.
  • sort favourite/ name/ sorts favourites before non-favourites, then by name within each group.

Deleting a Gamer : delete

Deletes the specified gamers from BlockBook.

Format: delete INDEX [INDEX]...

  • Deletes the gamers at each specified INDEX.
  • Trying to delete the same index multiple times will only cause that index to be deleted once.
  • The indexes refer to the index numbers shown in the displayed gamer list.
  • The indexes do not have to be in any particular order. e.g. delete 2 1 is acceptable.
  • Each index must be a positive integer 1, 2, 3, ...

Examples:

  • list followed by delete 2 deletes the 2nd gamer shown in the list.
  • find Betsy followed by delete 1 2 deletes the 1st and 2nd gamer in the results of the find command.
  • delete 2 1 deletes the 1st and 2nd gamer shown in the list.
  • delete 1 2 2 deletes only the 1st and 2nd gamers shown in the list. The 2nd gamer is only deleted once.

Clearing all entries : clear

Clears all entries from BlockBook.

Format: clear

Exiting the program : exit

Exits the program.

Format: exit

Saving the data

BlockBook data is saved to primary storage automatically after any command that changes the data. There is no need to save manually.

Editing the data file

BlockBook data is saved automatically as a JSON file [JAR file location]/data/contacts.json. Advanced users are welcome to update data directly by editing that data file.

Caution: If your changes to the data file makes its format invalid, BlockBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
Furthermore, certain edits can cause BlockBook to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.

Archiving data files [coming in v2.0]

Details coming soon ...


FAQ

Q: How do I transfer my data to another Computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous BlockBook home folder.


Known issues

  1. When using multiple screens, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the preferences.json file created by the application before running the application again.

Command summary

Action Format, Examples
Add add name/NAME gamertag/GAMERTAG
e.g., add name/James Ho gamertag/JamieH
Clear clear
Delete delete INDEX [INDEX]...
e.g., delete 3, delete 2 5
Edit edit INDEX [name/NAME] [gamertag/GAMERTAG]
e.g.,edit 2 name/James Lee
Find find KEYWORD
e.g., find James
find ATTRIBUTE1/KEYWORD1 [ATTRIBUTE2/KEYWORD2]...
e.g., find name/Steve gamertag/Block
View view gamertag/GAMERTAG
e.g., view gamertag/SteveMaster99
List list
Sort sort [ATTRIBUTE/]...
e.g., sort, sort name/, sort phone/ gamertag/
Help help