func (c *Client) User() *core.User {
	return c.user
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Client ATTRIBUTE READERS   ///////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
User gets the *User of the Client.
package actions
import (
	"errors"
	"github.com/gorilla/websocket"
	"github.com/hewiefreeman/GopherGameServer/core"
	"github.com/hewiefreeman/GopherGameServer/helpers"
)
type CustomClientAction struct {
	dataType int
	callback func(interface{}, *Client)
}
type Client struct {
	action string
	user   *core.User
	connID string
	socket *websocket.Conn
	responded bool
}
type ClientError struct {
	message string
	id      int
}
var (
	customClientActions map[string]CustomClientAction = make(map[string]CustomClientAction)
	serverStarted = false
	serverPaused  = false
)
const (
	ErrorMismatchedTypes    = iota + 1001  
	ErrorUnrecognizedAction                
)
const (
	DataTypeBool   = iota  
	DataTypeInt            
	DataTypeFloat          
	DataTypeString         
	DataTypeArray          
	DataTypeMap            
	DataTypeNil            
)
func New(actionType string, dataType int, callback func(interface{}, *Client)) error {
	if serverStarted {
		return errors.New("Cannot make a new CustomClientAction once the server has started")
	}
	customClientActions[actionType] = CustomClientAction{
		dataType: dataType,
		callback: callback,
	}
	return nil
}
func NewError(message string, id int) ClientError {
	return ClientError{message: message, id: id}
}
func NoError() ClientError {
	return ClientError{id: -1}
}
func HandleCustomClientAction(action string, data interface{}, user *core.User, conn *websocket.Conn, connID string) {
	client := Client{user: user, action: action, socket: conn, connID: connID, responded: false}
	if customAction, ok := customClientActions[action]; ok {
		if !typesMatch(data, customAction.dataType) {
			client.Respond(nil, NewError("Mismatched data type", ErrorMismatchedTypes))
			return
		}
		customAction.callback(data, &client)
	} else {
		client.Respond(nil, NewError("Unrecognized action", ErrorUnrecognizedAction))
	}
}
func typesMatch(data interface{}, theType int) bool {
	switch data.(type) {
	case bool:
		if theType == DataTypeBool {
			return true
		}
	case int:
		if theType == DataTypeInt {
			return true
		}
	case int32:
		if theType == DataTypeInt {
			return true
		}
	case int64:
		if theType == DataTypeInt {
			return true
		}
	case float32:
		if theType == DataTypeFloat {
			return true
		}
	case float64:
		if theType == DataTypeFloat {
			return true
		}
	case string:
		if theType == DataTypeString {
			return true
		}
	case []interface{}:
		if theType == DataTypeArray {
			return true
		}
	case map[string]interface{}:
		if theType == DataTypeMap {
			return true
		}
	case nil:
		if theType == DataTypeNil {
			return true
		}
	}
	return false
}
func (c *Client) Respond(response interface{}, err ClientError) {
	if (*c).responded {
		return
	}
	(*c).responded = true
	r := map[string]map[string]interface{}{
		helpers.ServerActionCustomClientActionResponse: {
			"a": (*c).action,
		},
	}
	if err.id != -1 {
		r[helpers.ServerActionCustomClientActionResponse]["e"] = map[string]interface{}{
			"m":  err.message,
			"id": err.id,
		}
	} else {
		r[helpers.ServerActionCustomClientActionResponse]["r"] = response
	}
	(*c).socket.WriteJSON(r)
}