Topic category: Advanced modding
Is there any way to make a Python file run when a command is run in the game?
I have this code for Procedure:
and this code for Command:
but it gave me this error:
> Task :compileJava FAILED
C:\Users\Asus\MCreatorWorkspaces\maker\src\main\java\net\menu\Main.java:5
: error: class MainProcedure is public, should be declared in a file named MainProcedure.java public class MainProcedure {
^
C:\Users\Asus\MCreatorWorkspaces\maker\src\main\java\net\menu\Test.java:17
: error: class TestCommand is public, should be declared in a file named TestCommand.java public class TestCommand {
^
C:\Users\Asus\MCreatorWorkspaces\maker\src\main\java\net\menu\Test.java:14
: error: cannot find symbol import net.menu.procedures.MainProcedures;
^
symbol: class MainProcedures
location: package net.menu.procedures
C:\Users\Asus\MCreatorWorkspaces\maker\src\main\java\net\menu\Main.java:8
: error: cannot find symbol ProcessBuilder pb = new ProcessBuilder(Arrasy.asList("python", PythonPath));
^
symbol: variable Arrasy
location: class MainProcedure
C:\Users\Asus\MCreatorWorkspaces\maker\src\main\java\net\menu\Test.java:32
: error: cannot find symbol MainProcedures.execute(world, x, y, z, entity);
maybe check these n see if that fixes anything