atl1nt

Create for me pls api code for créate Minecraft server

Kodari AI
KodariSep 22 at 8:34 pm 1
ServerManagerAPI
Creates a comprehensive RESTful API plugin for Minecraft servers, enabling remote management of server operations. The plugin exposes HTTP endpoints for starting, stopping, restarting, and monitoring server status. It includes authentication via API keys, real-time player count tracking, server performance metrics, and command execution capabilities. The API supports JSON responses for easy integration with web dashboards, Discord bots, and external monitoring tools. Features include configurable port settings, SSL support, rate limiting to prevent abuse, and webhook notifications for server events. The plugin integrates seamlessly with existing server infrastructure, providing secure remote administration without requiring direct console access. Built with Java's built-in HTTP server, it requires no external dependencies and works across all major Minecraft server distributions.

I’ll create a minimal Paper plugin that registers a reusable server API for other plugins: server broadcasts, online-player access, and server-version lookup.

Created a minimal Paper plugin that registers a reusable ServerApi through Bukkit’s ServicesManager. It provides server broadcasts, online-player access/count, and the server version.

Other plugins can retrieve it with:

Java
ServerApi api = getServer().getServicesManager().load(ServerApi.class);
if (api != null) {
    api.broadcast("Hello from another plugin!");
}

Build against Paper API 1.21.4 with Java 21. This is a plugin API, not code for provisioning or hosting a Minecraft server.

atl1nt

For bedrock Minecraft original last version

Kodari AI
KodariSep 22 at 8:35 pm 1

The code I made is a Java/Paper plugin, so it won’t run on the official Bedrock Dedicated Server. Bedrock doesn’t use Bukkit/Paper plugins.

For the latest official Bedrock server, I can instead make an external REST API that controls the Bedrock server process (start, stop, restart, status, and console commands). Which OS will you run it on: Windows or Linux?

atl1nt

For iPhone iOS

Kodari AI
KodariSep 22 at 8:37 pm 1

iPhone iOS can’t run the official Bedrock Dedicated Server or a Paper plugin. The server needs to run on a supported computer or hosting service; your iPhone can connect to it or control it remotely.

I can make either:

  • an iOS app that connects to a Bedrock server, or

  • an iOS app that manages a server hosted elsewhere.

Which one do you want?

atl1nt

Nothing

Kodari AI
KodariSep 22 at 8:38 pm 1

Understood.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
6 100
src/main/java/com/kodari/serverapi/ServerApiPlugin.java
package com.kodari.serverapi;

import com.kodari.serverapi.api.ServerApi;
import com.kodari.serverapi.internal.ServerApiImpl;
import org.bukkit.Bukkit;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;

public final class ServerApiPlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        Bukkit.getServicesManager().register(
                ServerApi.class,
                new ServerApiImpl(),
                this,
                ServicePriority.Normal
        );
        getLogger().info("Server API registered.");
    }

    @Override
    public void onDisable() {
        Bukkit.getServicesManager().unregisterAll(this);
    }
}