-
-
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
Open
vLuckyyy
wants to merge
2
commits into
master
Choose a base branch
from
add-edit-commands-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
||
--- | ||
|
||
## 🗂️ 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AlertBox
used but not importedThe component is referenced without an import, which will break MDX compilation.
+import { AlertBox } from "../../../components/ui/alert-box";
📝 Committable suggestion
🤖 Prompt for AI Agents