Following https://www.hanselman.com/blog/how-to-use-a-raspberry-pi-4-as-a-minecraft-java-server to make a Minecraft server. The only thing I changed is the server jar itself, BUT Minecraft 1.18.2 requires Java 18. Installed it from snap when I tried to run it said bash: java command not found
TL;DR: Trying to run Java 18 from snap in terminal (Sorry for the bad English. It's not my main language)