X-Git-Url: https://git.pterodactylus.net/?p=xudocci.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Firc%2Fevent%2FPrivateNoticeReceived.java;h=4089fcbf21dfa5499dcc9d880a89056ee65ebd10;hp=afb6acc3abc978607aaff003f93dae3c51b54a60;hb=b6505c4d0f4fbc2bf19cc8b6030062bca6d180dd;hpb=cf167d26b5f37ffcf544645e5f3d0182995f8f8a diff --git a/src/main/java/net/pterodactylus/irc/event/PrivateNoticeReceived.java b/src/main/java/net/pterodactylus/irc/event/PrivateNoticeReceived.java index afb6acc..4089fcb 100644 --- a/src/main/java/net/pterodactylus/irc/event/PrivateNoticeReceived.java +++ b/src/main/java/net/pterodactylus/irc/event/PrivateNoticeReceived.java @@ -18,53 +18,28 @@ package net.pterodactylus.irc.event; import net.pterodactylus.irc.Connection; -import net.pterodactylus.irc.Reply; +import net.pterodactylus.irc.Source; /** * Notifies a listener that a notice was received. * * @author David ‘Bombe’ Roden */ -public class PrivateNoticeReceived extends AbstractReplyEvent { +public class PrivateNoticeReceived extends AbstractConnectionEvent { - /** The target of the notice. */ - private final String target; - - /** The text of the notice. */ + private final Source source; private final String text; - /** - * Creates a new notice received event. - * - * @param connection - * The connection the event occured on - * @param reply - * The reply that caused the event - */ - public PrivateNoticeReceived(Connection connection, Reply reply) { - super(connection, reply); - this.target = reply.parameters().get(0); - this.text = reply.parameters().get(1); + public PrivateNoticeReceived(Connection connection, Source source, String text) { + super(connection); + this.source = source; + this.text = text; } - // - // ACCESSORS - // - - /** - * Returns the target of the notice. - * - * @return The target of the notice - */ - public String target() { - return target; + public Source source() { + return source; } - /** - * Returns the text of the notice. - * - * @return The text of the notice - */ public String text() { return text; }