mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-06-02 18:59:19 +02:00
6800c24c58
- Commands glue, highlight, and replaceInCommandBlocks now require OP level 2 instead of 0
31 lines
933 B
Java
31 lines
933 B
Java
package com.simibubi.create.foundation.command;
|
|
|
|
import com.mojang.brigadier.Command;
|
|
import com.mojang.brigadier.builder.ArgumentBuilder;
|
|
import com.simibubi.create.foundation.networking.AllPackets;
|
|
|
|
import net.minecraft.command.CommandSource;
|
|
import net.minecraft.command.Commands;
|
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
|
import net.minecraftforge.fml.network.PacketDistributor;
|
|
|
|
public class FabulousWarningCommand {
|
|
|
|
public static ArgumentBuilder<CommandSource, ?> register() {
|
|
return Commands.literal("dismissFabulousWarning")
|
|
.requires(AllCommands.SOURCE_IS_PLAYER)
|
|
.executes(ctx -> {
|
|
ServerPlayerEntity player = ctx.getSource()
|
|
.getPlayerOrException();
|
|
|
|
AllPackets.channel.send(
|
|
PacketDistributor.PLAYER.with(() -> player),
|
|
new SConfigureConfigPacket(SConfigureConfigPacket.Actions.fabulousWarning.name(), "")
|
|
);
|
|
|
|
return Command.SINGLE_SUCCESS;
|
|
});
|
|
|
|
}
|
|
}
|