Skip to content

Commit 5c383e6

Browse files
committed
Version 1.0.4
- Let PacketClient also allow to be disconnected
1 parent 9306b55 commit 5c383e6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>de.scriptsdk</groupId>
77
<artifactId>core</artifactId>
8-
<version>1.0.3</version>
8+
<version>1.0.4</version>
99
<name>core</name>
1010

1111
<properties>

src/main/java/de/scriptsdk/core/model/network/PacketClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ public Boolean connect() {
198198
return true;
199199
}
200200

201+
public Boolean disconnect() {
202+
if (client.isConnected()) {
203+
return client.disconnect();
204+
}
205+
return true;
206+
}
207+
201208
private void validateClient() {
202209
if (this.port == 0) {
203210
throw new PacketClientException("Client cannot communicate to port 0!");

0 commit comments

Comments
 (0)