CustomCommandsAPIV2 Plugin Documentation
Introduction
CustomCommandsAPIV2 is a plugin for Minecraft servers that allows administrators to create custom commands easily, providing a way to personalize the server experience. The plugin simplifies the process of setting up commands that trigger specific actions without the need for complex coding or configuration. This documentation provides an overview of how to use the plugin, focusing on the /setcustcommand command.
Features
- Create custom commands to perform server actions.
- Easy setup of commands without the need for code.
- Enhance player interaction by creating personalized experiences.
- Flexible system for server administrators to define commands as needed.
Command Overview
/setcustcommand
The /setcustcommand command is used to create custom commands that can perform specific actions when triggered. It is a simple command with no parameters that allows administrators to easily define new commands.
Syntax:
bash
/setcustcommand <command_name>
- <command_name>: The name of the custom command you wish to create. Once set, this custom command can be triggered by players on the server.
Example Usage:
- Creating a Command:
bash
/setcustcommand hello
This command creates a new custom command named "hello". Once created, you can configure this command to perform specific actions (e.g., sending messages or performing teleportations).
- Customizing the Command: After setting the custom command, the next step is to define what action or behavior the command should trigger. This step may involve editing the configuration file or using additional plugin interfaces, depending on the capabilities of CustomCommandsAPIV2.
- Triggering the Custom Command: Once the custom command is created, any player with the required permissions can execute the command by typing /hello in the chat. The actions linked to the command will then be performed.
Advanced Usage
Command Actions
While the basic /setcustcommand command creates a custom command, you will likely want to configure the action associated with that command.
CustomCommandsAPIV2 allows you to specify actions such as:
- Sending a message: Display a custom message to the player or the server.
- Teleportation: Teleport players to specific coordinates or to other players.
- Running server commands: Execute any predefined server command as part of the custom command.
Configuration may be done either via in-game interfaces, command blocks, or by directly editing the plugin’s configuration files. The exact method of linking actions to custom commands may vary based on the plugin version.
Permissions
To ensure that only authorized users can create or use custom commands,
CustomCommandsAPIV2 typically integrates with your server's permission system (e.g.,
PermissionsEx,
LuckPerms).
- Permission to create custom commands: Only admins or users with specific permissions should be able to run /setcustcommand to avoid abuse.
- Permission to use custom commands: Similarly, you can restrict who can use specific custom commands by adjusting permissions for each one.
Configuration File Example
The plugin may create or use a configuration file to store custom commands and their associated actions. Here's a basic example of what the configuration file might look like:
yaml
commands:
hello:
action: "sendmessage Hello, %player%!"
greet:
action: "sendmessage Welcome to the server, %player%!"
In this example:
- The /hello command sends a message saying "Hello, [player name]!".
- The /greet command sends a welcome message.
Troubleshooting
- Command not working: Ensure the command was properly set up using /setcustcommand <command_name>. Check the configuration file for the correct action associated with the command.
- Permissions issue: Verify that the player has the correct permissions to use or create custom commands.
- Server errors: Check the server console or logs for any error messages related to the plugin. It’s possible that there’s an issue with the plugin installation or configuration.
FAQ
Q: Can I use custom commands without a permissions plugin?
- Yes, but for better control and security, it’s recommended to use a permissions plugin to restrict access to custom commands.
Q: How can I edit the action associated with a custom command?
- This can be done either through the plugin’s configuration file or a plugin-specific interface that allows you to link actions to custom commands.
Q: Can custom commands be used in command blocks?
- Yes, once set up, custom commands can be executed in command blocks, allowing for more advanced server functionality.
Conclusion
CustomCommandsAPIV2 is a powerful tool for Minecraft server administrators who want to streamline and personalize the server experience. By using the /setcustcommand command, you can quickly create custom commands that improve interactivity and control within your server. Whether you're sending messages, teleporting players, or executing server actions, this plugin offers an easy and flexible way to enhance your server's functionality.