diff --git a/pom.xml b/pom.xml
index 0b666a65..4c27a824 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,6 +87,30 @@
maven-jar-plugin
2.6
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
org.apache.maven.plugins
maven-shade-plugin
diff --git a/src/main/java/org/spacehq/packetlib/Server.java b/src/main/java/org/spacehq/packetlib/Server.java
index cde9f5b8..ff27f752 100644
--- a/src/main/java/org/spacehq/packetlib/Server.java
+++ b/src/main/java/org/spacehq/packetlib/Server.java
@@ -135,6 +135,7 @@ public class Server {
* session belongs to a server, the server's flags will be checked for the flag
* as well.
*
+ * @param Type of the flag.
* @param key Key of the flag.
* @return Value of the flag.
* @throws IllegalStateException If the flag's value isn't of the required type.
diff --git a/src/main/java/org/spacehq/packetlib/Session.java b/src/main/java/org/spacehq/packetlib/Session.java
index 600b4eea..215a0fb6 100644
--- a/src/main/java/org/spacehq/packetlib/Session.java
+++ b/src/main/java/org/spacehq/packetlib/Session.java
@@ -67,6 +67,7 @@ public interface Session {
* session belongs to a server, the server's flags will be checked for the flag
* as well.
*
+ * @param Type of the flag.
* @param key Key of the flag.
* @return Value of the flag.
* @throws IllegalStateException If the flag's value isn't of the required type.
diff --git a/src/main/java/org/spacehq/packetlib/crypt/PacketEncryption.java b/src/main/java/org/spacehq/packetlib/crypt/PacketEncryption.java
index 838cf227..0e5f949f 100644
--- a/src/main/java/org/spacehq/packetlib/crypt/PacketEncryption.java
+++ b/src/main/java/org/spacehq/packetlib/crypt/PacketEncryption.java
@@ -8,6 +8,7 @@ public interface PacketEncryption {
* Gets the output size from decrypting.
*
* @param length Length of the data being decrypted.
+ * @return The output size from decrypting.
*/
public int getDecryptOutputSize(int length);
@@ -15,6 +16,7 @@ public interface PacketEncryption {
* Gets the output size from encrypting.
*
* @param length Length of the data being encrypted.
+ * @return The output size from encrypting.
*/
public int getEncryptOutputSize(int length);
@@ -27,6 +29,7 @@ public interface PacketEncryption {
* @param output Array to output decrypted data to.
* @param outputOffset Offset of the output array to start at.
* @return The number of bytes stored in the output array.
+ * @throws Exception If an error occurs.
*/
public int decrypt(byte input[], int inputOffset, int inputLength, byte output[], int outputOffset) throws Exception;
@@ -39,6 +42,7 @@ public interface PacketEncryption {
* @param output Array to output encrypted data to.
* @param outputOffset Offset of the output array to start at.
* @return The number of bytes stored in the output array.
+ * @throws Exception If an error occurs.
*/
public int encrypt(byte input[], int inputOffset, int inputLength, byte output[], int outputOffset) throws Exception;
}
diff --git a/src/main/java/org/spacehq/packetlib/event/session/PacketReceivedEvent.java b/src/main/java/org/spacehq/packetlib/event/session/PacketReceivedEvent.java
index 4f945123..db43b86e 100644
--- a/src/main/java/org/spacehq/packetlib/event/session/PacketReceivedEvent.java
+++ b/src/main/java/org/spacehq/packetlib/event/session/PacketReceivedEvent.java
@@ -33,6 +33,7 @@ public class PacketReceivedEvent implements SessionEvent {
/**
* Gets the packet involved in this event as the required type.
*
+ * @param Type of the packet.
* @return The event's packet as the required type.
* @throws IllegalStateException If the packet's value isn't of the required type.
*/
diff --git a/src/main/java/org/spacehq/packetlib/event/session/PacketSentEvent.java b/src/main/java/org/spacehq/packetlib/event/session/PacketSentEvent.java
index f9815ebb..765c387e 100644
--- a/src/main/java/org/spacehq/packetlib/event/session/PacketSentEvent.java
+++ b/src/main/java/org/spacehq/packetlib/event/session/PacketSentEvent.java
@@ -33,6 +33,7 @@ public class PacketSentEvent implements SessionEvent {
/**
* Gets the packet involved in this event as the required type.
*
+ * @param Type of the packet.
* @return The event's packet as the required type.
* @throws IllegalStateException If the packet's value isn't of the required type.
*/
diff --git a/src/main/java/org/spacehq/packetlib/io/NetInput.java b/src/main/java/org/spacehq/packetlib/io/NetInput.java
index 320b21ac..fbc42327 100644
--- a/src/main/java/org/spacehq/packetlib/io/NetInput.java
+++ b/src/main/java/org/spacehq/packetlib/io/NetInput.java
@@ -239,6 +239,7 @@ public interface NetInput {
* Gets the number of available bytes.
*
* @return The number of available bytes.
+ * @throws java.io.IOException If an I/O error occurs.
*/
public int available() throws IOException;
}
diff --git a/src/main/java/org/spacehq/packetlib/io/NetOutput.java b/src/main/java/org/spacehq/packetlib/io/NetOutput.java
index f30a60d0..7e6b3dda 100644
--- a/src/main/java/org/spacehq/packetlib/io/NetOutput.java
+++ b/src/main/java/org/spacehq/packetlib/io/NetOutput.java
@@ -50,7 +50,7 @@ public interface NetOutput {
/**
* Writes a varint. A varint is a form of integer where only necessary bytes are written. This is done to save bandwidth.
*
- * @return i Varint to write.
+ * @param i Varint to write.
* @throws java.io.IOException If an I/O error occurs.
*/
public void writeVarInt(int i) throws IOException;
@@ -66,7 +66,7 @@ public interface NetOutput {
/**
* Writes a varlong. A varlong is a form of long where only necessary bytes are written. This is done to save bandwidth.
*
- * @return l Varlong to write.
+ * @param l Varlong to write.
* @throws java.io.IOException If an I/O error occurs.
*/
public void writeVarLong(long l) throws IOException;
diff --git a/src/main/java/org/spacehq/packetlib/packet/Packet.java b/src/main/java/org/spacehq/packetlib/packet/Packet.java
index a36d9a22..baf51cb4 100644
--- a/src/main/java/org/spacehq/packetlib/packet/Packet.java
+++ b/src/main/java/org/spacehq/packetlib/packet/Packet.java
@@ -13,6 +13,7 @@ public interface Packet {
* Reads the packet from the given input buffer.
*
* @param in The input source to read from.
+ * @throws IOException If an I/O error occurs.
*/
public void read(NetInput in) throws IOException;
@@ -20,6 +21,7 @@ public interface Packet {
* Writes the packet to the given output buffer.
*
* @param out The output destination to write to.
+ * @throws IOException If an I/O error occurs.
*/
public void write(NetOutput out) throws IOException;