X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2Fhighlevel%2FFcpClient.java;h=cdf438bcae97cfb97eff91702a00f33ae262b404;hb=a2c69d729e832ed4586152de86773fa32e698435;hp=f2a80a16470c6cd6e82acc4fd764952866cd1fbc;hpb=05f8ace221f203a9b100b0ce557e06b2d90ae121;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/net/pterodactylus/fcp/highlevel/FcpClient.java index f2a80a1..cdf438b 100644 --- a/src/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -168,6 +168,7 @@ public class FcpClient { @Override @SuppressWarnings("synthetic-access") public void connectionClosed(FcpConnection fcpConnection, Throwable throwable) { + connected = false; fcpClientListenerManager.fireFcpClientDisconnected(); } }); @@ -178,6 +179,26 @@ public class FcpClient { // /** + * Adds an FCP listener to the underlying connection. + * + * @param fcpListener + * The FCP listener to add + */ + public void addFcpListener(FcpListener fcpListener) { + fcpConnection.addFcpListener(fcpListener); + } + + /** + * Removes an FCP listener from the underlying connection. + * + * @param fcpListener + * The FCP listener to remove + */ + public void removeFcpListener(FcpListener fcpListener) { + fcpConnection.removeFcpListener(fcpListener); + } + + /** * Adds an FCP client listener to the list of registered listeners. * * @param fcpClientListener