5
Making a Commands
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("test")) { // If the player typed /test then do the following...
// doSomething like this
sender.sendMessage(ChatColor.GREEN + "Plugin successfully worked");
return true;
} //If this has happened the function will return true.
// If this hasn't happened the value of false will be returned.
return false;
}
return true; == it process is already finish and don't do the codes below because the process is already finished
return false; == if you have a usage: at the config and you need to use the code if (args.length == 0) {
//return false;
then it will sends you the usage at the plugin.yml
}
Making a Plugin.yml
name: name of the plugin
author: the creator
version: the version must be a decimal like this : 1.0
commands:
give 3 spaces
test: //this is the command
another 3 spaces
description: hello this is a description
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("test")) { // If the player typed /test then do the following...
// doSomething like this
sender.sendMessage(ChatColor.GREEN + "Plugin successfully worked");
return true;
} //If this has happened the function will return true.
// If this hasn't happened the value of false will be returned.
return false;
}
return true; == it process is already finish and don't do the codes below because the process is already finished
return false; == if you have a usage: at the config and you need to use the code if (args.length == 0) {
//return false;
then it will sends you the usage at the plugin.yml
}
Making a Plugin.yml
name: name of the plugin
author: the creator
version: the version must be a decimal like this : 1.0
commands:
give 3 spaces
test: //this is the command
another 3 spaces
description: hello this is a description
Tags |
3359255
6
Create an account or sign in to comment.