diff options
Diffstat (limited to 'src/ru/olamedia/olacraft/network/ConnectionState.java')
-rw-r--r-- | src/ru/olamedia/olacraft/network/ConnectionState.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ru/olamedia/olacraft/network/ConnectionState.java b/src/ru/olamedia/olacraft/network/ConnectionState.java new file mode 100644 index 0000000..2d6c5c5 --- /dev/null +++ b/src/ru/olamedia/olacraft/network/ConnectionState.java @@ -0,0 +1,17 @@ +package ru.olamedia.olacraft.network; + +public class ConnectionState { + private int state; + + public ConnectionState(int state) { + this.state = state; + } + + public static ConnectionState STATE_DISCONNECTED = new ConnectionState(0); + public static ConnectionState STATE_CONNECTED = new ConnectionState(1); + public static ConnectionState STATE_CONNECTING = new ConnectionState(2); + + public boolean isConnected() { + return state == 1; + } +} |