S

make a mod name: skript fabric make replica of script plugin but work on 1.21.11 no limit of skript make skript folder minecraft directory

Kodari AI
KodariJul 14 at 8:49 am 9
SkriptFabric
Skript Fabric is a Fabric 1.21.11 server-side scripting mod that brings an extensible Skript-style system to Minecraft. It automatically creates a skript folder inside the Minecraft directory, loads unlimited .sk files, supports join, quit, chat, server, command, and repeating tick events, and provides actions for messages, broadcasts, variables, commands, logging, and player management. Scripts reload without restarting the server, and administrators can list, enable, disable, and manually run scripts through the /skript command.
S

The compilation failed with this error:

code
Compilation failed with 2 error(s):

ERROR in src/main/java/com/skriptfabric/script/SkriptCommand.java at line 101: ')' or ',' expected
                                })));
                                    ^

ERROR in   src/main/java/com/skriptfabric/script/SkriptCommand.java at line 101: ')' or ',' expected
                                  })));
                                      ^


=== COMPILATION ERROR ANALYSIS ===

SYNTAX ERRORS:
  - Line 101: ')' or ',' expected
  - Line 101: ')' or ',' expected
ACTION: Check for missing semicolons or brackets

FILES TO INVESTIGATE:
  - src/main/java/com/skriptfabric/script/SkriptCommand.java
  -   src/main/java/com/skriptfabric/script/SkriptCommand.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJul 14 at 8:51 am 4
  • Read the Fabric 1.21.11 compatibility guidance and the failing command source.

  • Correct the unmatched command-builder parentheses.

  • Create the corrected source artifact.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
11 952
src/main/java/com/skriptfabric/SkriptFabric.java
package com.skriptfabric;

import com.mojang.brigadier.CommandDispatcher;
import com.skriptfabric.command.SkriptCommand;
import com.skriptfabric.script.ScriptManager;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.fabricmc.fabric.api.message.v1.ServerMessageEvents;
import net.minecraft.server.command.ServerCommandSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class SkriptFabric implements ModInitializer {
    public static final String MOD_ID = "skriptfabric";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
    public static final ScriptManager SCRIPT_MANAGER = new ScriptManager();

    @Override
    public void onInitialize() {
        SCRIPT_MANAGER.initialize();

        CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> {
            SkriptCommand.register(dispatcher, SCRIPT_MANAGER);
            SCRIPT_MANAGER.registerScriptCommands(dispatcher);
        });

        ServerLifecycleEvents.SERVER_STARTED.register(SCRIPT_MANAGER::handleServerStarted);
        ServerLifecycleEvents.SERVER_STOPPING.register(SCRIPT_MANAGER::handleServerStopping);
        ServerTickEvents.END_SERVER_TICK.register(SCRIPT_MANAGER::handleServerTick);

        ServerPlayConnectionEvents.JOIN.register((handler, sender, server) ->
                SCRIPT_MANAGER.handleJoin(handler.getPlayer()));

        ServerPlayConnectionEvents.DISCONNECT.register((handler, server) ->
                SCRIPT_MANAGER.handleQuit(handler.getPlayer()));

        ServerMessageEvents.CHAT_MESSAGE.register((message, player, parameters) ->
                SCRIPT_MANAGER.handleChat(player, message.getContent()));
    }
}