Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions content/docs/eternalcore/commands/disable-commands.mdx
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>

75 changes: 75 additions & 0 deletions content/docs/eternalcore/commands/edit-commands.mdx
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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

AlertBox used but not imported

The component is referenced without an import, which will break MDX compilation.

+import { AlertBox } from "../../../components/ui/alert-box";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

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
In content/docs/eternalcore/commands/edit-commands.mdx around lines 10 to 12,
the AlertBox component is used but not imported, causing MDX compilation to
fail. Add an import statement for AlertBox at the top of the file, importing it
from the correct module or component library where AlertBox is defined.


---

## 🗂️ 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.
8 changes: 8 additions & 0 deletions lib/sidebar-structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ export const docsStructure: DocItem[] = [
{ title: "Homes", path: "/docs/eternalcore/features/homes" },
],
},
{
title: "Commands",
path: "/docs/eternalcore/commands",
children: [
{ title: "Disable commands", path: "/docs/eternalcore/commands/disable-commands" },
{ title: "Edit commands", path: "/docs/eternalcore/commands/edit-commands" },
],
},
{ title: "FAQ", path: "/docs/eternalcore/faq" },
{ title: "Placeholders", path: "/docs/eternalcore/placeholders" },
{ title: "Developer API", path: "/docs/eternalcore/using-api" },
Expand Down