![JAR search and dependency download from the Maven repository](/logo.png)
org.pircbotx.hooks.events.MotdEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pircbotx Show documentation
Show all versions of pircbotx Show documentation
PircBotX is a simple, easy to use, Java IRC Bot Framework based
off of a fork of the popular PircBot? framework, bringing many new up-to-date
features and bug fixes in an official alternative distribution.
The newest version!
// Generated by delombok at Sun Jan 24 05:06:42 EST 2016
/**
* Copyright (C) 2010-2014 Leon Blakey
*
* This file is part of PircBotX.
*
* PircBotX is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* PircBotX is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* PircBotX. If not, see .
*/
package org.pircbotx.hooks.events;
import javax.annotation.Nullable;
import lombok.NonNull;
import org.pircbotx.hooks.Event;
import org.pircbotx.PircBotX;
/**
* This event is dispatched when the Motd is finished being sent. Motd lines are
* separated by \n
*
* @author Leon Blakey
*/
public class MotdEvent extends Event {
/**
* The full motd separated by newlines (\n
)
*/
protected final String motd;
public MotdEvent(PircBotX bot, @NonNull String motd) {
super(bot);
if (motd == null) {
throw new java.lang.NullPointerException("motd");
}
this.motd = motd;
}
/**
* Responds by sending a raw line to the server.
*
* @param response The response to send
*/
@Override
public void respond(String response) {
getBot().sendRaw().rawLine(response);
}
/**
* The full motd separated by newlines (\n
)
*/
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getMotd() {
return this.motd;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "MotdEvent(motd=" + this.getMotd() + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof MotdEvent)) return false;
final MotdEvent other = (MotdEvent)o;
if (!other.canEqual((java.lang.Object)this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$motd = this.getMotd();
final java.lang.Object other$motd = other.getMotd();
if (this$motd == null ? other$motd != null : !this$motd.equals(other$motd)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof MotdEvent;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + super.hashCode();
final java.lang.Object $motd = this.getMotd();
result = result * PRIME + ($motd == null ? 43 : $motd.hashCode());
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy