# 🔍️ Search

## Search

The FurnitureShow plugin provides a powerful search feature, allowing players to quickly find specific furniture items across all categories or within a chosen category. This is especially useful for servers with a large collection of furniture.

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2FOzF7LTcLXWEFbWKUyHvB%2Fimage.png?alt=media&#x26;token=2b702cca-3964-41e7-acc6-1a610d32bf54" alt=""><figcaption></figcaption></figure>

***

### Using the Search Command

The primary command for accessing the search functionality is `/nwfurnitureopen search`.

#### Basic Search: `/nwfurnitureopen search <keyword>`

* **Purpose:** Search for furniture items by their display name or internal ID across **all configured categories**.
* **`<keyword>`:** The term you want to search for. The search is case-insensitive.
  * The plugin will prioritize matching against the item's `name` property in the `furniture/<category>.yml` files.
  * If no match is found by `name`, it will then attempt to match against the item's `id`.
* **Example:**
  * `/nwfurnitureopen search chair` - This will open a GUI showing all furniture items that have "chair" in their name or ID (e.g., "Red Chair", "Gaming Chair", "id:fancy\_chair").
  * `/nwfurnitureopen search table` - Finds all tables.<br>

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2FX4qyP67bOIXUZ9szTGy9%2Fimage.png?alt=media&#x26;token=39c25592-3272-4a97-94f9-ac57d82cbfeb" alt=""><figcaption></figcaption></figure>

#### Category-Specific Search: `/nwfurnitureopen search <keyword> <category>`

* **Purpose:** Narrow down your search to a **specific furniture category**.
* **`<keyword>`:** The search term (same as basic search).
* **`<category>`:** The name of the category file (e.g., `furnitures`, `decorations`). This must be a valid category configured in your `plugins/nwFurnitureShow/furniture/` folder.
* **Example:**
  * `/nwfurnitureopen search lamp decorations` - This will search for items containing "lamp" only within the `decorations.yml` category.

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2Fh3DbtDgasAeDvkFoavsB%2Fimage.png?alt=media&#x26;token=6782273e-83c3-47e5-a583-a84b7113d2e8" alt=""><figcaption></figcaption></figure>

#### Dyeable Item Search: `/nwfurnitureopen search <keyword> [category] dye`

* **Purpose:** Filter search results to include **only dyeable furniture items**. This requires the HMCColor system to be enabled and properly configured in your plugin's settings.
* **`<keyword>`:** The search term.
* **`[category]`:** (Optional) You can still specify a category to search within.
* **`dye`:** This specific keyword at the end of the command activates the dyeable filter.
  * **Tab Completion:** The `dye` option will only appear in tab completion if the HMCColor system is active on your server.
* **Example:**
  * `/nwfurnitureopen search cushion dye` - Finds all dyeable cushions across all categories.
  * `/nwfurnitureopen search bed bedroom dye` - Finds all dyeable beds specifically in the "bedroom" category.

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2FkxkkRaoYhv2VsXAOjBv7%2Fimage.png?alt=media&#x26;token=10f5dfa0-7f9b-4c1f-9952-260af1165e7c" alt=""><figcaption><p>/nwfurnitureopen search Chair dye</p></figcaption></figure>

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2FauFr7FjYY3pWYhRsrfN1%2Fimage.png?alt=media&#x26;token=6fc3f58c-4269-4130-8cf9-f97ae0a0c89b" alt=""><figcaption><p>HMCColor Support</p></figcaption></figure>

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2FCYjKSFGeR1MmiZU9k9o1%2Fimage.png?alt=media&#x26;token=263d19b0-473d-4be5-9f90-8fcffdd9a40f" alt=""><figcaption><p>Result</p></figcaption></figure>

#### Display All Items: `/nwfurnitureopen search - [category] [dye]`

* **Purpose:** View **all furniture items** without applying any keyword filter. This acts like a "show all" command.
* **`-` (hyphen):** Using a hyphen as the `<keyword>` signifies that you want to see all items.
* **`[category]`:** (Optional) You can still restrict "show all" to a specific category.
* **`[dye]`:** (Optional) You can combine `show all` with the `dye` filter to see all dyeable items.
* **Examples:**
  * `/nwfurnitureopen search -` - Opens a GUI showing *every* furniture item from *all* categories.
  * `/nwfurnitureopen search - outdoor` - Displays all furniture items specifically from the "outdoor" category.
  * `/nwfurnitureopen search - dye` - Shows all dyeable furniture items from all categories.
  * `/nwfurnitureopen search - furnitures dye` - Shows all dyeable furniture items specifically from the "furnitures" category.

<figure><img src="https://1245303946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEMKTTfYtO1c14jr3rkcH%2Fuploads%2FWPWPsvlMJJNpAIw4Wwsi%2Fimage.png?alt=media&#x26;token=f41ce6e7-5cf5-469e-b6f7-0fccef601966" alt=""><figcaption></figcaption></figure>

***

### Search Result GUI

* After executing a search command, a new GUI will open displaying the matching furniture items.
* The title of this GUI will reflect your search term (e.g., "Search: chair").
* You can navigate through multiple pages of search results using the pagination buttons at the bottom of the GUI.

***
