Giter VIP home page Giter VIP logo

Comments (5)

GodBleak avatar GodBleak commented on June 13, 2024 1

@Mythical-Forest-Collective I'm not sure, I decided to shift my approach altogether. I'd like to check, however, I'm currently racing to finish another project before I leave on vacation for a few weeks. If time is of the essence, Let me know and I will check within the next few days, otherwise, I'd love to check when I get back, and if needed I can close this until then.

from grakkit.

 avatar commented on June 13, 2024

What about something like this?

const requests = [];

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

stdlib.task.interval(() => {
   for (const request of requests.splice(0, requests.length)) {
      request();
   }
});

from grakkit.

GodBleak avatar GodBleak commented on June 13, 2024

Sorry, just got to trying this,
unfortunately, no cigar with that either, gives the following stacktrace:

[grakkit] Task #12 for grakkit v5.0.4 generated an exception
java.util.ConcurrentModificationException: null
	at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:970) ~[?:?]
	at java.util.LinkedList$ListItr.next(LinkedList.java:892) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:74) ~[?:?]
	at grakkit.Grakkit.tick(Grakkit.java:94) ~[grakkit-5.0.4.paper(1).jar:?]
	at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.18.1.jar:git-Paper-147]
	at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.18.1.jar:git-Paper-147]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1547) ~[paper-1.18.1.jar:git-Paper-147]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:480) ~[paper-1.18.1.jar:git-Paper-147]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1470) ~[paper-1.18.1.jar:git-Paper-147]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1264) ~[paper-1.18.1.jar:git-Paper-147]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-147]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

from grakkit.

Yu-Vitaqua-fer-Chronos avatar Yu-Vitaqua-fer-Chronos commented on June 13, 2024

Heya @GodBleak, is it possible to confirm that this is still an issue?

from grakkit.

 avatar commented on June 13, 2024

stdlib v1 is being replaced soon, the fetch method is just an HTTP get system with async. it's very basic and under-featured.

from grakkit.

Related Issues (20)

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.