Discord Thread execute a jar file with a skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
I tryed:

code_language.skript:
command executejar <jarname>:
    permission: yourplugin.executejar
    description: Führt eine externe JAR-Datei aus.

    trigger:
        if arg 1 is set:
            execute console command "executejar " + arg 1

command executejar <jarname>:
    trigger:
        if file "<plugins>/<jarname>.jar" exists:
            execute console command "java -jar <plugins>/<jarname>.jar"
            message "Die externe JAR-Datei wurde erfolgreich ausgeführt."
        else:
            message "Die JAR-Datei wurde nicht gefunden."
            

on load:
        make console execute command "executejar Bot.jar"

I tryed this:


on load:
    execute console command "/execute as @a run function myplugin:load_jar"

function myplugin:load_jar:
    # Passe den Pfad zur JAR-Datei entsprechend an
    execute console command "/execute as @a run function myplugin:unload_jar"
    execute console command "/execute as @a run function myplugin:load_jar_internal"

function myplugin:load_jar_internal:
    execute console command "plugin load <Pfad zur JAR-Datei>"

function myplugin:unload_jar:
    execute console command "plugin unload <Name des zu entladenden Plugins>"

Posted by: Netherite from the skUnity Discord.
 
Status
Not open for further replies.