Skip to content

Commit

Permalink
Merge branch 'HelpChat:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristopher committed Jan 22, 2024
2 parents 7252a3f + eeb7594 commit 840436c
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 6 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
* [GUI](clips-plugins/deluxemenus/options-and-configurations/gui.md)
* [Item](clips-plugins/deluxemenus/options-and-configurations/item.md)
* [Requirements](clips-plugins/deluxemenus/options-and-configurations/requirements.md)
* [Command Registration](clips-plugins/deluxemenus/options-and-configurations/command-registration.md)
* [External menus](clips-plugins/deluxemenus/external-menus.md)
* [Example GUI menus](clips-plugins/deluxemenus/example-gui-menus.md)
* [Plugin's files](clips-plugins/deluxemenus/files.md)
Expand Down
1 change: 1 addition & 0 deletions clips-plugins/deluxemenus/commands-and-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ description: List of commands and permissions for the plugin
| /dm list | deluxemenus.list | Lists loaded menus. |
| /dm execute \<player> \<action> | Player needs to be Op | Executes any action for a player. Check out the [Action Type](https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations#actions-types) for more info. |
| /dm dump \<menu-name> | deluxemenus.admin | Create a paste bin with the menu and also some other important debugging stuff like server version and java version. |
| /dm dump config | deluxemenus.admin | Create a paste bin with the config.yml and some other important debugging stuff such as server version and java version |
| /dm reload | deluxemenus.reload | Reloads the plugin's files. |
| /dm reload \<menu> | deluxemenus.reload | Reload a menu. |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ If you want to use RGB/Hex colors in DeluxeMenus on 1.16+ you can use the follow
There is one available placeholder from DeluxeMenus:

* `%deluxemenus_meta_<key>_<dataType>_<default_value>%`
* `%deluxemenus_meta_has_value_<key>_<dataType>%`

## General options

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
description: More information about registering menu commands
---

# Command Registration

How to register a command?

Each menu can have 2 options:

### [open\_command](gui.md#open-command)

This is used to specify a list of commands that can be used to open the menu.

{% hint style="danger" %}
Note that by using this option alone, you will get no tab completion and other plugins will override this command
{% endhint %}

### [register\_command](gui.md#register-command)

This accepts a boolean value (true or false). If the value is set to true, then on every server restart, DeluxeMenus will make an effort to register the command with the server. This should provide tab completion.

## I have another plugin that registers the same command. What can I do?

When a command is registered with the server, an alias is provided: `/deluxemenus:<menu-command>`.

To better explain this, let's take an example:

&#x20;We have a menu named `randomteleportmenu` with `open_command: "rtp"` and `register_command: true`. We'll consider that the server was restarted since the menu was created so the command was registered.\
We are also using a RandomTeleport plugin that also registers the `/rtp` command.

&#x20;Now when we execute `/rtp`, we get randomly teleported instead of having our menu open.

How do we fix this?\
We could use `/deluxemenus:rtp` to open the menu, but we don't want our players to use prefixed commands as they are too long.\


The solution is to use the [commands.yml](https://bukkit.fandom.com/wiki/Commands.yml) file provided by our server. We can find the file in the server's root directory where we find the the server jar file and the eula.txt file. If you've never modified the file, it will look something like this by default:

```yaml
command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:
- version $1-
```
Now, we modify the file like this:
```yaml
command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:
- version $1-
rtp:
- deluxemenus:rtp $1-
```
Save, restart the server and you're all done!
{% hint style="danger" %}
Make sure to save the changes and restart the server if you want the changes to properly apply!
{% endhint %}
{% hint style="success" %}
If you want to read more about the commands.yml file, you can do so here: [https://bukkit.fandom.com/wiki/Commands.yml](https://bukkit.fandom.com/wiki/Commands.yml)
{% endhint %}
21 changes: 15 additions & 6 deletions clips-plugins/deluxemenus/options-and-configurations/item.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ Each item will have a name, in this example our item is called **`ItemName`.** T
> >
> > * [Material name](./#useful-links) (`STONE`).
> > * Player head (`head-extended_clip`).
> > * Placeholder head (`head-%player_name%`).
> > * Placeholder head (`head-%player_name%`, `basehead-%player_basehead_placeholder%`, etc.).
> > * Argument placeholder head (`head-{target}`).
> > * [BaseHead](https://minecraft-heads.com) (`basehead-<base64 (Value field in the head's give command)>`).
> > * Minecraft Texture (`texture-<id>`)\
> > \- The `id` is what's after `https://textures.minecraft.net/textures/`
> > * [HeadDatabase](https://www.spigotmc.org/resources/14280/) (`hdb-<ID>`).
> > * [ItemsAdder](https://www.spigotmc.org/resources/%E2%9C%A8itemsadder%E2%AD%90emotes-mobs-items-armors-hud-gui-emojis-blocks-wings-hats-liquids.73355/) material (`itemsadder-namespace:name`)
> > * [Oraxen](https://www.spigotmc.org/resources/72448/) material (`oraxen-oraxen_item_id`)
> > * [Placeholder](https://helpch.at/placeholders) material (`placeholder-%player_item_in_hand%`).
> > * Item in main hand (`main_hand`).
> > * Item in off hand (`off_hand`).
Expand All @@ -43,10 +44,14 @@ Each item will have a name, in this example our item is called **`ItemName`.** T
Sets the material of the item in the menu.
{% hint style="success" %}
Now supports AIR as a valid material. The item will be an empty slot with just click commands and click requirements.
AIR is a valid material. The item will be an empty slot with click commands and click requirements working.
{% endhint %}
{% hint style="info" %}
{% hint style="success" %}
Placeholders are supported for head, basehead, texture, hdb, itemsadder, oraxen and placeholder materials!
{% endhint %}
{% hint style="warning" %}
For version 1.12.2 or older:\
Check [Data](item.md#data) option to specify the data of the item (the number after the colon `:`). e.g. Lime Wool would be
Expand Down Expand Up @@ -173,8 +178,8 @@ Allows you to set item flags.
Allows you to set effects (Used if the [material](item.md#material) is a potion, splash\_potion and tipped arrows).
{% hint style="info" %}
For potion\_effects to work on potions and tipped arrows you also need to give it an [RGB](item.md#rgb) value.
{% hint style="success" %}
Potion Effects no longer require the [RGB](item.md#rgb) option to be set to work!
{% endhint %}
## Entity Type
Expand All @@ -185,7 +190,11 @@ For potion\_effects to work on potions and tipped arrows you also need to give i
>
> > * [Entity types list.](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html)
This is mainly targeted for 1.12.2 and lower servers and allows you to specify monster egg types and also monster spawner types.
This is mainly targeted for 1.12.2 and lower server versions and allows you to specify monster egg types and monster spawner types.
{% hint style="danger" %}
Option was removed in versions 1.14.0 and newer of the plugin due to versions 1.13.1 and lower of Minecraft no longer being supported.
{% endhint %}
## RGB <a href="#rgb" id="rgb"></a>
Expand Down

0 comments on commit 840436c

Please sign in to comment.