diff --git a/content/docs/eternalcore/commands/disable-commands.mdx b/content/docs/eternalcore/commands/disable-commands.mdx new file mode 100644 index 00000000..045e4484 --- /dev/null +++ b/content/docs/eternalcore/commands/disable-commands.mdx @@ -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"; + + + You must **restart the server** after making any changes to this file. Reload is not enough. + + + +--- + +## 🗂️ 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 + + + A full list of EternalCore permissions and commands is available here: + https://www.eternalcode.pl/docs/eternalcore/features/permissions + + diff --git a/content/docs/eternalcore/commands/edit-commands.mdx b/content/docs/eternalcore/commands/edit-commands.mdx new file mode 100644 index 00000000..030e9b11 --- /dev/null +++ b/content/docs/eternalcore/commands/edit-commands.mdx @@ -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. + + + You must restart the server after making any changes to this file. Reload is not enough. + + +--- + +## 🗂️ 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. diff --git a/lib/sidebar-structure.ts b/lib/sidebar-structure.ts index d56d6ee0..741af35b 100644 --- a/lib/sidebar-structure.ts +++ b/lib/sidebar-structure.ts @@ -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" },