#MySQL connection
30 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
i think theres an addon for it. not sure if its been marked as 1.20 yet
Hmm I saw that KubeJS 5 supports jdbc
where??
Using the import
But I don’t know where to import the J Connector library
In which folder
Umm I read it somewhere in the net but didn’t test it cuz I’m using version 6
if its a part of the standard jre/jdk then you can just import the classes with Java.loadClass('classpath here'), otherwise you need a mod to add those classes for you
aha thats the addon i was thinking of
forge sadly and 1.18, but he can still look around to find newer versions and fabric
the jar is marked for 1.20.1
it should load on fabric too (if it doesnt already) by just adding a fabric.mods.json
Yes like this
But I think that the j connector is not included in java’s jdk
why would you need to perform crud operations though? are you storing a large amount of data somewhere?
I am not, will gonna implement money system
But I need to store it after the server is restarted
Is there any other way to do so?
there is such thing as persistent data, which you can use without needing a mySQL connection
just store data on the player or on the level or server
if you really need it that safe then you'll store it on the server
How to store on the server?
And how to read it and update
Could you provide me an example?
As for persistent data:
PlayerEvents.tick(event => {
const { player, server, player: { persistentData, username } } = event;
persistentData.balance = 100;
});
And ofc you can do the same on the ServerEvents.tick and iterate over all players
Hmmm ok, will try it