karthikeyan0055

https://connyai.com/downloads analyse this plugin make and make replica and rename Ultronai

Kodari AI
KodariNov 15 at 8:52 am 1
Ultronai
Ultronai is a comprehensive Minecraft plugin that replicates and enhances the functionality of the ConnyAI download plugin. It provides advanced player management features including customizable kits, warp systems, economy integration, and GUI-based menus. The plugin offers permission-based command access, configurable messages, and a user-friendly interface for server administrators. Key features include a robust kit system with cooldowns, a warp management system with per-warp permissions, an economy handler supporting multiple currency types, and an intuitive GUI framework for seamless navigation. Ultronai also includes player data storage using YAML configuration files, automatic save intervals, and extensive configuration options for server customization. The plugin is designed for performance optimization and compatibility with modern Minecraft server versions, making it an essential tool for server management.

Conny is a hosted AI service plus a server bridge—not just a plugin. It connects with a token to inspect files, run commands, read logs and manage changes.

To build UltronAI, which AI provider should it use, and do you want its backend built as a Kodari Discord bot project? Kodari can host that backend at a public HTTPS URL.

karthikeyan0055

Conny is a hosted AI service plus a server bridge—not just a plugin. It connects with a token to inspect files, run commands, read logs and manage changes. make like

Kodari AI
KodariNov 15 at 8:54 am 2
  • Create an outbound, token-authenticated bridge for a separately hosted backend.

  • Add opt-in command and file access, plus buffered server logs and admin controls.

Created UltronAI, an outbound server bridge with token authentication, optional log sharing, allowlisted commands, and restricted file access. Remote access is disabled by default.

It is not yet a full Conny replica: it needs an AI-powered backend to accept connections and provide the interface. That backend can be built and hosted as a Kodari Discord bot project. The bridge uses Java-properties POST requests at /api/bridge/poll and /api/bridge/result.

karthikeyan0055

create config file replica in conny plguin

Kodari AI
KodariNov 15 at 4:38 pm 1

UltronAI already has a config file at src/main/resources/config.yml.

To replicate Conny’s configuration accurately, please upload or paste its config.yml. The downloads page doesn’t show the configuration options.

karthikeyan0055

conny config have only key inside

Kodari AI
KodariNov 15 at 4:44 pm 1
  • Simplify the generated config to a single key.

  • Keep the bridge’s existing safety defaults; a backend is still required.

New installations now generate a config containing only key. Existing configs are not overwritten.

The key alone won’t connect the bridge yet: UltronAI still needs a backend and bridge configuration.

karthikeyan0055

just create like

Kodari AI
KodariNov 15 at 4:45 pm 1

The config is already like that:

YAML
key: ''

Put your UltronAI key between the quotes. A key alone won’t connect it yet—the UltronAI backend still needs to be built and configured.

karthikeyan0055

i have website and sftp

Kodari AI
KodariNov 15 at 4:45 pm 1

Your website can provide the interface, and SFTP can upload files—but UltronAI also needs a running backend to communicate with the plugin and AI provider.

What is your website built with, and which AI provider do you want to use? Please don’t send your SFTP password or API keys here.

karthikeyan0055

ok give

Kodari AI
KodariNov 15 at 4:45 pm 1

Build the UltronAI backend as a Discord bot project on Kodari and deploy it at a public HTTPS URL. Your website can connect to it, and the backend can communicate with the plugin.

Which AI provider do you want it to use?

karthikeyan0055

yes

Kodari AI
KodariNov 15 at 4:46 pm 1

Which AI provider would you like UltronAI to use?

karthikeyan0055

gemine api

Kodari AI
KodariNov 15 at 4:46 pm 1

Use the Gemini API for UltronAI. Create a Discord bot project on Kodari for the backend, then share its public HTTPS URL here so I can connect the plugin to it.

Keep your Gemini API key private; don’t paste it into chat.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
5 263
src/main/java/com/ultronai/UltronAI.java
package com.ultronai;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import java.util.logging.Handler;
import java.util.logging.LogRecord;

public final class UltronAI extends JavaPlugin {
    private static final int MAX_RESPONSE = 262144;
    private final Deque<String> logs = new ArrayDeque<>();
    private BukkitTask task;
    private Handler logHandler;
    private volatile Settings settings;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        logHandler = new Handler() {
            @Override
            public void publish(LogRecord record) {
                if (record == null || record.getMessage() == null) return;
                synchronized (logs) {
                    if (logs.size() >= 200) logs.removeFirst();
                    String line = record.getLevel() + ": " + record.getMessage();
                    logs.addLast(line.length() > 1000 ? line.substring(0, 1000) : line);
                }
            }
            @Override public void flush() { }
            @Override public void close() { }
        };
        getServer().getLogger().addHandler(logHandler);
        startBridge();
    }

    @Override
    public void onDisable() {
        if (task != null) task.cancel();
        if (logHandler != null) getServer().getLogger().removeHandler(logHandler);
    }

    private void startBridge() {
        if (task != null) task.cancel();
        task = null;
        String url = getConfig().getString("bridge.url", "").trim();
        String token = getConfig().getString("key", "").trim();
        if (token.isEmpty()) token = getConfig().getString("bridge.token", "").trim();
        List<String> commands = new ArrayList<>();
        for (String name : getConfig().getStringList("commands.allowed")) {
            commands.add(name.toLowerCase(Locale.ROOT));
        }
        settings = new Settings(url.replaceAll("/+$", ""), token,
                Math.max(1000, getConfig().getInt("bridge.connect-timeout-ms", 5000)),
                Math.max(1000, getConfig().getInt("bridge.read-timeout-ms", 10000)),
                getConfig().getBoolean("bridge.send-logs"), getConfig().getBoolean("commands.enabled"),
                commands, getConfig().getBoolean("files.enabled"),
                getConfig().getString("files.root", "plugins/UltronAI/shared"),
                Math.max(1, Math.min(131072, getConfig().getInt("files.max-bytes", 65536))));
        if (!getConfig().getBoolean("bridge.enabled")) return;
        if (!url.startsWith("https://") || token.isEmpty() || token.equals("change-me")) {
            getLogger().warning("Bridge disabled: configure an HTTPS URL and a secret token.");
            return;
        }
        long period = Math.max(1, getConfig().getLong("bridge.poll-seconds", 5)) * 20L;
        Settings current = settings;
        task = getServer().getScheduler().runTaskTimerAsynchronously(this, () -> poll(current), 20L, period);
    }

    private void poll(Settings s) {
        if (s != settings || !isEnabled()) return;
        try {
            Properties request = new Properties();
            request.setProperty("server", getServer().getName());
            if (s.sendLogs) {
                synchronized (logs) {
                    request.setProperty("logs", String.join("\n", logs));
                }
            }
            Properties job = exchange(s, "/api/bridge/poll", request);
            if (s.sendLogs) {
                synchronized (logs) {
                    String sent = request.getProperty("logs", "");
                    int count = sent.isEmpty() ? 0 : sent.split("\n", -1).length;
                    while (count-- > 0 && !logs.isEmpty()) logs.removeFirst();
                }
            }
            String id = job.getProperty("id", "").trim();
            if (id.isEmpty()) return;
            Properties result = new Properties();
            result.setProperty("id", id);
            try {
                if (s != settings || !isEnabled()) return;
                result.setProperty("output", execute(s, job));
                result.setProperty("ok", "true");
            } catch (Exception e) {
                result.setProperty("ok", "false");
                result.setProperty("output", e.getMessage() == null ? e.getClass().getSimpleName() : e.getMessage());
            }
            exchange(s, "/api/bridge/result", result);
        } catch (Exception e) {
            getLogger().warning("Bridge request failed: " + e.getClass().getSimpleName());
        }
    }

    private Properties exchange(Settings s, String endpoint, Properties data) throws IOException {
        URL url = new URL(s.url + endpoint);
        if (!"https".equalsIgnoreCase(url.getProtocol())) throw new IOException("HTTPS required");
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setInstanceFollowRedirects(false);
        connection.setConnectTimeout(s.connectTimeout);
        connection.setReadTimeout(s.readTimeout);
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Authorization", "Bearer " + s.token);
        connection.setRequestProperty("Content-Type", "text/x-java-properties; charset=ISO-8859-1");
        connection.setDoOutput(true);
        ByteArrayOutputStream body = new ByteArrayOutputStream();
        data.store(body, null);
        try {
            try (java.io.OutputStream out = connection.getOutputStream()) {
                out.write(body.toByteArray());
            }
            int status = connection.getResponseCode();
            if (status < 200 || status >= 300) throw new IOException("HTTP " + status);
            byte[] bytes;
            try (InputStream in = connection.getInputStream()) {
                bytes = in.readNBytes(MAX_RESPONSE + 1);
            }
            if (bytes.length > MAX_RESPONSE) throw new IOException("Response too large");
            Properties response = new Properties();
            response.load(new ByteArrayInputStream(bytes));
            return response;
        } finally {
            connection.disconnect();
        }
    }

    private String execute(Settings s, Properties job) throws Exception {
        String type = job.getProperty("type", "");
        if (type.equals("command")) {
            if (!s.commandsEnabled) throw new IOException("Remote commands are disabled");
            String command = job.getProperty("command", "").trim();
            if (command.startsWith("/")) command = command.substring(1);
            if (command.isEmpty() || command.contains("\n") || command.contains("\r")) throw new IOException("Invalid command");
            String name = command.split("\\s+", 2)[0].toLowerCase(Locale.ROOT);
            if (!s.commands.contains(name)) throw new IOException("Command not allowed");
            final String dispatch = command;
            return getServer().getScheduler().callSyncMethod(this, () -> {
                if (s != settings || !isEnabled()) return "Bridge configuration changed";
                return getServer().dispatchCommand(getServer().getConsoleSender(), dispatch)
                        ? "Command dispatched; output appears in server logs" : "Command was not handled";
            }).get(30, TimeUnit.SECONDS);
        }
        if (!s.filesEnabled) throw new IOException("Remote file access is disabled");
        if (!type.equals("list") && !type.equals("read") && !type.equals("write")) throw new IOException("Unknown job type");
        Path server = getServer().getWorldContainer().toPath().toRealPath();
        Path configured = server.resolve(s.fileRoot).normalize();
        if (!configured.startsWith(server) || configured.equals(server)) throw new IOException("Invalid file root");
        Files.createDirectories(configured);
        Path root = configured.toRealPath();
        if (!root.startsWith(server) || root.equals(server)) throw new IOException("File root resolves outside the server directory");
        String relative = job.getProperty("path", "");
        Path target = root.resolve(relative).normalize();
        if (!target.startsWith(root)) throw new IOException("Path outside file root");
        Path existing = target;
        while (existing != null && !Files.exists(existing, LinkOption.NOFOLLOW_LINKS)) existing = existing.getParent();
        if (existing == null || !existing.toRealPath().startsWith(root)) throw new IOException("Path resolves outside file root");
        if (Files.isSymbolicLink(target)) throw new IOException("Symbolic links are not supported");
        if (type.equals("list")) {
            try (java.util.stream.Stream<Path> stream = Files.list(target)) {
                return String.join("\n", stream.limit(500).map(p -> p.getFileName().toString()).toList());
            }
        }
        if (type.equals("read")) {
            try (InputStream in = Files.newInputStream(target)) {
                byte[] bytes = in.readNBytes(s.maxBytes + 1);
                if (bytes.length > s.maxBytes) throw new IOException("File too large");
                return new String(bytes, StandardCharsets.UTF_8);
            }
        }
        byte[] content = job.getProperty("content", "").getBytes(StandardCharsets.UTF_8);