All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.network.protocol.ScriptMessagePacket Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
package cn.nukkit.network.protocol;

import cn.nukkit.api.PowerNukkitXOnly;
import cn.nukkit.api.Since;

@PowerNukkitXOnly
@Since("1.6.0.0-PNX")
public class ScriptMessagePacket extends DataPacket {
    private String channel;
    private String message;

    @Override
    public byte pid() {
        return ProtocolInfo.SCRIPT_MESSAGE_PACKET;
    }

    @Override
    public void decode() {
        this.channel = getString();
        this.message = getString();
    }

    @Override
    public void encode() {
        putString(channel);
        putString(message);
    }

    public String _getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy