GithubHelp home page GithubHelp logo

grakkit / grakkit Goto Github PK

View Code? Open in Web Editor NEW
208.0 6.0 20.0 10.98 MB

A modern JavaScript development environment for Minecraft.

License: MIT License

Java 100.00%
javascript typescript modular minecraft esnext minecraft-plugin minecraft-mod graalvm engine plugin

grakkit's Introduction

Project Logo

Grakkit - It's the fusion of GraalVM, JavaScript, and Minecraft.

Code Demo

If you want to get in touch with the community, join our discord server and we can assist you with whatever problem you may have.

Getting Started

IMPORTANT

Grakkit was designed to run on standard JDK, which means it comes pre-packaged with the GraalJS engine! This pre-packaged engine WILL conflict with the GraalVM JVM, so please use standard JDK to run servers running Grakkit!

Installation

Head on over to the releases page and grab the latest version for your platform. After that, just drop the JAR in whatever plugins, mods, or extensions folder you would install any other plugin, mod, or extension.

Your First Project (Bukkit/Spigot/Paper)

Upon starting or reloading the server with the plugin installed, the plugins/grakkit folder will be created on your server. This is where most if not all development will take place, and serves as your home when working within the scope of grakkit.

Given that Grakkit is community-driven, there are tons of NPM modules you can install to add rich support and typings for the game. For now, the most widely-used package is @grakkit/stdlib-paper, a standard library for JavaScript development with PaperMC servers. To install it, make sure you have NodeJS installed, then navigate to plugins/grakkit in a terminal or command prompt and use npm install @grakkit/stdlib-paper.

For those working on a remote server, you can simply install the package to a local directory, then copy that directory's contents to the remote server's plugins/grakkit folder. This works because grakkit itself doesn't need NodeJS installed, it's merely the template used for package management.

Once that's done, you can import it from within your main file (default index.js) as shown below...

const stdlib = require('@grakkit/stdlib-paper');

Upon the next server reload, the above code will be executed. Requiring this package also adds the in-game /js command, which can be used to test and execute code from within the game -- for example, running /js self will show a representation of the player or console sending the command, and you can use /js core.reload() to reload the JS environment without having to reload the entire server.

Your First Project (Minestom)

Grakkit for Minestom is available as a standalone "extension." Download it from our latest release page. Make sure to download the correct platform, labeled grakkit-x.y.z.minestom.jar. The installation process and usage is very similar to that of bukkit/spigot/paper's, however the two key differences are a). it's an extension and should be placed in the extensions directory rather than plugins, and b). it uses different modules to complete the Environment™, notably-being @grakkit/stdlib-minestom.

Grakkit for Minestom is still in its early days, however it's the best we've got as far as scripting in a performant environment like Minestom.

Other Platforms

Grakkit is currently only available for servers implementing the Bukkit or Minestom's API. Check out Other Implementations to find alternatives for your platform!

Further Reading

For more info about Grakkit, modules, the JS command, and more, head on over to the wiki and read up. Attention: This wiki is slightly outdated and only applies to servers. Many of the code samples in here may still work, but some may not. Use at your own risk!

For another useful guide to getting started, check out Start Your Environment.

Additional documentation can be found at API.

Check out these cool resources using Grakkit!

For even more goodies, check out the #resources or #showcase channel in our Discord Server.

Boilerplates
Libraries
Related Plugins
Projects
Showcases
Misc

Created by RepComm and spacefluff432. Maintained by brayjamin, MercerK, Mythical-Forest-Collective, spacefluff432, TonyGravagno, dustinlacewell, wagyourtail, and waterquarks.

grakkit's People

Contributors

brayjamin avatar mercerk avatar psoutertale avatar repcomm avatar wagyourtail avatar yu-vitaqua-fer-chronos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

grakkit's Issues

Grakkit doesn't report all errors

Grakkit fails to report a lot of errors that happens within the JavaScript side, which makes it rather difficult to troubleshoot specific bugs as you never see the error unless you have a try/catch around that particular clause.

For example:

setInterval(() => {
  new Error('test')
}, 2000)

setImmediate(() => {
  new Error('test')
}, 2000)

setTimeout(() => {
  new Error('test')
}, 2000)

new Promise((resolve) => {
  throw new Error('test')
})

You will never see that error get populated in the console or anywhere else. This is extremely frustrating.

Grakkit's JavaScript ticker (chain) can fail and does not resume

I ran into an issue with setTimeout / setImmediate not working. After a lot of investigation, I narrowed it down to chain and instance.tick.

When the bug occurs, session.task.tick will stop accumulating and will always be stuck. When that happens, the JS's ticker will not trigger again until you do a reboot of the server.

My theory is that this may be due to a race condition between the Java/JS/Graal layers. I'm thinking that if a tick takes longer than a regular Java tick, it tries to call JavaScript's tick and nothing happens. When nothing happens, well, it gets released. Since it is released, it does not get readded (as it wasn't called/executed), thus, It doesn't know to tick it again. This seems like a major flaw.

I added a temporary hook in the library for troubleshooting

let thisNext
chain(void 0, (none, next) => {
  thisNext = next
  ....
 }

export const restartTick = () => {
  Grakkit.push(thisNext)
}

and was able to trigger restartTick by a command. When that happened, the ticker immediately start ticking again. However, that isn't a valid solution.

MC server startup exception on first run with no index.js

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"

How to extend PluginBase?

Player.hidePlayer() expects a Plugin as it's first argument, the other version without is deprecated.
I would like to follow the best practice of course. How am I supposed to extend PluginBase from Javascript?

I tried doing the following:

const PluginBase = core.type('org.bukkit.plugin.PluginBase');
class TestPlugin extends PluginBase {}
const TEST_PLUGIN = new TestPlugin();

...

// Later in my event handler:
targetPlayer.hidePlayer(TEST_PLUGIN, player);

But this seems to cause the following error:
[19:12:21 WARN]: TypeError: protoParent is neither Object nor Null

Fetch is not a complete implementation

When looking into fetch, it doesn't seem to be a complete feature. It barely functions, if that.

There is core.fetch that accepts a single parameter. I'm assuming it only defaults to GET and nothing more.

  • How do you customize this?
  • How do you select different methods, like GET, POST, etc?
  • How do you add headers?
  • How do you follow redirects?

Oddly enough, fetch doesn't work the way you expect it to. Fetch doesn't do anything other than creating an object. If you want to do something with fetch, you need to do fetch().json() or fetch().read(), which goes against the grain of expectation when working with fetch on JavaScript.

The other portion is async. I'm not sure how you are supposed to do async with fetch and have it work. It seems to pass it off into a desync object, which tries to get another context to run it. But I believe this is failing as it expects async.js to exist and depending on how folks build their environment, that file may not exist on prod.

Then there is error handling.

[22:45:06 WARN]: An error occured while attempting to execute a task!  
[22:45:06 WARN]: Server returned HTTP response code: 400 for URL: http://localhost:3000

How do we handle errors correctly in this case? It seems to be only throwing a string and not the key object we need to work off of.

I tried implementing my own at the JS level and so far, that fails fairly early on due to HttpRequest.newBuilder().uri(new URI(uri)).

When looking at the sister library, I found this:

As this isn't feature complete, I'm worried that this is creating a blocker for other developers, as they can't do even basic functionality with fetch.

Grakkit 5.0.6 introduced "java.lang.IllegalStateException: zip file closed"

Created a repo and tested. Seems to be introduced in 5.0.6, but I don't think we had any code changes, as that was mostly CI changes. However, the impact seems minimal.

https://github.com/MercerK/grakkit-bug-reports/tree/main/bugReports/zipFile

[07:08:16 INFO]: Closing Server
[07:08:16 WARN]: Exception in thread "Thread-11" java.lang.IllegalStateException: zip file closed
[07:08:16 WARN]:     at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:831)
[07:08:16 WARN]:     at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:330)
[07:08:16 WARN]:     at java.base/java.util.jar.JarFile.getEntry(JarFile.java:518)
[07:08:16 WARN]:     at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:473)
[07:08:16 WARN]:     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163)
[07:08:16 WARN]:     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
[07:08:16 WARN]:     at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:108)
[07:08:16 WARN]:     at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103)
[07:08:16 WARN]:     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
[07:08:16 WARN]:     at grakkit-paper-6.0.1.jar//org.graalvm.collections.EconomicMapImpl.iterator(EconomicMapImpl.java:846)
[07:08:16 WARN]:     at grakkit-paper-6.0.1.jar//com.oracle.truffle.polyglot.PolyglotEngineImpl.collectAliveContexts(PolyglotEngineImpl.java:1261)
[07:08:16 WARN]:     at grakkit-paper-6.0.1.jar//com.oracle.truffle.polyglot.PolyglotEngineImpl.ensureClosed(PolyglotEngineImpl.java:1158)
[07:08:16 WARN]:     at grakkit-paper-6.0.1.jar//com.oracle.truffle.polyglot.PolyglotEngineImpl$PolyglotShutDownHook.run(PolyglotEngineImpl.java:1407)
[07:08:16 WARN]:     at java.base/java.lang.Thread.run(Thread.java:833)

HTTPclient Issues

The Grakkit HTTPClient service does not seem to work.

My code:
const response = Spigot.core.fetch(https://api.urbandictionary.com/v0/define?term=lol);
const json = response.json();

Error:
org.graalvm.polyglot.PolyglotException: java.lang.IllegalStateException: java.lang.IllegalAccessException: access to public member failed: sun.net.www.protocol.https.HttpsURLConnectionImpl.setDoOutput[Ljava.lang.Object;@2e385896/invokeVirtual, from public Lookup

error with grakkit

error log:

[07:47:41] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[07:48:56] [Server thread/INFO]: oh no Onion4life gone!! now 2 ppl online
[07:48:57] [Server thread/INFO]: shinicore lost connection: Disconnected
[07:49:06] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[07:51:12] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[07:52:55] [Paper Watchdog Thread/ERROR]: ------------------------------
[07:53:13] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[07:53:17] [Paper Watchdog Thread/ERROR]: Current Thread: Server thread
[07:53:22] [Server thread/WARN]: [Essentials] Permissions lag notice with (LuckPermsHandler). Response took 1869.313536ms. Summary: Getting prefix for shinicore
[07:53:23] [Server thread/WARN]: [Essentials] Permissions lag notice with (LuckPermsHandler). Response took 171.040892ms. Summary: Getting suffix for shinicore
[07:53:41] [User Authenticator #14/INFO]: UUID of player shinicore is 0cb1e209-1e40-35a7-97a9-fe31b83a16a6
[07:55:16] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[07:57:23] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[07:57:26] [Server thread/INFO]: oh no mantou gone!! now 1 ppl online
[07:59:26] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[08:01:32] [DiscordSRV - JDA Gateway/WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[08:03:59] [DiscordSRV - JDA Rate Limit/ERROR]: [DiscordSRV] [JDA] There was an I/O error while executing a REST request: Remote host terminated the handshake
[08:03:59] [Paper Watchdog Thread/ERROR]: 	PID: 22 | Suspended: false | Native: false | State: RUNNABLE
[08:03:59] [Paper Watchdog Thread/ERROR]: 	Stack:
[08:03:59] [pool-32-thread-1/WARN]: github.scarsz.discordsrv.dependencies.jda.api.exceptions.ErrorResponseException: -1: javax.net.ssl.SSLHandshakeException
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.RestActionImpl.complete(RestActionImpl.java:227)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.api.requests.RestAction.complete(RestAction.java:633)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//me.scarsz.jdaappender.ChannelLoggingHandler.updateMessage(ChannelLoggingHandler.java:239)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//me.scarsz.jdaappender.ChannelLoggingHandler.flush(ChannelLoggingHandler.java:144)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//me.scarsz.jdaappender.ChannelLoggingHandler.lambda$schedule$0(ChannelLoggingHandler.java:55)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:833)
[08:03:59] [pool-32-thread-1/WARN]: Caused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1714)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1513)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:320)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:284)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.RealConnection.connect(RealConnection.java:169)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:264)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.okhttp3.RealCall.execute(RealCall.java:93)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:201)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:141)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:124)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[08:03:59] [pool-32-thread-1/WARN]: 	... 3 more
[08:03:59] [pool-32-thread-1/WARN]: 	Suppressed: java.net.SocketException: Broken pipe
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:407)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314)
[08:03:59] [pool-32-thread-1/WARN]: 		at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:467)
[08:03:59] [pool-32-thread-1/WARN]: 		... 30 more
[08:03:59] [pool-32-thread-1/WARN]: Caused by: java.io.EOFException: SSL peer shut down incorrectly
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:483)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505)
[08:03:59] [pool-32-thread-1/WARN]: 	... 32 more
[08:03:59] [pool-32-thread-1/WARN]: Caused by: github.scarsz.discordsrv.dependencies.jda.api.exceptions.ContextException
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.api.exceptions.ContextException.here(ContextException.java:54)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.api.requests.Request.<init>(Request.java:71)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.api.requests.RestFuture.<init>(RestFuture.java:36)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.RestActionImpl.submit(RestActionImpl.java:209)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.RestActionImpl.complete(RestActionImpl.java:219)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//github.scarsz.discordsrv.dependencies.jda.api.requests.RestAction.complete(RestAction.java:633)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//me.scarsz.jdaappender.ChannelLoggingHandler.updateMessage(ChannelLoggingHandler.java:239)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//me.scarsz.jdaappender.ChannelLoggingHandler.flush(ChannelLoggingHandler.java:144)
[08:03:59] [pool-32-thread-1/WARN]: 	at DiscordSRV.jar//me.scarsz.jdaappender.ChannelLoggingHandler.lambda$schedule$0(ChannelLoggingHandler.java:55)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[08:03:59] [pool-32-thread-1/WARN]: 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[08:03:59] [pool-32-thread-1/WARN]: 	... 3 more
[08:03:59] [Server thread/INFO]: com.mojang.authlib.GameProfile@3428d69b[id=0cb1e209-1e40-35a7-97a9-fe31b83a16a6,name=shinicore,properties={textures=[com.mojang.authlib.properties.Property@57b3c3aa]},legacy=false] (/218.102.120.73:58238) lost connection: Disconnected
[08:03:59] [Netty Epoll Server IO #1/ERROR]: Could not pass event StandardPaperServerListPingEventImpl to grakkit v6.0.1
java.lang.IllegalStateException: Multi threaded access requested by thread Thread[Netty Epoll Server IO #1,5,main] but is not allowed for language(s) js.
	at com.oracle.truffle.polyglot.PolyglotEngineException.illegalState(PolyglotEngineException.java:129) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.polyglot.PolyglotContextImpl.throwDeniedThreadAccess(PolyglotContextImpl.java:1034) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.polyglot.PolyglotContextImpl.checkAllThreadAccesses(PolyglotContextImpl.java:893) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.polyglot.PolyglotContextImpl.enterThreadChanged(PolyglotContextImpl.java:723) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.enterCached(PolyglotEngineImpl.java:1991) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:110) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.api.impl.DefaultCallTarget.callDirectOrIndirect(DefaultCallTarget.java:85) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.api.impl.DefaultCallTarget.call(DefaultCallTarget.java:102) ~[grakkit-paper.jar:?]
	at com.oracle.truffle.polyglot.PolyglotFunctionProxyHandler.invoke(PolyglotFunctionProxyHandler.java:154) ~[grakkit-paper.jar:?]
	at jdk.proxy2.$Proxy122.execute(Unknown Source) ~[app:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.17.1.jar:git-Purpur-1428]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Purpur-1428]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[patched_1.17.1.jar:git-Purpur-1428]
	at com.destroystokyo.paper.network.StandardPaperServerListPingEventImpl.processRequest(StandardPaperServerListPingEventImpl.java:78) ~[patched_1.17.1.jar:git-Purpur-1428]
	at net.minecraft.server.network.ServerStatusPacketListenerImpl.handleStatusRequest(ServerStatusPacketListenerImpl.java:149) ~[app:?]
	at net.minecraft.network.protocol.status.ServerboundStatusRequestPacket.handle(ServerboundStatusRequestPacket.java:19) ~[app:?]
	at net.minecraft.network.protocol.status.ServerboundStatusRequestPacket.handle(ServerboundStatusRequestPacket.java:6) ~[app:?]
	at net.minecraft.network.Connection.genericsFtw(Connection.java:303) ~[app:?]
	at net.minecraft.network.Connection.channelRead0(Connection.java:289) ~[app:?]
	at net.minecraft.network.Connection.channelRead0(Connection.java:54) ~[app:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:292) ~[ProtocolLib.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at net.minecraft.server.network.LegacyQueryHandler.channelRead(LegacyQueryHandler.java:122) ~[app:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[patched_1.17.1.jar:git-Purpur-1428]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[patched_1.17.1.jar:git-Purpur-1428]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.oracle.truffle.api.TruffleStackTrace$LazyStackTrace
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/sun.nio.fs.UnixNativeDispatcher.lstat0(Native Method)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/sun.nio.fs.UnixNativeDispatcher.lstat(UnixNativeDispatcher.java:308)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:72)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:434)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/java.nio.file.Files.move(Files.java:1432)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.Util$2.getAsBoolean(Util.java:462)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.Util.executeInSequence(Util.java:527)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.Util.runWithRetries(Util.java:538)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.Util.safeReplaceFile(Util.java:557)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.Util.safeReplaceFile(Util.java:550)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.world.level.storage.PlayerDataStorage.save(PlayerDataStorage.java:44)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.players.PlayerList.save(PlayerList.java:576)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.players.PlayerList.disconnect(PlayerList.java:634)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.players.PlayerList.disconnect(PlayerList.java:593)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2049)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2029)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.network.Connection.handleDisconnection(Connection.java:743)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:221)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1681)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:528)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1507)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1300)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.MinecraftServer$$Lambda$3687/0x0000000801416880.run(Unknown Source)
[08:04:00] [Paper Watchdog Thread/ERROR]: 		[email protected]/java.lang.Thread.run(Thread.java:833)
[08:04:00] [Paper Watchdog Thread/ERROR]: ------------------------------
[08:04:00] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[08:04:00] [Paper Watchdog Thread/ERROR]: ------------------------------

code:

core.command({
    name: 'test',
    execute: async (sender, rawargs) => {
        if(sender.getName() == "CONSOLE") return sender.sendMessage("no");

    }
})
core.command({
    name: 'asdf'
})
core.event("org.bukkit.event.server.ServerListPingEvent", (ev) => {
    ev.setMotd("test!");
    ev.setMaxPlayers(69)
})

How does `fetch` work?

When I implement fetch in an event the event only fires once. the only way to get it to fire again is to reload.

import {event, command, reload, fetch} from '@grakkit/stdlib-paper'

event('org.bukkit.event.entity.PlayerDeathEvent', event => {
    fetch('https://raw.githubusercontent.com/LearnWebCode/json-example/master/animals-1.json').json(true)
    .then(data => console.log(JSON.stringify(data)))
})

command({
    name: 'jsReload',
    execute: () => reload(),
})

Is there something I'm doing wrong?

Edit:
I've found a workaround, but if there's a better way, that would be appreciated.
Instead of implementing the fetch in the event, have the event dispatch a command that makes the request, how you'd get the resulting data back to the event, I haven't tried to figure out as I don't need it to, but I figure that's pretty niche

import {event, command, server, reload, fetch} from '@grakkit/stdlib-paper'

event('org.bukkit.event.entity.PlayerDeathEvent', event => {
     server.dispatchCommand(server.getConsoleSender(), `getExternalCommand`)
})

command({
    name: 'jsReload',
    execute: () => reload(),
})
command({
    name: 'getExternalResource',
    execute: (sender, args) => {
        let res = fetch('https://raw.githubusercontent.com/LearnWebCode/json-example/master/animals-1.json').json()
        console.log(res)
    },
    
})

Notice the fetch is no longer async, that's because for some reason when it is, it generates an exception while executing task 261148 java.lang.IllegalStateException: Multi threaded access requested by thread Thread[Craft Scheduler Thread - 1309 - grakkit,5,main] but is not allowed for language(s) js.

Nashorn compat mode conflicts with newer ES APIs

setInterval unimplemented in nashorn, so nashorn compat mod should be disabled in context construction (java plugin) code.

Conflicts with removing support:
get/set doesn't convert to getter/setter without it
Possible resolution: Implement pre-parser (could be a lot of fun!)

Grakkit plugin failing in spigot/paper 1.18.1 when trying to access JavaScript

It seems that spigot/paper 1.18.1 loads classes differently and is causing plugins that use JavaScript (ScriptCraft, Grakkit) to fail.

grakkit-5.0.4.paper.jar generates this error on server start:

[21:32:21] [Server thread/WARN]: [grakkit] Task #2 for grakkit v5.0.4 generated an exception
java.lang.NullPointerException: Cannot invoke "grakkit.FileInstance.tick()" because "grakkit.Grakkit.driver" is null
at grakkit.Grakkit.tick(Grakkit.java:93) ~[grakkit-5.0.4.paper.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3405-Spigot-f4ff00f-d10c35e]

There is more info in this hub.spigotmc.org ticket: https://hub.spigotmc.org/jira/browse/SPIGOT-6902

Per md_5:

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Release notes: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

Btw: Tried loading Nashorn 15.3 as a module. It also works in 1.17.1 but not 1.18.1.

More info here:

https://github.com/wwlib/docker-minecraft/tree/master/minecraft-server-1.18.1-openjdk17

plugin.yml is not included in build jar after packaging

Spigot fails to load the plugin when:

  1. cloning repo
  2. running mvn package
  3. copying output jar to plugins directory
  4. running the server
[16:08:40] [Server thread/ERROR]: Could not load 'plugins/grakkit-plugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
	at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[spigot-1.15.2-R0.1-SNAPSHOT.jar:git-Spigot-a03b1fd-95bd423]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) [spigot-1.15.2-R0.1-SNAPSHOT.jar:git-Spigot-a03b1fd-95bd423]
	at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:353) [spigot-1.15.2-R0.1-SNAPSHOT.jar:git-Spigot-a03b1fd-95bd423]
	at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:210) [spigot-1.15.2-R0.1-SNAPSHOT.jar:git-Spigot-a03b1fd-95bd423]
	at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot-1.15.2-R0.1-SNAPSHOT.jar:git-Spigot-a03b1fd-95bd423]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
	... 6 more

Grakkit and Coreprotect not working well together

Hi folks!

I ran into a unique issue between Grakkit and Coreprotect, as my Coreprotect wasn't connecting to my MariaDB Server. When testing this with just Coreprotect, it works fine, but when using Grakkit and Coreprotect together, Coreprotect is unable connect to MariaDB (receiving no suitable driver found for error).

I did some testing locally and I am able to recreate it.

  • Basically add CoreProtect and Grakkit together on a paper server (no configs or anything)
  • Start server
  • You'll see a ton of errors with Coreprotect.
  • Turn server off
  • Disable Grakkit
  • Turn server back on
  • Coreprotect works fine

Any thoughts on what Grakkit may be doing to break it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.