cn.nukkit.network.protocol.SetDifficultyPacket Maven / Gradle / Ivy
package cn.nukkit.network.protocol;
import lombok.ToString;
/**
* @author Nukkit Project Team
*/
@ToString
public class SetDifficultyPacket extends DataPacket {
public static final byte NETWORK_ID = ProtocolInfo.SET_DIFFICULTY_PACKET;
public int difficulty;
@Override
public void decode() {
this.difficulty = (int) this.getUnsignedVarInt();
}
@Override
public void encode() {
this.reset();
this.putUnsignedVarInt(this.difficulty);
}
@Override
public byte pid() {
return NETWORK_ID;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy