/* * Decompiled with CFR 0.152. */ package net.minecraft.server.network.config; import java.util.function.Consumer; import java.util.function.Supplier; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.configuration.ClientboundCodeOfConductPacket; import net.minecraft.server.network.ConfigurationTask; public class ServerCodeOfConductConfigurationTask implements ConfigurationTask { public static final ConfigurationTask.Type TYPE = new ConfigurationTask.Type("server_code_of_conduct"); private final Supplier codeOfConduct; public ServerCodeOfConductConfigurationTask(Supplier codeOfConduct) { this.codeOfConduct = codeOfConduct; } @Override public void start(Consumer> connection) { connection.accept(new ClientboundCodeOfConductPacket(this.codeOfConduct.get())); } @Override public ConfigurationTask.Type type() { return TYPE; } }