# ParaHoppers (Lite) — Commands and Permissions

Verified against the finalized ParaHoppers Lite 1.0.0 release source, including both the Legacy and Modern `plugin.yml` files and the command/listener implementation. The two builds register the same commands, aliases, and permissions.

## Command entry point

- Primary command: `/parahoppers`
- Alias: `/ph`
- Registered usage: `/parahoppers [help|give|inspect|link|unlink|list|reload|stats]`
- `/ph` and `/parahoppers` are interchangeable in every example below.

## Implemented commands

### `/ph` or `/ph help`

- Description: Displays ParaHoppers Lite help. Administrative commands are shown only when the sender has the corresponding permission.
- Permission required: None.
- Intended for: Players and administrators; also usable from the server console.
- Examples:
  - `/ph`
  - `/ph help`

### `/ph inspect`

- Description: Toggles inspection mode. After enabling it, right-click a placed ParaHopper to display its type, level, owner name and UUID, and location. Inspection mode turns off after a successful inspection; running the command again also turns it off.
- Permission required: `parahoppers.inspect`
- Default: Everyone (`true`).
- Intended for: Players.
- Console support: No; this is a player-only command.
- Example: `/ph inspect`

### `/ph link`

- Description: Starts the process of linking one ParaHopper to another. Look directly at the source ParaHopper within six blocks, run the command, then right-click the destination ParaHopper.
- Permission required: No dedicated command permission.
- Intended for: Players.
- Console support: No; this is a player-only command.
- Ownership: When `teleport.owner-only-linking` is enabled (the default), the player must own the source and destination. `parahoppers.admin` bypasses the ownership restriction.
- Other limits: Linking a hopper to itself is rejected. Cross-world linking is rejected unless enabled in the configuration.
- Example: Look at the source hopper, run `/ph link`, then right-click the destination hopper.

### `/ph unlink`

- Description: Removes the outgoing link from the ParaHopper the player is looking at within six blocks.
- Permission required: No dedicated command permission.
- Intended for: Players.
- Console support: No; this is a player-only command.
- Current implementation note: Unlike link creation, the unlink command does not perform an ownership or `parahoppers.admin` check.
- Example: Look at a linked ParaHopper and run `/ph unlink`.

### `/ph give <player> <collector> [amount]`

- Description: Gives a player one or more Collector ParaHopper items at the configured default level.
- Permission required: `parahoppers.admin.give`
- Default: Server operators (`op`).
- Intended for: Administrators.
- Console support: Yes.
- Arguments:
  - `<player>` must be the exact name of an online player.
  - `<collector>` is currently the only implemented hopper type. It is case-insensitive.
  - `[amount]` is optional, defaults to `1`, and must be a positive whole number.
- Examples:
  - `/ph give Alex collector`
  - `/ph give Alex collector 4`

### `/ph list`

- Description: Lists the total number of registered ParaHoppers, followed by each hopper's type, level, world, and coordinates.
- Permission required: `parahoppers.admin.list`
- Default: Server operators (`op`).
- Intended for: Administrators.
- Console support: Yes.
- Example: `/ph list`

### `/ph reload`

- Description: Reloads the plugin configuration and plugin-managed files/engines through ParaHoppers' reload routine.
- Permission required: `parahoppers.admin.reload`
- Default: Server operators (`op`).
- Intended for: Administrators.
- Console support: Yes.
- Example: `/ph reload`

### `/ph stats`

- Description: Displays current runtime statistics: TPS, registered hoppers, active mining hoppers, blocks mined, collection cycles, mining cycles, and teleport cycles.
- Permission required: `parahoppers.admin.stats`
- Default: Server operators (`op`).
- Intended for: Administrators.
- Console support: Yes.
- Note: These are runtime counters rather than permanent historical totals. On a server API without a TPS method, the displayed `20.00` is a compatibility fallback rather than a measurement.
- Example: `/ph stats`

### Unknown or incomplete commands

An unknown subcommand, or `/ph give` without all required arguments, returns the command usage registered in `plugin.yml`:

```text
/parahoppers [help|give|inspect|link|unlink|list|reload|stats]
```

## Tab completion

- First argument: `help`, `inspect`, `link`, and `unlink` are offered to everyone. `give`, `list`, `reload`, and `stats` are offered only when the sender has the corresponding administrative permission.
- `/ph give <player>`: Suggests online player names.
- `/ph give <player> <type>`: Suggests `collector`.
- The optional amount has no custom suggestions.

## Consolidated permissions

| Permission | Default | Recommended recipient | Actual use in the current source |
|---|---|---|---|
| `parahoppers.use` | Everyone (`true`) | Player | Declared in `plugin.yml`, but not currently checked by command, GUI, or listener code. Denying it does not presently provide a complete “disable all use” control. |
| `parahoppers.place` | Everyone (`true`) | Player | Required to place a ParaHopper item. Placement is cancelled when denied. |
| `parahoppers.inspect` | Everyone (`true`) | Player/staff | Required for `/ph inspect`. |
| `parahoppers.admin` | Operators (`op`) | Administrator | Parent permission for all four `parahoppers.admin.*` nodes. Also bypasses ownership restrictions when linking, changing filters, toggling mining, or upgrading another player's ParaHopper. It is not used as a direct substitute in each admin command check; access to those commands comes through its child permissions. |
| `parahoppers.admin.give` | Operators (`op`) | Administrator | Required for `/ph give`. Child of `parahoppers.admin`. |
| `parahoppers.admin.list` | Operators (`op`) | Administrator | Required for `/ph list`. Child of `parahoppers.admin`. |
| `parahoppers.admin.reload` | Operators (`op`) | Administrator | Required for `/ph reload`. Child of `parahoppers.admin`. |
| `parahoppers.admin.stats` | Operators (`op`) | Administrator | Required for `/ph stats`. Child of `parahoppers.admin`. |

### Suggested groups

Ordinary players can retain the defaults:

```text
parahoppers.use
parahoppers.place
parahoppers.inspect
```

Trusted administrators can receive the parent node:

```text
parahoppers.admin
```

For limited staff roles, grant only the necessary child nodes, such as `parahoppers.admin.stats` for performance monitoring or `parahoppers.admin.give` for item distribution.

## Current commands versus roadmap ideas

Only the commands in the **Implemented commands** section exist in ParaHoppers Lite 1.0.0.

The roadmap discussed possible future commands such as `/ph version`, `/ph debug`, `/ph performance`, and the Premium-oriented `/ph network`. These are ideas only: they are not registered in the current `plugin.yml`, are not handled by the current command class, and should not be advertised as available commands.

## Verification scope

This document was derived from the finalized ParaHoppers Lite 1.0.0 release source:

- Legacy `plugin.yml`
- Modern `plugin.yml`
- `ParaHoppersCommand.java`
- `HopperListener.java`
- `HopperType.java`

It documents implemented behavior rather than proposed roadmap features.
