package fr.xephi.authme.settings.commandconfig; import java.util.Optional; /** * Configurable command for when a player logs in. */ public class OnLoginCommand extends Command { private Optional ifNumberOfAccountsAtLeast; private Optional ifNumberOfAccountsLessThan; /** * Default constructor (for bean mapping). */ public OnLoginCommand() { } /** * Constructor. * * @param command the command to execute * @param executor the executor of the command */ public OnLoginCommand(String command, Executor executor) { super(command, executor); } /** * Constructor. * * @param command the command to execute * @param executor the executor of the command * @param ifNumberOfAccountsAtLeast required number of accounts for the command to run * @param ifNumberOfAccountsLessThan max threshold of accounts, from which the command will not be run */ public OnLoginCommand(String command, Executor executor, Optional ifNumberOfAccountsAtLeast, Optional ifNumberOfAccountsLessThan) { super(command, executor); this.ifNumberOfAccountsAtLeast = ifNumberOfAccountsAtLeast; this.ifNumberOfAccountsLessThan = ifNumberOfAccountsLessThan; } public Optional getIfNumberOfAccountsAtLeast() { return ifNumberOfAccountsAtLeast; } public void setIfNumberOfAccountsAtLeast(Optional ifNumberOfAccountsAtLeast) { this.ifNumberOfAccountsAtLeast = ifNumberOfAccountsAtLeast; } public Optional getIfNumberOfAccountsLessThan() { return ifNumberOfAccountsLessThan; } public void setIfNumberOfAccountsLessThan(Optional ifNumberOfAccountsLessThan) { this.ifNumberOfAccountsLessThan = ifNumberOfAccountsLessThan; } }