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 = Optional.empty(); private Optional ifNumberOfAccountsLessThan = Optional.empty(); /** * Default constructor (for bean mapping). */ public OnLoginCommand() { } /** * Creates a copy of this object, using the given command as new {@link Command#command command}. * * @param command the command text to use in the copy * @return copy of the source with the new command */ @Override public OnLoginCommand copyWithCommand(String command) { OnLoginCommand copy = new OnLoginCommand(); setValuesToCopyWithNewCommand(copy, command); copy.ifNumberOfAccountsAtLeast = this.ifNumberOfAccountsAtLeast; copy.ifNumberOfAccountsLessThan = this.ifNumberOfAccountsLessThan; return copy; } 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; } }