Search in sources :

Example 6 with ServerCommandSource

use of net.minecraft.server.command.ServerCommandSource in project KahzerxMod by otakucraft.

the class BankCommand method register.

public void register(CommandDispatcher<ServerCommandSource> dispatcher, ShopExtension extension) {
    dispatcher.register(literal("bank").requires(server -> extension.extensionSettings().isEnabled()).then(literal("balance").executes(context -> {
        context.getSource().sendFeedback(new LiteralText("Balance: ").append(MarkEnum.OTAKU_COIN.appendMessage(String.valueOf(extension.getBalance(context.getSource().getPlayer())))), false);
        return 1;
    })).then(literal("transfer").then(argument("player", StringArgumentType.string()).suggests((c, b) -> suggestMatching(extension.getPlayers(), b)).then(argument("amount", IntegerArgumentType.integer(1)).executes(context -> {
        String playerName = StringArgumentType.getString(context, "player");
        String playerUUID = extension.getPlayerUUID(playerName);
        int amount = IntegerArgumentType.getInteger(context, "amount");
        if (playerUUID == null) {
            context.getSource().sendFeedback(MarkEnum.CROSS.appendMessage("Este jugador no existe!"), false);
            return 1;
        }
        if (extension.getAccounts().get(context.getSource().getPlayer()).getCoins() < amount) {
            context.getSource().sendFeedback(MarkEnum.CROSS.appendMessage("No tienes balance suficiente!"), false);
            return 1;
        }
        extension.updateFounds(playerUUID, amount);
        extension.updateFounds(context.getSource().getPlayer(), amount * -1);
        extension.logTransfer(context.getSource().getPlayer(), playerUUID, playerName, amount);
        context.getSource().sendFeedback(MarkEnum.TICK.appendMessage("Transferencia de ").append(MarkEnum.OTAKU_COIN.appendMessage(String.format("%d a %s completada!", amount, playerName))), false);
        ServerPlayerEntity destPlayer = context.getSource().getServer().getPlayerManager().getPlayer(UUID.fromString(playerUUID));
        if (destPlayer != null) {
            destPlayer.networkHandler.sendPacket(new OverlayMessageS2CPacket(new LiteralText(context.getSource().getPlayer().getName().getString() + " te ha transferido ").append(MarkEnum.OTAKU_COIN.appendMessage(String.valueOf(amount)))));
        }
        return 1;
    })))));
}
Also used : LiteralText(net.minecraft.text.LiteralText) ShopExtension(com.kahzerx.kahzerxmod.extensions.shopExtension.ShopExtension) CommandDispatcher(com.mojang.brigadier.CommandDispatcher) ServerCommandSource(net.minecraft.server.command.ServerCommandSource) MarkEnum(com.kahzerx.kahzerxmod.utils.MarkEnum) UUID(java.util.UUID) CommandManager.literal(net.minecraft.server.command.CommandManager.literal) CommandManager.argument(net.minecraft.server.command.CommandManager.argument) StringArgumentType(com.mojang.brigadier.arguments.StringArgumentType) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) CommandSource.suggestMatching(net.minecraft.command.CommandSource.suggestMatching) IntegerArgumentType(com.mojang.brigadier.arguments.IntegerArgumentType) OverlayMessageS2CPacket(net.minecraft.network.packet.s2c.play.OverlayMessageS2CPacket) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) OverlayMessageS2CPacket(net.minecraft.network.packet.s2c.play.OverlayMessageS2CPacket) LiteralText(net.minecraft.text.LiteralText)

Example 7 with ServerCommandSource

use of net.minecraft.server.command.ServerCommandSource in project KahzerxMod by otakucraft.

the class DiscordExtension method settingsCommand.

@Override
public void settingsCommand(LiteralArgumentBuilder<ServerCommandSource> builder) {
    builder.then(literal("setBot").then(argument("token", StringArgumentType.string()).then(argument("chatChannelID", LongArgumentType.longArg()).executes(context -> {
        if (DiscordListener.chatbridge) {
            context.getSource().sendFeedback(new LiteralText("Stop the bot before you make any changes..."), false);
        } else {
            extensionSettings().setToken(StringArgumentType.getString(context, "token"));
            extensionSettings().setChatChannelID(LongArgumentType.getLong(context, "chatChannelID"));
            context.getSource().sendFeedback(new LiteralText("Done!"), false);
            ExtensionManager.saveSettings();
        }
        return 1;
    })))).then(literal("stop").executes(context -> {
        if (DiscordListener.chatbridge) {
            DiscordListener.stop();
            this.extensionSettings().setRunning(false);
            context.getSource().sendFeedback(new LiteralText("Bot stopped!"), false);
            ExtensionManager.saveSettings();
        } else {
            context.getSource().sendFeedback(new LiteralText("Bot already stopped."), false);
        }
        return 1;
    })).then(literal("start").executes(context -> {
        if (!DiscordListener.chatbridge) {
            DiscordListener.start(KahzerxServer.minecraftServer, extensionSettings().getToken(), String.valueOf(extensionSettings().getChatChannelID()), this);
            if (DiscordListener.chatbridge) {
                context.getSource().sendFeedback(new LiteralText("Started!"), false);
            } else {
                context.getSource().sendFeedback(new LiteralText("Failed to start."), false);
            }
            ExtensionManager.saveSettings();
        } else {
            context.getSource().sendFeedback(new LiteralText("But is already running."), false);
        }
        return 1;
    })).then(literal("shouldFeedback").then(argument("feedback", BoolArgumentType.bool()).executes(context -> {
        extensionSettings().setShouldFeedback(BoolArgumentType.getBool(context, "feedback"));
        context.getSource().sendFeedback(new LiteralText("[shouldFeedback] > " + extensionSettings().isShouldFeedback() + "."), false);
        ExtensionManager.saveSettings();
        return 1;
    })).executes(context -> {
        context.getSource().sendFeedback(new LiteralText("[shouldFeedback] > " + extensionSettings().isShouldFeedback() + "."), false);
        return 1;
    })).then(literal("chatBridgePrefix").then(argument("prefix", StringArgumentType.string()).executes(context -> {
        extensionSettings().setPrefix(StringArgumentType.getString(context, "prefix"));
        context.getSource().sendFeedback(new LiteralText("[Prefix] > " + extensionSettings().getPrefix() + "."), false);
        ExtensionManager.saveSettings();
        return 1;
    })).executes(context -> {
        String help = "Server prefix.";
        context.getSource().sendFeedback(new LiteralText(help), false);
        String prefix = extensionSettings().getPrefix();
        context.getSource().sendFeedback(new LiteralText(prefix.equals("") ? "There is no prefix." : "[Prefix] > " + extensionSettings().getPrefix() + "."), false);
        return 1;
    })).then(literal("crossServerChat").then(argument("enabled", BoolArgumentType.bool()).executes(context -> {
        extensionSettings().setCrossServerChat(BoolArgumentType.getBool(context, "enabled"));
        context.getSource().sendFeedback(new LiteralText("[CrossServerChat] > " + extensionSettings().isCrossServerChat() + "."), false);
        ExtensionManager.saveSettings();
        return 1;
    })).executes(context -> {
        String help = "Same bot(same token) on same chatID and different prefix on many servers will connect their chats.";
        context.getSource().sendFeedback(new LiteralText(help), false);
        context.getSource().sendFeedback(new LiteralText("[CrossServerChat] > " + extensionSettings().isCrossServerChat() + "."), false);
        return 1;
    })).then(literal("allowedChats").then(literal("add").then(argument("chatID", LongArgumentType.longArg()).executes(context -> {
        if (extensionSettings().getAllowedChats().contains(LongArgumentType.getLong(context, "chatID"))) {
            context.getSource().sendFeedback(new LiteralText("ID already added."), false);
        } else {
            extensionSettings().addAllowedChatID(LongArgumentType.getLong(context, "chatID"));
            context.getSource().sendFeedback(new LiteralText("ID added."), false);
            ExtensionManager.saveSettings();
        }
        return 1;
    }))).then(literal("remove").then(argument("chatID", LongArgumentType.longArg()).executes(context -> {
        if (extensionSettings().getAllowedChats().contains(LongArgumentType.getLong(context, "chatID"))) {
            extensionSettings().removeAllowedChatID(LongArgumentType.getLong(context, "chatID"));
            context.getSource().sendFeedback(new LiteralText("ID removed."), false);
            ExtensionManager.saveSettings();
        } else {
            context.getSource().sendFeedback(new LiteralText("This ID doesn't exist."), false);
        }
        return 1;
    }))).then(literal("list").executes(context -> {
        context.getSource().sendFeedback(new LiteralText(extensionSettings().getAllowedChats().toString()), false);
        return 1;
    })).executes(context -> {
        String help = "ChatIDs where !online work.";
        context.getSource().sendFeedback(new LiteralText(help), false);
        return 1;
    }));
}
Also used : LiteralText(net.minecraft.text.LiteralText) CommandDispatcher(com.mojang.brigadier.CommandDispatcher) GenericExtension(com.kahzerx.kahzerxmod.extensions.GenericExtension) DiscordSendCommand(com.kahzerx.kahzerxmod.extensions.discordExtension.DiscordSendCommand) ServerCommandSource(net.minecraft.server.command.ServerCommandSource) LongArgumentType(com.mojang.brigadier.arguments.LongArgumentType) KahzerxServer(com.kahzerx.kahzerxmod.KahzerxServer) KlonePlayerEntity(com.kahzerx.kahzerxmod.klone.KlonePlayerEntity) DiscordListener(com.kahzerx.kahzerxmod.extensions.discordExtension.DiscordListener) Extensions(com.kahzerx.kahzerxmod.Extensions) CommandManager.literal(net.minecraft.server.command.CommandManager.literal) PlayerUtils(com.kahzerx.kahzerxmod.utils.PlayerUtils) LiteralArgumentBuilder(com.mojang.brigadier.builder.LiteralArgumentBuilder) CommandManager.argument(net.minecraft.server.command.CommandManager.argument) ExtensionManager(com.kahzerx.kahzerxmod.ExtensionManager) BoolArgumentType(com.mojang.brigadier.arguments.BoolArgumentType) StringArgumentType(com.mojang.brigadier.arguments.StringArgumentType) MinecraftServer(net.minecraft.server.MinecraftServer) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) LiteralText(net.minecraft.text.LiteralText)

Example 8 with ServerCommandSource

use of net.minecraft.server.command.ServerCommandSource in project KahzerxMod by otakucraft.

the class HomeExtension method tpHome.

public int tpHome(ServerCommandSource src) throws CommandSyntaxException {
    ServerPlayerEntity player = src.getPlayer();
    if (player == null) {
        return 1;
    }
    String playerUUID = player.getUuidAsString();
    HomePos homePos = playerHomes.get(playerUUID);
    if (homePos.isValid()) {
        player.teleport(DimUtils.getWorld(homePos.getDim(), player), homePos.getX(), homePos.getY(), homePos.getZ(), player.getYaw(), player.getPitch());
        // xp resets when you tp from other dimension and needs to update smh, mojang pls.
        player.addExperience(0);
    } else {
        player.sendMessage(MarkEnum.INFO.appendText(new LiteralText("You don't have a home yet, use ").styled(style -> style.withColor(Formatting.WHITE)).append(getClickableSetHomeCommand())), false);
    }
    return 1;
}
Also used : ExtensionSettings(com.kahzerx.kahzerxmod.extensions.ExtensionSettings) java.sql(java.sql) LiteralText(net.minecraft.text.LiteralText) CommandDispatcher(com.mojang.brigadier.CommandDispatcher) GenericExtension(com.kahzerx.kahzerxmod.extensions.GenericExtension) ServerCommandSource(net.minecraft.server.command.ServerCommandSource) MarkEnum(com.kahzerx.kahzerxmod.utils.MarkEnum) Extensions(com.kahzerx.kahzerxmod.Extensions) HashMap(java.util.HashMap) HoverEvent(net.minecraft.text.HoverEvent) MinecraftServer(net.minecraft.server.MinecraftServer) Formatting(net.minecraft.util.Formatting) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) ClickEvent(net.minecraft.text.ClickEvent) MutableText(net.minecraft.text.MutableText) CommandSyntaxException(com.mojang.brigadier.exceptions.CommandSyntaxException) DimUtils(com.kahzerx.kahzerxmod.utils.DimUtils) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) LiteralText(net.minecraft.text.LiteralText)

Example 9 with ServerCommandSource

use of net.minecraft.server.command.ServerCommandSource in project Geyser-Fabric by GeyserMC.

the class GeyserFabricMod method startGeyser.

/**
 * Initialize core Geyser.
 * A function, as it needs to be called in different places depending on if Geyser is being reloaded or not.
 *
 * @param server The minecraft server.
 */
public void startGeyser(MinecraftServer server) {
    this.server = server;
    if (this.geyserConfig.getRemote().getAddress().equalsIgnoreCase("auto")) {
        this.geyserConfig.setAutoconfiguredRemote(true);
        String ip = server.getServerIp();
        int port = ((GeyserServerPortGetter) server).geyser$getServerPort();
        if (ip != null && !ip.isEmpty() && !ip.equals("0.0.0.0")) {
            this.geyserConfig.getRemote().setAddress(ip);
        }
        this.geyserConfig.getRemote().setPort(port);
    }
    if (geyserConfig.getBedrock().isCloneRemotePort()) {
        geyserConfig.getBedrock().setPort(geyserConfig.getRemote().getPort());
    }
    Optional<ModContainer> floodgate = FabricLoader.getInstance().getModContainer("floodgate");
    boolean floodgatePresent = floodgate.isPresent();
    if (geyserConfig.getRemote().getAuthType() == AuthType.FLOODGATE && !floodgatePresent) {
        geyserLogger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " " + GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
        return;
    } else if (geyserConfig.isAutoconfiguredRemote() && floodgatePresent) {
        // Floodgate installed means that the user wants Floodgate authentication
        geyserLogger.debug("Auto-setting to Floodgate authentication.");
        geyserConfig.getRemote().setAuthType(AuthType.FLOODGATE);
    }
    geyserConfig.loadFloodgate(this, floodgate.orElse(null));
    this.connector = GeyserImpl.start(PlatformType.FABRIC, this);
    this.geyserPingPassthrough = GeyserLegacyPingPassthrough.init(connector);
    this.geyserCommandManager = new GeyserFabricCommandManager(connector);
    this.geyserWorldManager = new GeyserFabricWorldManager(server);
    // Start command building
    // Set just "geyser" as the help command
    GeyserFabricCommandExecutor helpExecutor = new GeyserFabricCommandExecutor(connector, connector.getCommandManager().getCommands().get("help"), !playerCommands.contains("help"));
    commandExecutors.add(helpExecutor);
    LiteralArgumentBuilder<ServerCommandSource> builder = net.minecraft.server.command.CommandManager.literal("geyser").executes(helpExecutor);
    // Register all subcommands as valid
    for (Map.Entry<String, GeyserCommand> command : connector.getCommandManager().getCommands().entrySet()) {
        GeyserFabricCommandExecutor executor = new GeyserFabricCommandExecutor(connector, command.getValue(), !playerCommands.contains(command.getKey()));
        commandExecutors.add(executor);
        builder.then(net.minecraft.server.command.CommandManager.literal(command.getKey()).executes(executor));
    }
    server.getCommandManager().getDispatcher().register(builder);
}
Also used : GeyserCommand(org.geysermc.geyser.command.GeyserCommand) ModContainer(net.fabricmc.loader.api.ModContainer) GeyserFabricCommandManager(org.geysermc.platform.fabric.command.GeyserFabricCommandManager) GeyserFabricWorldManager(org.geysermc.platform.fabric.world.GeyserFabricWorldManager) ServerCommandSource(net.minecraft.server.command.ServerCommandSource) GeyserFabricCommandExecutor(org.geysermc.platform.fabric.command.GeyserFabricCommandExecutor)

Example 10 with ServerCommandSource

use of net.minecraft.server.command.ServerCommandSource in project ImmersivePortalsMod by qouteall.

the class MyCommandServer method register.

public static void register(CommandDispatcher<ServerCommandSource> dispatcher) {
    LiteralArgumentBuilder<ServerCommandSource> builder = CommandManager.literal("portal").requires(commandSource -> commandSource.hasPermissionLevel(2));
    builder.then(CommandManager.literal("border_set").then(CommandManager.argument("x1", IntegerArgumentType.integer()).then(CommandManager.argument("y1", IntegerArgumentType.integer()).then(CommandManager.argument("x2", IntegerArgumentType.integer()).then(CommandManager.argument("y2", IntegerArgumentType.integer()).executes(context -> {
        BorderPortal.setBorderPortal(context.getSource().getWorld(), IntegerArgumentType.getInteger(context, "x1"), IntegerArgumentType.getInteger(context, "y1"), IntegerArgumentType.getInteger(context, "x2"), IntegerArgumentType.getInteger(context, "y2"));
        return 0;
    }))))));
    builder.then(CommandManager.literal("border_remove").executes(context -> {
        BorderPortal.removeBorderPortal(context.getSource().getWorld());
        return 0;
    }));
    builder.then(CommandManager.literal("view_portal_data").executes(context -> {
        return processPortalTargetedCommand(context, (portal) -> {
            sendPortalInfo(context, portal);
        });
    }));
    builder.then(CommandManager.literal("set_portal_custom_name").then(CommandManager.argument("name", TextArgumentType.text()).executes(context -> {
        return processPortalTargetedCommand(context, portal -> {
            Text name = TextArgumentType.getTextArgument(context, "name");
            portal.setCustomName(name);
        });
    })));
    builder.then(CommandManager.literal("delete_portal").executes(context -> processPortalTargetedCommand(context, portal -> {
        sendMessage(context, "deleted " + portal);
        portal.remove();
    })));
    builder.then(CommandManager.literal("set_portal_nbt").then(CommandManager.argument("nbt", NbtCompoundTagArgumentType.nbtCompound()).executes(context -> processPortalTargetedCommand(context, portal -> {
        CompoundTag newNbt = NbtCompoundTagArgumentType.getCompoundTag(context, "nbt");
        CompoundTag portalNbt = portal.toTag(new CompoundTag());
        newNbt.getKeys().forEach(key -> portalNbt.put(key, newNbt.getTag(key)));
        // portalNbt.copyFrom(newNbt);
        UUID uuid = portal.getUuid();
        portal.fromTag(portalNbt);
        portal.setUuid(uuid);
        reloadPortal(portal);
        sendPortalInfo(context, portal);
    }))));
    builder.then(CommandManager.literal("set_portal_destination").then(CommandManager.argument("dim", DimensionArgumentType.dimension()).then(CommandManager.argument("dest", Vec3ArgumentType.vec3()).executes(context -> processPortalTargetedCommand(context, portal -> {
        try {
            portal.dimensionTo = DimensionArgumentType.getDimensionArgument(context, "dim");
            portal.destination = Vec3ArgumentType.getVec3(context, "dest");
            reloadPortal(portal);
            sendMessage(context, portal.toString());
        } catch (CommandSyntaxException ignored) {
            ignored.printStackTrace();
        }
    })))));
    builder.then(CommandManager.literal("tpme").then(CommandManager.argument("dim", DimensionArgumentType.dimension()).then(CommandManager.argument("dest", Vec3ArgumentType.vec3()).executes(context -> {
        DimensionType dimension = DimensionArgumentType.getDimensionArgument(context, "dim");
        Vec3d pos = Vec3ArgumentType.getVec3(context, "dest");
        ServerPlayerEntity player = context.getSource().getPlayer();
        SGlobal.serverTeleportationManager.invokeTpmeCommand(player, dimension, pos);
        return 0;
    }))));
    builder.then(CommandManager.literal("complete_bi_way_portal").executes(context -> processPortalTargetedCommand(context, portal -> {
        Portal result = completeBiWayPortal(portal, p -> sendMessage(context, "Removed " + p));
        sendMessage(context, "Added " + result);
    })));
    builder.then(CommandManager.literal("complete_bi_faced_portal").executes(context -> processPortalTargetedCommand(context, portal -> {
        Portal result = completeBiFacedPortal(portal, p -> sendMessage(context, "Removed " + p));
        sendMessage(context, "Added " + result);
    })));
    builder.then(CommandManager.literal("complete_bi_way_bi_faced_portal").executes(context -> processPortalTargetedCommand(context, portal -> completeBiWayBiFacedPortal(portal, p -> sendMessage(context, "Removed " + p), p -> sendMessage(context, "Added " + p)))));
    builder.then(CommandManager.literal("remove_connected_portals").executes(context -> processPortalTargetedCommand(context, portal -> {
        Consumer<Portal> removalInformer = p -> sendMessage(context, "Removed " + p);
        removeOverlappedPortals(portal.world, portal.getPos(), portal.getNormal().multiply(-1), removalInformer);
        ServerWorld toWorld = McHelper.getServer().getWorld(portal.dimensionTo);
        removeOverlappedPortals(toWorld, portal.destination, portal.getNormal().multiply(-1), removalInformer);
        removeOverlappedPortals(toWorld, portal.destination, portal.getNormal(), removalInformer);
    })));
    builder.then(CommandManager.literal("connect_floor").then(CommandManager.argument("from", DimensionArgumentType.dimension()).then(CommandManager.argument("to", DimensionArgumentType.dimension()).executes(context -> {
        DimensionType from = DimensionArgumentType.getDimensionArgument(context, "from");
        DimensionType to = DimensionArgumentType.getDimensionArgument(context, "to");
        VerticalConnectingPortal.connect(from, VerticalConnectingPortal.ConnectorType.floor, to);
        return 0;
    }))));
    builder.then(CommandManager.literal("connect_ceil").then(CommandManager.argument("from", DimensionArgumentType.dimension()).then(CommandManager.argument("to", DimensionArgumentType.dimension()).executes(context -> {
        DimensionType from = DimensionArgumentType.getDimensionArgument(context, "from");
        DimensionType to = DimensionArgumentType.getDimensionArgument(context, "to");
        VerticalConnectingPortal.connect(from, VerticalConnectingPortal.ConnectorType.ceil, to);
        return 0;
    }))));
    builder.then(CommandManager.literal("connection_floor_remove").then(CommandManager.argument("dim", DimensionArgumentType.dimension()).executes(context -> {
        DimensionType dim = DimensionArgumentType.getDimensionArgument(context, "dim");
        VerticalConnectingPortal.removeConnectingPortal(VerticalConnectingPortal.ConnectorType.floor, dim);
        return 0;
    })));
    builder.then(CommandManager.literal("connection_ceil_remove").then(CommandManager.argument("dim", DimensionArgumentType.dimension()).executes(context -> {
        DimensionType dim = DimensionArgumentType.getDimensionArgument(context, "dim");
        VerticalConnectingPortal.removeConnectingPortal(VerticalConnectingPortal.ConnectorType.ceil, dim);
        return 0;
    })));
    dispatcher.register(builder);
}
Also used : LiteralText(net.minecraft.text.LiteralText) Vec3ArgumentType(net.minecraft.command.arguments.Vec3ArgumentType) CommandDispatcher(com.mojang.brigadier.CommandDispatcher) ServerCommandSource(net.minecraft.server.command.ServerCommandSource) TextArgumentType(net.minecraft.command.arguments.TextArgumentType) ServerWorld(net.minecraft.server.world.ServerWorld) DimensionArgumentType(net.minecraft.command.arguments.DimensionArgumentType) NbtCompoundTagArgumentType(net.minecraft.command.arguments.NbtCompoundTagArgumentType) SpecialPortalShape(com.qouteall.immersive_portals.portal.SpecialPortalShape) ModMain(com.qouteall.immersive_portals.ModMain) Vec3d(net.minecraft.util.math.Vec3d) SGlobal(com.qouteall.immersive_portals.SGlobal) CommandContext(com.mojang.brigadier.context.CommandContext) World(net.minecraft.world.World) Box(net.minecraft.util.math.Box) UUID(java.util.UUID) Helper(com.qouteall.immersive_portals.Helper) Collectors(java.util.stream.Collectors) LiteralArgumentBuilder(com.mojang.brigadier.builder.LiteralArgumentBuilder) Pair(com.mojang.datafixers.util.Pair) CommandManager(net.minecraft.server.command.CommandManager) Consumer(java.util.function.Consumer) McHelper(com.qouteall.immersive_portals.McHelper) VerticalConnectingPortal(com.qouteall.immersive_portals.portal.global_portals.VerticalConnectingPortal) CompoundTag(net.minecraft.nbt.CompoundTag) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) DimensionType(net.minecraft.world.dimension.DimensionType) Portal(com.qouteall.immersive_portals.portal.Portal) Text(net.minecraft.text.Text) Comparator(java.util.Comparator) IntegerArgumentType(com.mojang.brigadier.arguments.IntegerArgumentType) CommandSyntaxException(com.mojang.brigadier.exceptions.CommandSyntaxException) BorderPortal(com.qouteall.immersive_portals.portal.global_portals.BorderPortal) DimensionType(net.minecraft.world.dimension.DimensionType) LiteralText(net.minecraft.text.LiteralText) Text(net.minecraft.text.Text) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity) Vec3d(net.minecraft.util.math.Vec3d) ServerCommandSource(net.minecraft.server.command.ServerCommandSource) ServerWorld(net.minecraft.server.world.ServerWorld) VerticalConnectingPortal(com.qouteall.immersive_portals.portal.global_portals.VerticalConnectingPortal) Portal(com.qouteall.immersive_portals.portal.Portal) BorderPortal(com.qouteall.immersive_portals.portal.global_portals.BorderPortal) UUID(java.util.UUID) CompoundTag(net.minecraft.nbt.CompoundTag) CommandSyntaxException(com.mojang.brigadier.exceptions.CommandSyntaxException)

Aggregations

ServerCommandSource (net.minecraft.server.command.ServerCommandSource)43 LiteralText (net.minecraft.text.LiteralText)35 ServerPlayerEntity (net.minecraft.server.network.ServerPlayerEntity)33 CommandDispatcher (com.mojang.brigadier.CommandDispatcher)14 CommandManager.literal (net.minecraft.server.command.CommandManager.literal)11 LiteralArgumentBuilder (com.mojang.brigadier.builder.LiteralArgumentBuilder)9 CommandManager.argument (net.minecraft.server.command.CommandManager.argument)9 Extensions (com.kahzerx.kahzerxmod.Extensions)7 GenericExtension (com.kahzerx.kahzerxmod.extensions.GenericExtension)7 CommandSyntaxException (com.mojang.brigadier.exceptions.CommandSyntaxException)6 UUID (java.util.UUID)6 CommandManager (net.minecraft.server.command.CommandManager)6 ExtensionSettings (com.kahzerx.kahzerxmod.extensions.ExtensionSettings)5 IntegerArgumentType (com.mojang.brigadier.arguments.IntegerArgumentType)5 StringArgumentType (com.mojang.brigadier.arguments.StringArgumentType)5 MinecraftServer (net.minecraft.server.MinecraftServer)5 ExtensionManager (com.kahzerx.kahzerxmod.ExtensionManager)4 GameProfile (com.mojang.authlib.GameProfile)4 ClickEvent (net.minecraft.text.ClickEvent)4 MutableText (net.minecraft.text.MutableText)4