project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/MessageLog.java
author Wuzzy <almikes@aol.com>
Fri, 28 Apr 2017 02:45:19 +0200
changeset 12377 35e76306b016
parent 10017 de822cd3df3a
permissions -rw-r--r--
ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7584
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     1
/*
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     2
 * Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     3
 * Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     4
 *
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     5
 * This program is free software; you can redistribute it and/or
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     6
 * modify it under the terms of the GNU General Public License
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     7
 * as published by the Free Software Foundation; either version 2
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     8
 * of the License, or (at your option) any later version.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     9
 *
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    13
 * GNU General Public License for more details.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    14
 *
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    15
 * You should have received a copy of the GNU General Public License
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    16
 * along with this program; if not, write to the Free Software
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    18
 */
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    19
7332
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    20
package org.hedgewars.hedgeroid.netplay;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    21
7346
b0f67c5b4215 Hedgeroid: Lobby activity improvements
Medo <smaxein@googlemail.com>
parents: 7332
diff changeset
    22
import java.util.Collection;
b0f67c5b4215 Hedgeroid: Lobby activity improvements
Medo <smaxein@googlemail.com>
parents: 7332
diff changeset
    23
import java.util.Collections;
7332
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    24
import java.util.Date;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    25
import java.util.LinkedList;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    26
import java.util.List;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    27
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    28
import org.hedgewars.hedgeroid.R;
7476
2fb781bbdd51 Hedgeroid: Start using the frontlib for more operations
Medo <smaxein@googlemail.com>
parents: 7444
diff changeset
    29
import org.hedgewars.hedgeroid.frontlib.Frontlib;
7332
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    30
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    31
import android.content.Context;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    32
import android.graphics.Color;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    33
import android.graphics.Typeface;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    34
import android.text.Html;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    35
import android.text.Spannable;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    36
import android.text.SpannableString;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    37
import android.text.SpannableStringBuilder;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    38
import android.text.Spanned;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    39
import android.text.TextUtils;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    40
import android.text.format.DateFormat;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    41
import android.text.style.ForegroundColorSpan;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    42
import android.text.style.RelativeSizeSpan;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    43
import android.text.style.StyleSpan;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    44
import android.util.Log;
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    45
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    46
public class MessageLog {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    47
    private static final int BACKLOG_LINES = 200;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    48
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    49
    private static final int INFO_COLOR = Color.GRAY;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    50
    private static final int PLAYERINFO_COLOR = Color.GREEN;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    51
    private static final int CHAT_COLOR = Color.GREEN;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    52
    private static final int MECHAT_COLOR = Color.CYAN;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    53
    private static final int WARN_COLOR = Color.RED;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    54
    private static final int ERROR_COLOR = Color.RED;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    55
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    56
    private final Context context;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    57
    private List<Listener> observers = new LinkedList<Listener>();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    58
    private List<CharSequence> log = new LinkedList<CharSequence>();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    59
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    60
    public MessageLog(Context context) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    61
        this.context = context;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    62
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    63
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    64
    private Spanned makeLogTime() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    65
        String time = DateFormat.getTimeFormat(context).format(new Date());
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    66
        return withColor("[" + time + "] ", INFO_COLOR);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    67
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    68
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    69
    private static Spanned span(CharSequence s, Object o) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    70
        Spannable spannable = new SpannableString(s);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    71
        spannable.setSpan(o, 0, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    72
        return spannable;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    73
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    74
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    75
    private static Spanned withColor(CharSequence s, int color) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    76
        return span(s, new ForegroundColorSpan(color));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    77
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    78
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    79
    private static Spanned bold(CharSequence s) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    80
        return span(s, new StyleSpan(Typeface.BOLD));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    81
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    82
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    83
    private void append(CharSequence msg) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    84
        SpannableStringBuilder ssb = new SpannableStringBuilder();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    85
        ssb.append(makeLogTime()).append(msg);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    86
        appendRaw(ssb);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    87
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    88
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    89
    private void appendRaw(CharSequence msg) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    90
        if(log.size() > BACKLOG_LINES) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    91
            log.remove(0);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    92
            for(Listener o : observers) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    93
                o.lineRemoved();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    94
            }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    95
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    96
        log.add(msg);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    97
        for(Listener o : observers) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    98
            o.lineAdded(msg);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
    99
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   100
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   101
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   102
    void appendPlayerJoin(String playername) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   103
        append(withColor("***" + context.getResources().getString(R.string.log_player_join, playername), INFO_COLOR));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   104
    }
7346
b0f67c5b4215 Hedgeroid: Lobby activity improvements
Medo <smaxein@googlemail.com>
parents: 7332
diff changeset
   105
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   106
    void appendPlayerLeave(String playername, String partMsg) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   107
        String msg = "***";
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   108
        if(partMsg != null) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   109
            msg += context.getResources().getString(R.string.log_player_leave_with_msg, playername, partMsg);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   110
        } else {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   111
            msg += context.getResources().getString(R.string.log_player_leave, playername);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   112
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   113
        append(withColor(msg, INFO_COLOR));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   114
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   115
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   116
    void appendChat(String playerName, String msg) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   117
        if(msg.startsWith("/me ")) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   118
            append(withColor("*"+playerName+" "+msg.substring(4), MECHAT_COLOR));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   119
        } else {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   120
            Spanned name = bold(playerName+": ");
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   121
            Spanned fullMessage = withColor(TextUtils.concat(name, msg), CHAT_COLOR);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   122
            append(fullMessage);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   123
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   124
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   125
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   126
    void appendMessage(int type, String msg) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   127
        switch(type) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   128
        case Frontlib.NETCONN_MSG_TYPE_ERROR:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   129
            append(withColor("***"+msg, ERROR_COLOR));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   130
            break;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   131
        case Frontlib.NETCONN_MSG_TYPE_WARNING:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   132
            append(withColor("***"+msg, WARN_COLOR));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   133
            break;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   134
        case Frontlib.NETCONN_MSG_TYPE_PLAYERINFO:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   135
            append(withColor(msg.replace("\n", " "), PLAYERINFO_COLOR));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   136
            break;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   137
        case Frontlib.NETCONN_MSG_TYPE_SERVERMESSAGE:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   138
            appendRaw(span(TextUtils.concat("\n", Html.fromHtml(msg), "\n"), new RelativeSizeSpan(1.5f)));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   139
            break;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   140
        default:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   141
            Log.e("MessageLog", "Unknown messagetype "+type);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   142
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   143
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   144
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   145
    void clear() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   146
        for(Listener o : observers) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   147
            o.clear();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   148
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   149
        log.clear();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   150
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   151
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   152
    public void addListener(Listener o) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   153
        observers.add(o);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   154
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   155
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   156
    public void removeListener(Listener o) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   157
        observers.remove(o);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   158
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   159
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   160
    public static interface Listener {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   161
        void lineAdded(CharSequence text);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   162
        void lineRemoved();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   163
        void clear();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   164
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   165
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   166
    public Collection<CharSequence> getLog() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   167
        return Collections.unmodifiableList(log);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7584
diff changeset
   168
    }
7332
3f2e130f9715 Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   169
}