#Cant run anything with IntelliJ
1 messages · Page 1 of 1 (latest)
<@&987246652869971988> please have a look, thanks.
full screenshot of the IDE please
can u go to the project structure settings please
ah okay, its a maven structure
looks okay so far
u can close that dialog
in ur file explorer on the very left, can u expand ur src folder please and show whats in there
down to ur files
so that i can see ur java files
just that file?
yep
okay. so u cant run it bc it has no main method
runnable files are files with a public static void main(String[] args) method
however, ur making a minecraft plugin
so this is likely not intended to be runnable from within the IDE
but instead it likely has to be "registered" towards ur minecraft and the game then understands the code and calls these callback methods u created
id suggest u follow a minecraft plugin tutorial or similar
and check how they teach their game to include that plugin
and possibly also how to attach a debugger, perhaps to the already running process
Thats what i was doing, he didnt seem to have the same problem
he definitely wasnt able to run this from within intellij by clicking on the run button
it has no main method, it cant be executed like that
The video is a little older so there might be things that have changed since
most likely a problem i made along the process
ill give the video a rewatch and let you know if Its still the same
could it be because of location> not sure but he has a seperate location designated to minecraft mine is still in the program files, which should be fine for java and stuff but i want to make sure for minecraft
if anything, it has to do with the run config
u can only click on the play button if the class has a main method (which this doesnt)
or if uve setup a manual run config
which u can do next to the play button
u could theoretically setup complex non-default actions there
such as "launch minecraft and do this and that"
but just clicking the run button without doing anything definitely wont work, as there is no main method here
think about it, how should java run this code. its a minecraft plugin, it cant work without minecraft
minecraft needs to run, know that plugin and call its callbacks
adding a main method wont help u. i mean, intellij would then just run that main method, but that has nothing to do with ur plugin then
i never did any minecraft development, so no idea how ur supposed to do it
got it