jssyro.

compile this 26.1.1 paper java 25 plugin for me without chanigng it js compile

Kodari AI
KodariToday at 9:42 am 1

To compile your plugin in Kodari:

  1. Click Compile in the top bar. On mobile, tap ⋮ → Compile Project.

  2. Click Compile in the window that opens.

  3. Once it succeeds, click Download on the build.

No code changes are needed.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle.kts
README.md
settings.gradle.kts
Code
9 796
src/main/java/dev/script/ScriptPlugin.java
package dev.script;

import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
import org.bukkit.NamespacedKey;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class ScriptPlugin extends JavaPlugin {

    private final MiniMessage mm = MiniMessage.miniMessage();
    private ScriptStorage storage;
    private ScriptNet net;
    private NamespacedKey bookUuidKey;
    private NamespacedKey bookNameKey;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        bookUuidKey = new NamespacedKey(this, "script_target_uuid");
        bookNameKey = new NamespacedKey(this, "script_target_name");

        storage = new ScriptStorage(this);
        storage.load();

        net = new ScriptNet(this);
        net.register();

        ScriptCommands commands = new ScriptCommands(this);
        for (String name : new String[]{"scriptset", "scripttake", "scriptdelete", "scriptprompter"}) {
            PluginCommand cmd = getCommand(name);
            if (cmd != null) {
                cmd.setExecutor(commands);
                cmd.setTabCompleter(commands);
            }
        }
    }

    @Override
    public void onDisable() {
        if (storage != null) storage.save();
    }

    public void reloadAll() {
        reloadConfig();
        storage.load();
    }

    public ScriptStorage storage() { return storage; }
    public ScriptNet net() { return net; }
    public NamespacedKey bookUuidKey() { return bookUuidKey; }
    public NamespacedKey bookNameKey() { return bookNameKey; }

    public Component fmt(String template, TagResolver... resolvers) {
        if (template == null || template.isEmpty()) return Component.empty();
        return mm.deserialize(template, TagResolver.resolver(resolvers));
    }

    public Component msg(String key, TagResolver... extra) {
        String raw = getConfig().getString("messages." + key, "<red>Missing message: " + key);
        TagResolver prefix = Placeholder.parsed("prefix", getConfig().getString("messages.prefix", ""));
        return mm.deserialize(raw, TagResolver.resolver(prefix, TagResolver.resolver(extra)));
    }
}