package me.jesensky.dan.playertracker.net.packets;

import me.jesensky.dan.playertracker.UserViolationLevel;
import me.jesensky.dan.playertracker.exceptions.InvalidArgumentException;
import me.jesensky.dan.playertracker.exceptions.InvalidPacketException;
import me.jesensky.dan.playertracker.net.NetUtils;

public class DataResponsePacket extends Packet{
    public DataResponsePacket(byte... data) throws InvalidPacketException{
        super(PacketType.DATA_RESPONSE, data);
    }

    public String getName(){
        return NetUtils.bytesToString(super.getDataSection(0));
    }

    public String getNotes(){
        return NetUtils.bytesToString(super.getDataSection(1));
    }

    public String getViolations(){
        return NetUtils.bytesToString(super.getDataSection(2));
    }

    public UserViolationLevel getViolationLevel() throws InvalidPacketException{
        try {
            return UserViolationLevel.getViolationLevelFromByte(super.getDataSection(3)[0]);
        }catch(InvalidArgumentException e){
            throw new InvalidPacketException(e.getMessage());
        }
    }
}
@@ -300,16 +300,616 @@
 Utils;%0A%0A
+/**%0A * Represents a response to a data fetch packet.%3Cbr /%3E%0A * %3Cbr /%3E%0A * Contains, in specific order:%0A * %3Col%3E%0A *     %3Cli%3EPlayer name, with exact capitalization of the%0A *     name stored in the database,%3C/li%3E%0A *     %3Cli%3ENotes, if any,%3C/li%3E%0A *     %3Cli%3EInfractions, if any; and finally,%3C/li%3E%0A *     %3Cli%3EThe user's violation level.%3C/li%3E%0A * %3C/ol%3E%0A * %3Cbr /%3E%0A * For easier access, one may use methods to access these%0A * without using%0A * %7B@link me.jesensky.dan.playertracker.net.packets.Packet%7D's%0A * members.%0A *%0A * @see #getName()%0A * @see #getNotes()%0A * @see #getViolations()%0A * @see #getViolationLevel()%0A */%0A
 public c

Add some documentation for DataResponsePacket