S40PacketDisconnect .java

net.minecraft.network.play.server.S40PacketDisconnect (class, 51 lines): members: getReason, reason, processPacket, readPacketData, writePacketData.

net.minecraft.network.play.serverclass51 linesserver1.2 KB

Implements

API Surface (4)

void readPacketData(PacketBuffer buf)
void writePacketData(PacketBuffer buf)
void processPacket(INetHandlerPlayClient handler)
IChatComponent getReason()

Fields & Constants (1)

reason

Code Graph: Dependencies (4)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

S40PacketDisconnect.java51 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
import net.minecraft.util.IChatComponent;
8
9
public class S40PacketDisconnect implements Packet<INetHandlerPlayClient>
10
{
11
    private IChatComponent reason;
12
13
    public S40PacketDisconnect()
14
    {
15
    }
16
17
    public S40PacketDisconnect(IChatComponent reasonIn)
18
    {
19
        this.reason = reasonIn;
20
    }
21
22
    /**
23
     * Reads the raw packet data from the data stream.
24
     */
25
    public void readPacketData(PacketBuffer buf) throws IOException
26
    {
27
        this.reason = buf.readChatComponent();
28
    }
29
30
    /**
31
     * Writes the raw packet data to the data stream.
32
     */
33
    public void writePacketData(PacketBuffer buf) throws IOException
34
    {
35
        buf.writeChatComponent(this.reason);
36
    }
37
38
    /**
39
     * Passes this Packet on to the NetHandler for processing.
40
     */
41
    public void processPacket(INetHandlerPlayClient handler)
42
    {
43
        handler.handleDisconnect(this);
44
    }
45
46
    public IChatComponent getReason()
47
    {
48
        return this.reason;
49
    }
50
}
51

Deobfuscated MCP 1.8.9 source of S40PacketDisconnect from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S40PacketDisconnect.java), stored verbatim.