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

net.earthcomputer.multiconnect.protocols.v1_12.command.TimeCommand Maven / Gradle / Ivy

The newest version!
package net.earthcomputer.multiconnect.protocols.v1_12.command;

import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.commands.SharedSuggestionProvider;

import static com.mojang.brigadier.arguments.IntegerArgumentType.*;
import static net.earthcomputer.multiconnect.protocols.v1_12.command.Commands_1_12_2.*;
import static net.earthcomputer.multiconnect.protocols.v1_12.command.arguments.EnumArgumentType.*;
import static net.earthcomputer.multiconnect.protocols.v1_12.command.arguments.UnionArgumentType.*;

public class TimeCommand {

    public static void register(CommandDispatcher dispatcher) {
        dispatcher.register(literal("time")
            .then(literal("set")
                .then(argument("time", union(enumArg("day", "night"), integer(0)))
                    .executes(ctx -> 0)))
            .then(literal("add")
                .then(argument("time", integer(0))
                    .executes(ctx -> 0)))
            .then(literal("query")
                .then(literal("daytime")
                    .executes(ctx -> 0))
                .then(literal("day")
                    .executes(ctx -> 0))
                .then(literal("gametime")
                    .executes(ctx -> 0))));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy