blob: 435e7e0b5da2f4c5439ddf7eae24136edb0e47bf (
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
39
40
41
42
43
44
45
46
|
package net.minecraft.server;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException; // CraftBukkit
public class Packet2Handshake extends Packet {
private int a;
private String b;
public String c; // CraftBukkit private -> public
public int d; // CraftBukkit private -> public
public Packet2Handshake() {}
public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOException
this.a = datainputstream.readByte();
this.b = a(datainputstream, 16);
this.c = a(datainputstream, 255);
this.d = datainputstream.readInt();
}
public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException
dataoutputstream.writeByte(this.a);
a(this.b, dataoutputstream);
a(this.c, dataoutputstream);
dataoutputstream.writeInt(this.d);
}
public void handle(NetHandler nethandler) {
nethandler.a(this);
}
public int a() {
return 3 + 2 * this.b.length();
}
public int d() {
return this.a;
}
public String f() {
return this.b;
}
}
|