summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/Packet3Chat.java
blob: 4fcc5788077c548fa43b3452d6c5ab84f2582474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package net.minecraft.server;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException; // CraftBukkit

public class Packet3Chat extends Packet {

    public String a;

    public Packet3Chat() {}

    public Packet3Chat(String s) {
        /* CraftBukkit start - handle this later
        if (s.length() > 119) {
            s = s.substring(0, 119);
        }
        // CraftBukkit end */

        this.a = s;
    }

    public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit
        this.a = a(datainputstream, 119);
    }

    public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit
        a(this.a, dataoutputstream);
    }

    public void a(NetHandler nethandler) {
        nethandler.a(this);
    }

    public int a() {
        return this.a.length();
    }
}