Skip to content

Commit

Permalink
Add command permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre601 committed May 18, 2024
1 parent 9c439c8 commit 64b2b3c
Show file tree
Hide file tree
Showing 7 changed files with 196 additions and 68 deletions.
21 changes: 15 additions & 6 deletions docs/general/commands/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ description: General usage of special features for a hologram

## Commands

: **Aliases:** `feature`, `f`
**Aliases:** `feature`, `f`
**Permission:** `dh.command.features`

/// info | Command help
For a list of all available subcommands run the following command:
Expand All @@ -20,7 +21,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh f disable <feature>` { #dh-f-disable }

: **Aliases:** `off`
: **Aliases:** `off`
**Permission:** `dh.command.features.disable`

Disables a Feature.

Expand All @@ -30,7 +32,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh f enable <feature>` { #dh-f-enable }

: **Aliases:** `on`
: **Aliases:** `on`
**Permission:** `dh.command.features.enable`

Enables a Feature.

Expand All @@ -40,20 +43,26 @@ For a list of all available subcommands run the following command:

### `#!command /dh f info <feature>` { #dh-f-info }

: Gives information about a specific feature.
: **Permission:** `dh.command.features.info`

Gives information about a specific feature.

- `#!command <feature>` - The feature to retrieve infos about.

----

### `#!command /dh f list` { #dh-f-list }

: Lists all available features.
: **Permission:** `dh.command.features.list`

Lists all available features.

----

### `#!command /dh f reload <feature>` { #dh-f-reload }

: Reloads a specific feature.
: **Permission:** `dh.command.features.reload`

Reloads a specific feature.

- `#!command <feature>` - The feature to reload.
16 changes: 12 additions & 4 deletions docs/general/commands/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ For a list of available subcommands run the following command:

### `#!command /dh convert <plugin> [file]` { #dh-convert }

: Converts holograms from another hologram plugin.
: **Permission:** `dh.command.convert`

Converts holograms from another hologram plugin.
The hologram plugin does not have to be on the server. Only its files!

- `#!command <plugin>` - The Hologram plugin to convert holograms from. See [this page](../compatibility.md) for a list.
Expand All @@ -28,20 +30,26 @@ For a list of available subcommands run the following command:

### `#!command /dh list [page]` { #dh-list }

: Lists all holograms loaded from a hologram file.
: **Permission:** `dh.command.list`

Lists all holograms loaded from a hologram file.

- `#!command [page]` - Page in the list to move to.

----

### `#!command /dh reload` { #dh-reload }

: Reloads the plugin.
: **Permission:** `dh.command.reload`

Reloads the plugin.

----

### `#!command /dh version` { #dh-version }

: **Aliases:** `about`, `ver`
: **Permission:** `dh.command.version`

**Aliases:** `about`, `ver`

Shows some info about your current DecentHolograms version.
60 changes: 42 additions & 18 deletions docs/general/commands/hologram-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ description: General usage and editing of hologram lines

## Commands

: **Aliases:** `line`, `l`
**Aliases:** `line`, `l`
**Permission:** `dh.command.lines`

/// info | Command help
For a list of all available subcommands run the following command:
Expand All @@ -20,7 +21,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l add <hologram> <page> [content]` { #dh-l-add }

: **Aliases:** `append`
: **Aliases:** `append`
**Permission:** `dh.command.lines.add`

Add a new line into hologram.

Expand All @@ -32,7 +34,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh l addflag <hologram> <page> <line> <flag>` { #dh-l-addflag }

: Adds a [flag](../flags.md) to a hologram line.
: **Permission:** `dh.command.lines.addflag`

Adds a [flag](../flags.md) to a hologram line.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
Expand All @@ -41,21 +45,25 @@ For a list of all available subcommands run the following command:

----

### `#!command /dh l align <hologram> <page> <line1> <line2> {X|Z|XZ}` { #dh-l-align }
### `#!command /dh l align <hologram> <page> <line1> <line2> {X|Z|XZ|FACING}` { #dh-l-align }

: Aligns `#!command <line1>` with `#!command <line2>` on the specified axis.

: **Permission:** `dh.command.lines.align`

Aligns `#!command <line1>` with `#!command <line2>` on the specified axis or facing angle.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
- `#!command <line1>` - Index of the first line.
- `#!command <line2>` - Index of the second line.
- `#!command {X|Z|XZ}` - Align `#!command <line1>` with `#!command <line2>` on either the X, Z, or X and Z axis.
- `#!command {X|Z|XZ|FACING}` - Align `#!command <line1>` with `#!command <line2>` on either the X, Z, or X and Z axis, or sets its facing angle to that of `#!command <line2>`.

----

### `#!command /dh l edit <hologram> <page> <line>` { #dh-l-edit }

: **Aliases:** `e`
: **Aliases:** `e`
**Permission:** `dh.command.lines.edit`

Gives you a chat message to click on to get a pre-made command to edit the specified line.

Expand All @@ -67,7 +75,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l height <hologram> <page> <line> <height>` { #dh-l-height }

: **Aliases:** `setheight`
: **Aliases:** `setheight`
**Permission:** `dh.command.lines.height`

Set the height of a line.

Expand All @@ -80,7 +89,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh l info <hologram> <page> <line>` { #dh-l-info }

: Display some general info about a hologram line.
: **Permission:** `dh.command.lines.info`

Display some general info about a hologram line.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
Expand All @@ -90,7 +101,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh l insert <hologram> <page> <line> [content]` { #dh-l-insert }

: Insert a new line into hologram at the position of the given line number.
: **Permission:** `dh.command.lines.insert`

Insert a new line into hologram at the position of the given line number.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
Expand All @@ -101,7 +114,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l offsetx <hologram> <page> <line> <offset>` { #dh-l-offsetx }

: **Aliases:** `offx`, `xoff`, `xoffset`
: **Aliases:** `offx`, `xoff`, `xoffset`
**Permission:** `dh.command.lines.offsetx`

Set the X offset of a hologram line.

Expand All @@ -114,7 +128,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l offsetz <hologram> <page> <line> <offset>` { #dh-l-offsetz }

: **Aliases:** `offz`, `zoff`, `zoffset`
: **Aliases:** `offz`, `zoff`, `zoffset`
**Permission:** `dh.command.lines.offsetz`

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
Expand All @@ -125,7 +140,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l remove <hologram> <page> <line>` { #dh-l-remove }

: **Aliases:** `del`, `delete`, `rem`
: **Aliases:** `del`, `delete`, `rem`
**Permission:** `dh.command.lines.remove`

Remove a line from hologram.

Expand All @@ -137,7 +153,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh l removeflag <hologram> <page> <line> <flag>` { #dh-l-removeflag }

: Removes a [flag](../flags.md) from a hologram line.
: **Permission:** `dh.command.lines.removeflag`

Removes a [flag](../flags.md) from a hologram line.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
Expand All @@ -148,7 +166,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh l set <hologram> <page> <line> <content>` { #dh-l-set }

: Set a new content to hologram line.
: **Permission:** `dh.command.lines.set`

Set a new content to hologram line.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the line is.
Expand All @@ -159,7 +179,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l setfacing <hologram> <page> <line> <facing>` { #dh-l-setfacing }

: **Aliases:** `facing`, `face`
: **Aliases:** `facing`, `face`
**Permission:** `dh.command.lines.setfacing`

Set the rotation of hologram line facing (Yaw). This only has an effect on `#HEAD:`, `#SMALLHEAD:` and `#ENTITY:` content lines.

Expand All @@ -172,7 +193,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh l setpermission <hologram> <page> <line> [permission]` { #dh-l-setpermission }

: **Aliases:** `perm`, `permission`, `setperm`
: **Aliases:** `perm`, `permission`, `setperm`
**Permission:** `dh.command.lines.setpermission`

Set a permission required to view a hologram line.

Expand All @@ -185,7 +207,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh l swap <hologram> <page> <line1> <line2>` { #dh-l-swap }

: Swap two lines in a hologram.
: **Permission:** `dh.command.lines.swap`

Swap two lines in a hologram.

- `#!command <hologram>` - Name of the Hologram.
- `#!command <page>` - Index of the page, on which the lines are.
Expand Down
35 changes: 25 additions & 10 deletions docs/general/commands/hologram-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ description: General usage and editing of hologram pages

## Commands

: **Aliases:** `page`, `p`
**Aliases:** `page`, `p`
**Permission:** `dh.command.pages`

/// info | Command help
For a list of all available subcommands run the following command:
Expand All @@ -20,7 +21,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh p actions <hologram> <page> <clickType> [listPage]` { #dh-p-actions }

: View actions set on the specified [Click type](../actions.md#click-types) in page of a hologram.
: **Permission:** `dh.command.pages.actions`

View actions set on the specified [Click type](../actions.md#click-types) in page of a hologram.

- `#!command <hologram>` - Name of the hologram.
- `#!command <page>` - Index of the page.
Expand All @@ -31,7 +34,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh p add <hologram> [content]` { #dh-p-add }

: **Aliases:** `append`
: **Aliases:** `append`
**Permission:** `dh.command.pages.add`

Add a new page into hologram.

Expand All @@ -42,7 +46,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh p addaction <hologram> <page> <clickType> <action>` { #dh-p-addaction }

: Adds the specified [`<action>`](../actions.md) for the specified `#!command <clickType>` to a hologram page.
: **Permission:** `dh.command.pages.addaction`

Adds the specified [`<action>`](../actions.md) for the specified `#!command <clickType>` to a hologram page.

- `#!command <hologram>` - Name of the hologram.
- `#!command <page>` - Index of the page.
Expand All @@ -53,7 +59,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh p clearactions <hologram> <page> <clickType>` { #dh-p-clearactions }

: Clears `#!command <page>` of all [Actions](../actions.md) specified for `#!command <clickType>`.
: **Permission:** `dh.command.pages.clearactions`

Clears `#!command <page>` of all [Actions](../actions.md) specified for `#!command <clickType>`.

- `#!command <hologram>` - Name of the hologram.
- `#!command <page>` - Index of the page.
Expand All @@ -63,7 +71,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh p insert <hologram> <page> [content]` { #dh-p-insert }

: Insert a new page into hologram.
: **Permission:** `dh.command.pages.insert`

Insert a new page into hologram.

- `#!command <hologram>` - Name of the hologram.
- `#!command <page>` - Position of the page to insert the new one before.
Expand All @@ -73,7 +83,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh p remove <hologram> <page>` { #dh-p-remove }

: **Aliases:** `del`, `delete`, `rem`
: **Aliases:** `del`, `delete`, `rem`
**Permission:** `dh.command.pages.remove`

Remove a page from hologram.

Expand All @@ -84,7 +95,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh p removeaction <hologram> <page> <clickType> <index>` { #dh-p-removeaction }

: **Aliases:** `remaction`
: **Aliases:** `remaction`
**Permission:** `dh.command.pages.removeaction`

Removes an [Action](../actions.md) for `#!command <clickType>` from `#!command <page>`.

Expand All @@ -97,7 +109,9 @@ For a list of all available subcommands run the following command:

### `#!command /dh p swap <hologram> <page1> <page2>` { #dh-p-swap }

: Swaps `#!command <page1>` with `#!command <page2>`.
: **Permission:** `dh.command.pages.swap`

Swaps `#!command <page1>` with `#!command <page2>`.

- `#!command <hologram>` - Name of the hologram.
- `#!command <page1>` - Index of the first page.
Expand All @@ -107,7 +121,8 @@ For a list of all available subcommands run the following command:

### `#!command /dh p switch <hologram> <page> [player]` { #dh-p-switch }

: **Aliases:** `go`, `view`
: **Aliases:** `go`, `view`
**Permission:** `dh.command.pages.switch`

Switch to another page in a hologram.

Expand Down
Loading

0 comments on commit 64b2b3c

Please sign in to comment.