3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-30 18:10:06 +01:00
Paper/src/main/java/net/minecraft/server/Packet3Chat.java

41 Zeilen
932 B
Java

package net.minecraft.server;
import java.io.DataInputStream;
import java.io.DataOutputStream;
2011-05-14 16:29:42 +02:00
import java.io.IOException; // CraftBukkit
public class Packet3Chat extends Packet {
2012-03-30 23:33:51 +02:00
public static int b = 119;
public String message;
public Packet3Chat() {}
public Packet3Chat(String s) {
2011-05-14 16:29:42 +02:00
/* CraftBukkit start - handle this later
2012-03-30 23:33:51 +02:00
if (s.length() > b) {
s = s.substring(0, b);
2011-05-14 16:29:42 +02:00
}
// CraftBukkit end */
this.message = s;
}
public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit
2012-03-30 23:33:51 +02:00
this.message = a(datainputstream, b);
}
public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit
a(this.message, dataoutputstream);
}
public void handle(NetHandler nethandler) {
nethandler.a(this);
}
public int a() {
2012-01-12 23:10:13 +01:00
return 2 + this.message.length() * 2;
}
}