MC server startup exception on first run with no index.js
TonyGravagno opened this issue ยท 1 comments
Since there is no index.js on the very first run, an exception is thrown on server startup. It would probably be good to test for the presence of the file before attempting to read it, then create the file with some trivial template, write, then read.
[13:04:49 INFO]: [grakkit] Enabling grakkit v4.1.0
[13:04:50 WARN]: java.nio.file.NoSuchFileException: plugins\grakkit\index.js
[13:04:50 WARN]: at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[13:04:50 WARN]: at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[13:04:50 WARN]: at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[13:04:50 WARN]: at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(Unknown Source)
[13:04:50 WARN]: at com.oracle.truffle.polyglot.FileSystems$NIOFileSystem.newByteChannel(FileSystems.java:768)
[13:04:50 WARN]: at com.oracle.truffle.api.TruffleFile.newByteChannel(TruffleFile.java:798)
[13:04:50 WARN]: at com.oracle.truffle.api.TruffleFile.readAllBytes(TruffleFile.java:868)
[13:04:50 WARN]: at com.oracle.truffle.api.source.Source.read(Source.java:1133)
[13:04:50 WARN]: at com.oracle.truffle.api.source.Source.buildSource(Source.java:997)
[13:04:50 WARN]: at com.oracle.truffle.api.source.Source$SourceBuilder.build(Source.java:1517)
[13:04:50 WARN]: at com.oracle.truffle.api.source.Source$LiteralBuilder.build(Source.java:1687)
[13:04:50 WARN]: at com.oracle.truffle.polyglot.PolyglotSource.build(PolyglotSource.java:302)
[13:04:50 WARN]: at org.graalvm.polyglot.Source$Builder.build(Source.java:920)
[13:04:50 WARN]: at grakkit.Core.open(Core.java:84)
[13:04:50 WARN]: at grakkit.Core.init(Core.java:69)
[13:04:50 WARN]: at grakkit.Main.onEnable(Main.java:18)
[13:04:50 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[13:04:50 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351)
[13:04:50 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480)
[13:04:50 WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:494)
[13:04:50 WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:408)
[13:04:50 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:435)
[13:04:50 WARN]: at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:218)
[13:04:50 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809)
[13:04:50 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164)
[13:04:50 WARN]: at java.lang.Thread.run(Unknown Source)
[13:04:50 INFO]: Server permissions file permissions.yml is empty, ignoring it
[13:04:50 INFO]: Done (20.276s)! For help, type "help"