-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add edit commands docs #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| title: Disabling Commands | ||
| description: Learn how to disable specific commands in EternalCore or other EternalCode plugins using the `commands.yml` file. | ||
| --- | ||
|
|
||
| ## ❌ Disable Commands in EternalCore | ||
|
|
||
| EternalCore (and most EternalCode plugins) allows you to disable specific commands using the `commands.yml` configuration file. | ||
|
|
||
| import { AlertBox } from "../../../components/ui/alert-box"; | ||
|
|
||
| <AlertBox type="important"> | ||
| You must **restart the server** after making any changes to this file. Reload is not enough. | ||
| </AlertBox> | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| ## 🗂️ Location of the file | ||
|
|
||
| ```text | ||
| /plugins/EternalCore/commands.yml | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🚫 How to disable a command | ||
|
|
||
| To disable a specific command — for example, `/rtp` — you need to add a section like this in `commands.yml`: | ||
|
|
||
| ```yaml | ||
| rtp: | ||
| name: [] | ||
| enabled: false | ||
| aliases: [] | ||
| permissions: [] | ||
| subCommands: [] | ||
| ``` | ||
|
|
||
| 📌 In this case, `rtp` is the **original command name**, not an alias. | ||
|
|
||
| --- | ||
|
|
||
| ## ⚠️ Warnings and Tips | ||
|
|
||
| * ❗ **Do not use an alias.** You must use the original command name exactly as it is defined by the plugin. | ||
| * 🔁 Changes require a **server restart** to take effect. | ||
| * ✅ You can safely disable *any* built-in command if you want to replace it with your own or just remove access. | ||
|
|
||
| --- | ||
|
|
||
| ## 📄 Find all available commands | ||
|
|
||
| <AlertBox type="info"> | ||
| A full list of EternalCore permissions and commands is available here: | ||
| https://www.eternalcode.pl/docs/eternalcore/features/permissions | ||
| </AlertBox> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| --- | ||
| title: Edit Commands | ||
| description: Learn how to rename commands, change aliases and permissions, and customize subcommands in EternalCore using commands.yml. | ||
| --- | ||
|
|
||
| ## ✏️ Edit Commands in EternalCore | ||
|
|
||
| EternalCore allows you to fully customize command names, aliases, permissions, and subcommands through the `commands.yml` file. | ||
|
|
||
| <AlertBox type="important"> | ||
| You must <strong>restart the server</strong> after making any changes to this file. Reload is not enough. | ||
| </AlertBox> | ||
|
Comment on lines
+10
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The component is referenced without an import, which will break MDX compilation. +import { AlertBox } from "../../../components/ui/alert-box";📝 Committable suggestion
Suggested change
<AlertBox type="important">
You must <strong>restart the server</strong> after making any changes to this file. Reload is not enough.
</AlertBox>
import { AlertBox } from "../../../components/ui/alert-box";
<AlertBox type="important">
You must <strong>restart the server</strong> after making any changes to this file. Reload is not enough.
</AlertBox>
🤖 Prompt for AI Agents |
||
|
|
||
| --- | ||
|
|
||
| ## 🗂️ Location of the file | ||
|
|
||
| ```text | ||
| /plugins/EternalCore/commands.yml | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🧩 What can be changed? | ||
|
|
||
| You can modify: | ||
|
|
||
| * Command name (e.g. `/eternalcore` → `/eternal-core`) | ||
| * Aliases (e.g. `/ec`, `/eternal`) | ||
| * Required permissions | ||
| * Subcommands (name, aliases, permissions, or disable entirely) | ||
|
|
||
| --- | ||
|
|
||
| ## 🔧 Example configuration | ||
|
|
||
| ```yaml | ||
| commands: | ||
| eternalcore: | ||
| name: "eternal-core" # this is the new main command name | ||
| enabled: true | ||
| aliases: | ||
| - "eternal" # list of new aliases for the main command | ||
| permissions: | ||
| - "eternalcore.eternalcore" # permission required to use the main command | ||
| subCommands: | ||
| reload: # this must match the name of the subcommand you want to edit | ||
| name: "reload" # this is the new subcommand name (keep the same if unchanged) | ||
| enabled: true | ||
| aliases: | ||
| - "rl" # list of new aliases for the subcommand | ||
| permissions: | ||
| - "eternalcore.reload" # permission required to use the subcommand | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## ✅ Result of this configuration | ||
|
|
||
| * `/eternalcore` becomes `/eternal-core` | ||
| * New alias `/eternal` is added | ||
| * The `/eternal-core reload` command can now also be run using `/eternal-core rl` | ||
| * Both commands require custom permissions | ||
|
|
||
| --- | ||
|
|
||
| ## 🛑 Disable a subcommand (optional) | ||
|
|
||
| You can also disable a specific subcommand by setting: | ||
|
|
||
| ```yaml | ||
| enabled: false | ||
| ``` | ||
|
|
||
| inside the subcommand section. | ||