2019-01-19 16:52:04 +01:00
|
|
|
package world.bentobox.greenhouses.ui.user;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
|
|
|
import world.bentobox.bentobox.api.user.User;
|
2019-01-22 00:44:01 +01:00
|
|
|
import world.bentobox.greenhouses.Greenhouses;
|
2019-01-19 16:52:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author tastybento
|
|
|
|
*
|
|
|
|
*/
|
2019-01-22 00:44:01 +01:00
|
|
|
public class UserCommand extends CompositeCommand {
|
2019-01-19 16:52:04 +01:00
|
|
|
|
|
|
|
/**
|
2019-01-26 17:38:13 +01:00
|
|
|
* @param gh - addon
|
|
|
|
* @param parent - parent command
|
2019-01-19 16:52:04 +01:00
|
|
|
*/
|
2019-01-22 00:44:01 +01:00
|
|
|
public UserCommand(Greenhouses gh, CompositeCommand parent) {
|
|
|
|
super(gh, parent, "greenhouse", "gh");
|
2019-01-19 16:52:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see world.bentobox.bentobox.api.commands.BentoBoxCommand#setup()
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public void setup() {
|
2019-01-26 20:10:30 +01:00
|
|
|
this.setPermission("greenhouses.player");
|
2019-01-19 16:52:04 +01:00
|
|
|
this.setOnlyPlayer(true);
|
|
|
|
this.setParametersHelp("greenhouses.command.parameters");
|
|
|
|
this.setDescription("greenhouses.command.description");
|
|
|
|
|
2019-01-22 00:44:01 +01:00
|
|
|
//new InfoCommand(this);
|
|
|
|
//new ListCommand(this);
|
2019-01-19 16:52:04 +01:00
|
|
|
new MakeCommand(this);
|
2019-01-22 00:44:01 +01:00
|
|
|
//new RecipeCommand(this);
|
2019-01-26 20:10:30 +01:00
|
|
|
new RemoveCommand(this);
|
2019-01-19 16:52:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see world.bentobox.bentobox.api.commands.BentoBoxCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public boolean execute(User user, String label, List<String> args) {
|
2019-01-22 00:44:01 +01:00
|
|
|
this.showHelp(this, user);
|
|
|
|
return true;
|
2019-01-19 16:52:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|