public void onAction(String name, boolean isPressed, float tpf) {

        if (isPressed) {
            if (name.equals(KeyMapper.SHOW_PLAYER_LIST)) {
                togglePlayerList(true);

            } else if (name.equals(KeyMapper.SHOW_CHAT)) {
                if (!chat) {
                    toggleChat(true);
                }

            } else if (name.equals(KeyMapper.HIDE_CHAT)) {
                if (chat) {
                    toggleChat(!chat);
                } else {
                    toggleMenu(!menu);
                }
            }
        } else {

            if (name.equals(KeyMapper.SHOW_PLAYER_LIST)) {
                togglePlayerList(false);
            }
        }

    }