#dev-general
1 messages · Page 45 of 1
Ah yes this is the way
"Messages Failed to Load" "Please Try again"
i've tried app, browser and my phone and its all the same
yeah you're so good you're over 1st place
first plugin i have ever developed, you can check the code if u want
open to feedback 😄
are you planning to implement relative tp? Say if x & z are set to ~, the player teleports to the Y above them instead
Minor nitpick, but I'd probably check isEnabled before getting and checking the players Y
oh so if u schedule the tp on the next tick it'll avoid that "player moved too quickly" warning in the console?
(basing off of the comment in the code)
yeah, that's the step a lot of devs don't bother doing / don't realise is the cause
yeah, i feel like it should be better documented, or even be a part of the teleport function, (with a method to override incase u want to instant tp)
that or the vanilla anticheat shouldnt be shit
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
Guys, need help idk what is going on xD basically im creating a command "testcommand" ======= com.dechris.theeclipzecore.commands.testCommand
and is basically a command to send a message xd TESTING
if i compile and use the plugin like that i get this:
https://paste.helpch.at/izexivehek
and if i move the command class to ====== com.dechris.theeclipzecore.testCommand
it works totally fine, I DONT UNDERSTAND
maven, well i just deleted commands package and created another one and its working
xd
make sure you're running the maven clean command everytime u make ur jar
yeah now im doing that
now i have another problem xd
since today im using APIs/libraries
just to know
and well the first i used gave me problems when compiling basically this:
package net.glitchtechs.starapi.File does not exist
but it does exist xd
so i injected what i needed to my project
and forget about it
now
im adding compatibility to another plugin "UltimateClans" (Im just using a check from his API)
in code, everything is ok. but when compiling i get the same problem xd
package me.ulrich.clans.api does not exist
and obviously i will not inject all that
are u adding it as a dependency in your pom?
and after you added it have u reoaded the maven changes
Oh! Thanks! Would definitely look into that
Thanks for the suggestion!
github 
Exactly, kinda shit having to add that
"I could imagine this is because while the player is teleported, there is already a movement packet on the way to the server. This packet was sent before the client knew about the new location, so it is very close to the old location. The server now thinks the client wants to move back to where they previously were and thus gives a warning, since this would be too far."
that logic makes sense to me
i wonder if the teleport async function paper provides fixes this at all
zodd said it perfectly, just use github, u can even setup a very simple github actions script to automatically compile the plugin for u
https://github.com/QarthO/qGP-WitherTrust/blob/main/.github/workflows/maven.yml
if u use maven, this is the script i made, and just copy paste it on all my repos, no modifications needed, (unless ur main branch isn't called "main")
Everytime u push a commit it'll automatically compile it into the jar and upload it as an artifact, it'll even rename the jar so that it has the commits shorten hash so u know which commit that jar was from
@mental locust there is no "learning to maoe plugins using ai", ai quite sucks at making plugins. Just learn java as a starter and then learning bukkit will be easy
ai sucks at anything above doing boilerplate
great news from google, jetbrains has made an ide for java and kotlin!
wowowow
lmao
18y lmao
Is there a reason we still can't .forEach() on arrays?
I know you can use Stream.of() or Arrays.asList()
because arrays don't implement any interface that provides such method
(also it wouldn't work well with primitive types unless you specialize it somehow)
Why would it not?
because there is no Consumer<int>, you'd need IntConsumer instead
but generally the benefit of such a method would be extremely small, the work needed to integrate it into the language just wouldn't be worth it
🤷 The amount of times I have to do the above methods I find it worth it lol
because you don't understand the work that would be needed behind the curtains
also, you never need the methods above
simple loops still exist and are totally fine to use
I find forEach cleaner then writing out a for loop.
it isn't in many cases
because there are only little use cases where your forEach is side-effect-free
or at least non-capturing
real languages fix this
Kotlin stays winning
Kotlin is NOT a real language
Well that might be true
real languages fix this != all languages that fix this are real
depends
I can't
Ocaml
aghh
this is so frustrating
minecraft map colors are very limiting
it looks fucking green!
very little light colors sadly
better..
was wondering guys
is there a way
to search videos from spesfic years on yt?
google didnt help.
done
thanks to Yapperyapps !!
No problem
Cursed?
that wont work so yeah probably
cuz E gets erased to Event which something something handler list idrk the bukkit event api sucks
This was simpler on Sponge 😦
yes you want the registerEvent api instead
think for the listener param u just provide a blank listener idek what its for
I was wondering about that
it looks like the method was made to be called by registerEvents()
?
hella cursed and wont work afaik
Mmm yes I have done it, all thats to do is actually test it 
It has begun 😌
Beware of @mental locust for scamming.
why would you even take the "teach me how to code with only ai"
Good way to have non coders interested in plugin creation
They don't need to be
There is no time to wait! Ask your question @paper pine!
@paper pine Yes, #general-plugins
coding with pure AI is never a good way to do anything
I'm using ssh-actions (which logs in to a specific machine using SSH crendentials) in github with several commands:
though for some reason I get errors, that these commands dont exist.
anyone has any idea why?
well, nvm.
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
did the trick.
most dangerous devops deployment lmao
real
docker would be huge there honestly though
man i need to find a ci platform that doesn't mega suck
i hate writing weird custom yaml files with no like IDE completion help or anything
docker 😩
no nvm when you can just install one version 😌
Can anyone please help me?
Im having problems with my plugin >_<
So here’s the plugin
It’s basically a HoverText plugin
When u hover ur mouse on top of an username u get some info about that player. It’s all based on player.hasPermission()
But when I add this to my plugin folder
I automatically loose my prefixes on LuckPerms
So I added LuckPerms API, but when I write something
The console gives an error telling : can’t be initialised because this.luckperms is null
I can’t send screenshots so yea
Hey I might sound dump but do I have to host a server for me to test out my plugins? I'm new to this so
says that he will learn java first but proceeds to ask this question
lol
lol wat
in another channel he asked how to start making plugins and I suggested to learn java basics first, gave him some courses, etc. He then said he would start with that but now asks how to test his plugins which means he totally ignored it and skipped it lmao.
¯_(ツ)_/¯
or he absolutely demolished those courses and inhaled the knowledge and now he's done making plugins and now wants to test them
I'm just curious lmao
Ima taking the courses rn
Tbh
Most of it is just sae as js or other lang
Like the syntax and classes are new but still
Nah I'm not Einstein
Can I get the answer lmao just curious hehe
in 20mins?
yes
if you arent coming from an OOP lang then its def. not the same xD
If I were to bet, you coming from python
Am I right?
Nope
sad
what lang?
Javascript
eh well javascript technically also has classes lol
It's different
but js and java are still quite a bit different
Ye
Hehe
also your question was already answered
?
just run a local server
Oh just host one on my PC?
Yooo @pastel imp https://x.com/joshtriedcoding/status/1781314782861091296?s=46 this is up your alley
is it in theory possible to port Chisel into a plugin
I feel like with block entities + some click detection it's very possible
Eh idk if 4000 block entites per block are good
If you keep the inside empty you'll save some
If you only render the outside, you'd need 1.3k block entities
Obv that increases/decreases slightly depending on what you've chiseled
possible, yes
practical? unlikely
it would be funny
also yall
procedural animation via block entities
credit to bawnorton
ts is wild
I am just interested in doing something with the new player size feature and smth like Chisel seems like a fun proof of concept
eyo, got outplayed?
The app?
I mean, it labeled "fuck you, that's cool" as toxic xD
hahaha
wdym?
I was confused by "got outplayed"
thought it was like a service or smmt
I linked because you could use that for that thing you was building
its open source too 😂
that's the coolest part xD
Finally started using LLMs locally, instead of relying on chatgpt
Pog.
any recomendations on apps that are simple (no bloat) to test rest apis? (overall http requests)
Httpie
dewicious
you mean like postman?
IntelliJ has a quite simple http client
yes like postman
mhee
I didn’t know this existed omg
what's bad about postman?
besides it not opening until the 10000th attempt
ooo I kinda knew about it but never used it
Httpie is pretty simple and open source, I use it all the time https://httpie.io/
curl is pretty simple too 😏
for ad hoc testing i think curl is unironically a good choice
you can even get crafty with a bash script or makefile to bolster it a bit
I use https://paw.cloud but mac only
RapidAPI for Mac is a full-featured HTTP client that lets you test and describe the APIs you build or consume. It has a beautiful native macOS interface to compose requests, inspect server responses, generate client code and export API definitions.
bruh
yeah I saw that, was quite disappointed when I saw it was only for mac
like, tf
thanks
is there a way to set specific permissions to a player? like i set the permissions in the plugin.yml like this:
https://pastebin.com/8qJPg6rT
i want that one player can have the permission command.settings how can i set the player permission for that.
yeah IntelliJ always has something up its sleeve
I wish they’d make more progress on fleet though
Is the new ui in IntelliJ bugged
The cursor is soo annoying in the new ui
I don’t notice it 😮 could you show what you mean?
I don't notice it either
Ehh it's thing in settings
It says ui
I've been using the new UI for quite a while, I have no idea what you mean by the cursor being annoying, never noticed anything wrong with it
new ui works fine for me
Idk why
My enter does not go to a new line for me
It was so clunky in comparison
Reset your keybinds
Go to your settings and type “Keymaps”
Then click the 3 dots, and I think there’s an option to reset it
Also uhh {} autocomplete does not work for if statement
You could try reset your IDE completely, it’ll automatically make a backup anyway in case you need to revert back
Click file -> IDE settings (I think it’s called) -> Reset
hello i need help with a thing i want to do in a menu.
What do you want
Like what do you want to do?
i want to make just a rotating sytem of heads in the menu
It's not like I can help but more explanation will make it easier for others to help you
Lmao
5 seconds: head 1
5 seconds: head 2
5 seconds: head 3
that in bucle
do u understand me?
Like a single slot?
Idk if there is a function to clear an storage
But if there is then u could just use a for loop
And wait 5 sec
how to make a loop
You two are probably not talking about the same thing, if this is about DeluxeMenus you're in the wrong channel, #general-plugins would be the right place
Hi ! is there a discord server for DeluxeMines ? On spigot https://www.spigotmc.org/resources/deluxemines-⚡️-holograms-effects-⭐fawe-support-async-resets-1-8-8-1-20-✨.104917/ link is not working
Just because the name contains "Deluxe" does not mean it is related to DeluxeMenus, etc. The plugin seems to be abandonned in some way since it hasn't had any updates in months.
Also, wrong channel
Okay, config file contains similar to deluxe minus config for GUI, I thought its related
does it also feel sluggish to you sometimes since last 2? versions
I've been using the new ui pretty much since alpha and I've never really had problems with it. It does not feel any slower than the old ui. And I've been using both. The old one for work and the new one for personal stuff (different computers).
BTW, there is a discord link in the spigot page you linked that you can use.
its not always, maybe due to my plugins idk but sometimes typing is delayed and thats with 8gbs given to ij. got much better when they removed the ai assistant forced inclusion so my bet is that honestly.
I don't have any issues with it, maybe when I'm hosting a server inside IJ but that's not really a UI problem
i don't get why people give a bajillion gb of ram to intellij
i give it two and it always works wonders
I allocated it 5gb oops, though I never see it use above 1gb
it runs on the jvm, you put the limit to the jvm, but by default it'll set its max at startup if you don't
I do this for phpstorm mainly, but kinda pointless as it’s always low usage
tell it to my bazzilion of plugins with memory leaks
Whose running a bazillion plugins in dev
Do you toggle the defaults off? I try to toggle as much of them as possible
As I don’t need half of them
Twig, subversion, etc
i disable a bunch of them
I have 45 plugins and just 3gb allocated
big code base
dont think plugins take that much honestly
actually, I always wondered how you display several projects in the nav... like in uh netbeans
like in netbeans you can access them all directly
How big of a codebase are we talking? Because this is mine 
You can't
Hey guys, had a question. Does anyone know how I could go about making a /enchanting command that would bring up the enchanting table UI (as if interacting with a enchanting table) instead of letting someone directly enchant items like the essentials /enchant command does?
around the same, i could probably do with 3 - 4 but i got 48 gbs so might as well
default of 2 is not enough though
Holy fuck what is this, some server core?
Ive got 64gb, and yet phpstorm only allocate like 1-2gb at max
I work on a big codebase and 2 is fine for me lol
and theres still 30ish gigs free regardless so, i dont see why not give it a bigger max heap
🫣 - I sometimes wonder how much ram I truly need for day to day.
I self-host an analytics database on my laptop, plus phpstorm, IntelliJ, Minecraft etc day to day
i upped my 16 with 16x2 so 48 now
It's very hard with 16, specially when you're dealing with mc
anything development honestly, i do some unreal as well and its hell on 16
I find the 64gb handy as it gives you leg room, but I don’t know what my average is day to day
I’ve been diving into using LLMs locally, and my Mac semi struggles, I need 128gb ram, but can’t justify the price
"need" is a strong word lmao
what you need is a second computer to offload that stuff to 
i feel like once you need 64+ you need to go remote
ye exactly lmao
brov
where th do y'all see those stats
statistic plugin
Tbh if the project was in Java instead of Kotlin it'd be quite a lot more lines 
Yessss, I need one beast of a machine 😂
oh boy
@brittle fox Is 99.9% likely to be a scammer - be extremely cautious!
If any moderators see that ^, I'd look into removing them.
I'm out $15 but it could've been a lot more & they want an upfront crypto payment + refusing to use a reputable middleman. They left this server & blocked me - I hope they don't just create a new account. They wasted 3+ days of my time & a tiny bit of money, unfortunately.
how do i make one of those hologram like giant banners that just stay in the same spot
anyone that asks for crypto should not be trusted. Even more if they ask payment upfront with crypto lmao. Also, report him with @compact perch
cries in paypal banned
eh
They left this server
Barry can't do much when barry isn't in the same server
he can still be banned lol
well, yes. but some staff members might be able to
banning him would avoid him joining again and doing the same
hello
@EventHandler
fun onNPC(event: NPCCollisionEvent) {
val p: Player = event.collidedWith as Player
val knockbackVector = event.collidedWith.location.direction.multiply(-0.8).setY(0.1)
event.collidedWith.velocity = knockbackVector
}
I wrote a small addon for citizens so that when the player pushes them, the player is thrown back, but for some reason it doesn’t work, can you help?
First things first, have you made sure that your function is reached? You can do that pretty easily by printing something inside the function.
I printed print("1") after almost every line, nothing happened(
Have you registered your listener?
if you're registering the event and nothing is happening, the event isnt firing which you'll have to figure it out...
I don't know about that - I think crypto is okay to pay. I mean, you're basically bashing the entirety of cryptocurrency at that point.
Upfront without reassurances (aside from talk), middleman, or whatnot is the suspicious part.
bashing the entirety of cryptocurrency that's exactly what I am doing..
95% of the people that mess around with crypto are full of bullshit
crypto is cool in the technical side, concept, how it works and all, but most of the people involved in it, are just pure shit people.
The thing about ponzi schemes is that not everyone is getting scammed, just the people on the bottom.
the benefits of crypto just get exploited by all the shit people in this world which makes crypto have a bad reputation
That might mean something
i wouldnt say crypto is itself shit, just the people using it
Just like Skript, the concept is cool, but the people that use it make it bad
or well, 95% of the people
the benefits of crypto are kind of directed towards shit people to begin with
Decentralised Currency isn't really Decentralised as well lol. Central places are often used like Bianance.
Hey guys
Anyone willing to help me?
In a plugin?
Something isn’t working in my code
If binance went down, only people that store their crypto there would be affected. The whole point of decentralized currency is so a single person or company doesn't have control over it.
Exactly, which isn't the case with most of crypto currently lol.
I think you underestimate how many people have their own "network" running at home.
some random guy running a few hashes on their gpu is basically worthless
in both PoW and PoS systems
Wasn't talking about mining. Thats a whole other story lol
then what?
Currency storage
what… having a local wallet?
I'm probably using the wrong words here.
I was talking about how the "network" keeps track of funds, transactions etc... mining is included in that "network" but it's another side to it.
correct me if im wrong but are they not like... the same thing
mining is how you keep track of transactions
by verifying hashes
I want to keep a centralized json file online for a project to access, like an API. is GitHub a good way to do this? for context, I am trying to collect data and aggregate it in one place from which each client and upload and load a json file
sounds like REST
yes
postgres vs mysql/mariadb for minecraft servers? pros cons?
private or public repo? If public, it makes your life way easier. But yes, In general I think it's good. I use github as "storage" for several files of data for a discord bot of mine. But my use case is because I need them to be easily accessible by other people so that they can PR + versioning.
public
alright thank you
I am not very experienced with web related stuff so was just looking for advice
mysql is mostly the recommended, since all hosts provide a free mysql db, you can assume almost everyone has a mysql db and is familiar with it.
NP. it being public simplified stuff since you can just access the raw file via a link and voila. If it were private, you would require using the api which is a bit slower (not that noticeable)
yeah, I suppose so, I used both, just wondering if I should switch to postgres and if there won't be any caviats, since in theory it's faster than mysql
personal use?
no, for the server
but like, your own server or public plugin
oh, well, own
because if it's for your own, then it changes a bit
I suppose it's a question of whether the plugins support it
Well, in that case, yes, there are differences. MariaDB is seen as a more performant mysql in a nutshell
public plugins? Eh... usually they don't support postgres.
so I would go with mariadb
since mariadb is basically a fork of mysql, anything that works with mysql, works with mariadb
So yeah, would go with mariadb. More scalable and faster.
there are some small differences between the two like how they handle json although, if you store json in an sql db, you probably not structuring your project well...
for json, mysql if I am not mistaken stores it in binary and mariadb stores them as strings
there are also some security improvements but not rlly relevant
most plugins don't support it and i doubt they're doing stuff complicated enough to benefit from postgres a lot
for like, a website or something, postgres is obviously far superior, but for mc stuff it doesn't really matter, just run maria
SQLite
SQLDN
i mean, half the point is synchronization/access to/from other servers
so sqlite wouldn't be very effective at that lol
symlink it 
wait if this is public, then wouldn't you have to give your account credentials or a key publically?
yeah git(hub) does not seem like a good solution, you probably want an actual backend that clients can interfact with (like others have said, REST)
what service should I use for this then?
you can implement it the same way you implement any webserver backend, and use any hosting provider to run it
any free ones you recommend?
oracle has a generous free tier if you can get it
other cloud providers also have free tiers if you shop around, usually not as much but maybe enough for this purpose
you can also selfhost it
would rather not on my machine and don't have a spare for the purpose. thanks for the recommendation!
What are the most used cpus in minecraft server hostings? Im talking about performance
ryzen 5xxx or 7xxx are pretty popular i think
why do i not have permissions to change my name in this server
I don't have cinematics, I exclusively use live action shots for any of my ads
I use live action shots for in-game stuff
Oh yeah I just send them a youtube link and then wait for them to respond to a survey about how they liked it before they can enter
Now I can randomly generate new videos using redstone.
Download: https://www.dropbox.com/s/484vdg7f6s7wmcf/sethblingvideogenerator.zip?dl=1
TexelElf's filter: http://www.youtube.com/watch?v=gd74GNoA3Yg
SethBling Twitter: http://twitter.com/sethbling
SethBling Facebook: http://facebook.com/sethbling
SethBling Website: http://sethbling.com
SethBl...
1.20.5 moment
Normal food? Nah. Oak Fence Gate? Yeppers.
p sure I've done that on 1.14 before
Does anyone know an API (or something) for in-game statistics? Looking into adding custom achievements that would work with it as well.
I essentially want to show in-game stats on my website; username/if online, playtime, deaths, blocks mined, achievements earned (+ custom ones possibly).
nothing new ig then
There's PlayerAnalytics
But you basically just want to push stuff to an InfluxDB database and render stuff
Does anyone know how to setup deluxe tags with Luck Perms?
that will show playtime, blocks mined, etc & achievements + custom ones?
on a public view for all to view
this is using 1 line of code
and nbt
and also has completely custom eating times
analyse on top
Yes
Rust is good
It's actually kinda tough to learn but once you get the hang of it it's really not that bad.
The lifetime stuff seems spooky, but it's actually pretty intuitive
- Cargo is so much easier to use over gradle
that depends on what you are switching from imho
I mean, once you learn them they're not hard.
I went from Java/Kotlin into Rust, the documentation is amazing and the little interactive rust project for learning is great too
I guess if you went in from python you might have a bad day
if you have done some low level languages, its really not that bad
low level or not doesn't really matter, but you need to understand type systems
True, rust has no polymorphism and no interfaces
I mean I guess in a sense it has poly, just not in the same way OOP langs have it
Rust has more than enough OOP features
Sure
does it have Java?
FFI and then sure
no, Java has LinkedList
💪 💯
how do you all sync data across multiple servers when you have volatile things such as coins etc
Because stuff like coins can change nearly every second, and when you’ve got 100 players on each instance it starts to become quite heavy to update the database on write
On the other hand, when you have local caching things can become out of sync very easily
e.g server 1 has local cache and crashes, therefore not saving data.
Hell you could even create an attack where player 1 transfers to player 2 coins, player 2 leaves the server and their new coin amount is saved, and player 1 used a crash exploit and isnt saved, resulting in a dupe (obviously this is a hypothetical scenario)
The option I’ve been looking into is a custom application that centralizes all DB operations in a queue, and will have a cache with a TTL (remove if not accessed x time)
Something like all write operations get saved to cache and written to DB
Read operations are retrieved from cache, and if not found then from DB
Anyone got any other ideas/suggestions?
use a messaging (producer/listener) system such as apache pulsar, rabbitmq and whatnot
imo
You can update a database every second with no major performance impact
If it gets bigger I'd recommend a one source of truth system where each instance makes a request to that service that then keeps only one instance so no shit can happen via some messaging thing or HTTP requests, whatever you like
that sprite rendering plugin in #showcase looks incredible, can the OP please put a github link in chat
I really wanna check out the code for that
Implemented this
A http service (written in python since very easy) which just takes put/get operations and has an internal TTL cache (a mapping of db->collection->field, so it would cache all db objects according to uuid field in collection users in db test-db)
Was not actually that difficult to make, both the plugin + service side
Not as useful since I dont need to really communicate between servers, moreso just need an efficient one source of truth
I have a feeling an http server for this is slower than a db lol
mariadb does the job fast
i'd like to use mongo though
due to it being nosql
@pastel imp A local http server would seem faster to me if it does in memory caching no?
I mean the only benefit of the http server is the caching, otherwise it would be redundant
what's up with people loving nosql nowadays xD
same as having smt like redis, stored in memory too
It's really good for something that might have many new features added
True, but it's honestly easier to maintain a custom tailored http server
And the http server handles saving to cache + mongo on write, and reads from cache on read (or retrieves from mongo if not in cache and then saves to cache)
make sure to secure it though ¯_(ツ)_/¯
Yeah haha
don't want people randomly putting data in db
@pastel imp you dislike nosql?
also i hope i convinced you a bit, if i didnt i'd love for you to tell me why im doing something terrible lmao
^ regarding the http server
yesno, I see the use of nosql and use it in some places but usually think sql is better in 95% of the cases and people just use nosql cause it is somewhat easier in their eyes and they don't have to deal with making a proper db structure
Eh I see your points.
honestly agreed, though I was working on a project earlier this year. Used MySQL and honestly realized it'd be quite a pain (as well as a bit scary) to update things in prod whenever I wanted a new feature added. NoSQL just lets me add it in the code, and if it doesnt exist just set it
though obviously its possibly in sql
Yeah, although that is also why you usually deploy stuff to a dev env.
Ofcourse haha
I also like the fact that with sql you can do much more things easily like idk, sorting per fields, getting entries in a timeframe, and many more which are either not possible or trickier to do in nosql
True, I guess it depends on use case
You may be able to do it programatically but there is a huge advantage if its done directly in the sql
If it works with http, that's fine
If it's too slow, which I doubt, rewrite it to use some messaging thingy
The only thing you gotta worry about is the Vault implementation
Hm why vault?
Because it's not async
ouch right
I implemented some careful caching on each server
in what sense
And for your use case a messaging thing to update each server's cache when a transaction happens
Right but sounds kinda silly to update cache on a server that the user isnt playing on
Scariest thing is that the http server will hang (or crash) and cause the server to literally die
Make it redundant or maybe self rebooting idk
I think timeouts + auto reboot should solve that
easy solution, don't use it
No
wdym no
it is a solution
instead of using Vault is smt like Treasury
way better
If all required plugins had support for that hahah
youre not a dev right?
correct
basically
Vault is something that should've been in the api blessed be SpongeAPI
skill issue if they don't, no cap.
you can always ask them to support it xD
in short terms, outdated.
if they say that, then they are a spigot simp
why does vault need to be updated
Vault doesn't support multiple currencies does it?
lemme explain
nop
vault is so simple you could make it in an hour
Hardly a fault
if you think about whats missing it is
would there be any issues if one would replace Vault with Treasury? Say missing balances or smt
It's years old, it had everything it needed for its time fwiw
Vault doesn't support multi currencies, concurrency sucks, stores data with playernames instead of uuid, you can't have an "bank/currency" account shared by several people (treasury specific thing), and not async.
treasury is not a drop-in replacement to vault
it can actually work side by side with vault though
ah, sad
the biggest issue is that Vault doesn't support async requests, so when a player buys something, the economy plugin ideally has to make a request to the database or some other server, which can take it's time (1-4ms usually) which stalls the server for that duration. If that duration happens to be longer that sucks too, but this usually forces devs to have some sort of cache to decrease those times to a few instructions, but caching can itself get asynchronus from the actual data in the database, which sucks very much
Sponge stays winning
The issue is that vault is too popular. If people pushed for Treasury or similar, god, the world would be a better world.
this ^
or if Spigot marketplace finally died and not 80% of all customers would buy from a platform where Spigot dependency is mandatory
https://github.com/ArcanePlugins/Treasury/wiki/Comparison-to-other-APIs summarizes it pretty well
I thought you said it was new
oh yeah, it's also multi-platform
never said it was new xD
its not new
That's what I said
I mean
nobody claimed so?
1.1.0 dates back to 17th February 2022
hasn't gotten updated in 7 months but it's not like these types of stuff require that many updates.
or well, there ya go
Let it sit for 7 years and it'll be mature enough
True, use Sponge 
the issue is that a decent amount of the very big plugins are made by people that are from the "sPigOt Is wAY bEtteR tHaN PaPEr UwU" category
so you can easily assume, they will stick with the 1.8 support and with vault
lol
but yeah, this basically explains everything
it also explains why Treasury is so much better lol
oh yeah forgot treasury also has transaction history
using migrations properly solves this problem 100%
you have a safe, reversible, and easy to use way to keep your database schema always up to date
and then you still get all the benefits of SQL, like having strong typing and schemas and all that
even better if you use an ORM, doing migrations through Django is literally the easiest thing in the world
Laravel is similar, though a bit more DIY
Your cursed code for the day
//Kotlin 1.3 :(
fun <T> Optional<T?>.getOrNull(): T? {
return try {
orElseGet(null)
} catch (e: NullPointerException) {
null
}
}```
I assume you mean why would that throw an NPE and that is because orElseGet throws an NPE if other is null
Which FWIW you could just use #get() and then catch a NoSuchElement exception
hear me out
Or just use an if statement and isPresent
orElse(null)
what about it
but Optional isn't from kotlin, isn't it?
it's been a thing since Optional day 1 lol
I must've had a weird build issue then or something, I was looking for this thing for like 10 minutes
oh wait getOrNull is what I was looking for
Which kotlin I think provides
Which is why I got mixed up
a
b
Imagine spending an hour looking for a method when you could use a javadoc right
right
I did spend an hour beating kotlin back into 1.12.2 trying to figure out how cursed my gradle build needed to be
Hm interesting
Though in general player data makes more sense for a non relational db where im just storing key value pairs
Honestly it barely matters, you can store JSON blobs easily in every major DB and get the stability and reliability of a relational database that's been in production for like 30 years lol
I mean, that kinda goes against the objective of a relational db but it is possible yes
usually not recommended to store json (at a big scale like all player data) in a table
for that use columns for each
using json in sql also removes several features
you literally have no use in sql
yesish
Might as well just use nosql
The trick is to store a mongodb reference in the sql stable so you can lookup json data
you still have a stable and fast way of accessing them
but at that point
just use mongodb with indexes
Yeah exactly
indexing exists in mongodb
but I personally think storing data in json (whether it is stored in sql or nosql db) is bad practice.
Cursed behaviors are best though
Storing json in sql is fine depending on how you do it
not ideal nor recommended though.
Yeah well if its your whole player data its stupid
kinda goes against the whole idea of a table at that point xD
I mean mongodb is json structure so not sure what your point is @pastel imp
"not ideal" depends a lot on what exactly you're storing
point is, use sql, not nosql (or sql with json)
on this specific case (and 98% of the cases) it is not
If you are storing it to access different bits of the json then yes, if you are storing the json itself as a serialized object then it is totally fine
already stated several reasons before
What does SQL get me that fits my use case
98% is very wrong, I can think of many many cases that it is very useful
just because you can think of several does not mean that they are actually the case though
there are several good ways to use skript
yet 98% use it the wrong way
lol
your previous reasons
stupid example but you get the point
questionable actually, I would argue you are doing some things programatically that could be done in sql directly
Probably
No but you are only looking at it from the perpective of storing json to then get specific data from the structure instead of the entire object
feels like this is a whole lot similar to the whole "what's the best IDE" topic lol
I think its an interesting topic
I could never figure out which use case fits which DB
A real example, you have a sealed object that has many different implementations, like let's say an asset, you store the entire object as serialized json then deserialize when getting it, a very common usecase of it
depending on how you use it, that's the main way of using sql (or well most common), mariadb queries are fast enough that they can be basically done on-demand, no need to store/cache anything I would argue.
For things that are permanently updated, sure, making a query every second is not ideal
What
I mean lets say I want to store a users level, coins, and pets, with a high probability of new fields being added later on (and for each pet we also have extra things such as health, damage, level, type etc)
Seems like your average minecraft use case
What would be the pros of each DB in this case
I don't really agree
if your data is always going to be stored and accessed together, it can be extremely useful and performant to store JSON blobs
Don't forget this exists https://www.postgresql.org/docs/current/datatype-json.html
basically the same as serializing anything anyways, like if you were storing player inventories or something, you'd store it as base64, which is basically the same thing lol
I know it exists xD
Right but again that sounds like your typical nosql use case. What doing using sql give you in this case
I agree, but at that point why use sql for it when you have dbs specifically for that?
sql scales better
nosql is more flexible
erm but what about the case where your data sucks dick? it is extremely non performant
All the things I listed above, reliability, consistency, easy interoperability, etc.
good way of putting it
And also I hate this whole "you're not supposed to", "not ideal", every use case is different for everyone, you use what makes more sense to you
Like, I wouldn't trust basically any NoSQL database to store any data I care about
simply get better data
besides maybe Mongo just because it's been out so long, but meh
Yeah but that reliability snd consistency gets thrown out the window the second you have your data be a json blob
every time i think of Mongo, I think of "MongoDB is web scale"
hardly
No not hardly
I have been stating my whole conversation as my point of view, not as a professional btw*
you can have JSON implementations that don't allow invalid JSON
and like, it's just one tool in the toolbox
same
Like a fixed json schema!
if you're always going to be serializing/deserializing it anyways, it's no problem to store it like that
?
yeah sure
I think SQL suits more for predictable data
Thats my issue with json blobs
You dont know the length
I mean I guess I'll put it this way
I don't trust anything else to store my data reliably
everything is possible both ways technically, the thing is, in one you might have X built-in while in the other you have to do it yourself programatically I would assume
Valid
I mean
I have a question
So being able to have normal SQL normalized data, and JSON blobs, and base64, and anything in one consistent database is very nice to have
There is no time to wait! Ask your question @dry coral!
There is no time to wait! Ask your question @dry coral!
You technically do though, no? you are the developer setting the rules, it's not like a user can come and just "here, I will add this here and there"
Same thing with NoSQL
Thats my point
I am speaking about nosql lol
Ah I was speaking about json blobs in an sql table
the whole argument of "predictable data" is not valid imo
i have a question
There is no time to wait! Ask your question @prisma wave!
since you still have to specify the format if you want to properly serialize it afterwards.
ask
in both cases, you, the developer, have to know what data is going to get stored.
no thank you
lol
Right but then at that point whats the difference except that SQL is more of a pain in the ass
The whole reason why SQL is such a pain is because its meant to be strict
it's more of a pain in the ass if you want it to be a pain in the ass tbh
I come from the group that hated sql.
Like, really hated it.
Until I took the time to learn it and actually see how it works
I say this coming from someone who all day works with SQL
now I hardly use nosql
Well, maybe I haven't worked with SQL enough like you, but I don't find it a pain personally.
I think it also depends a lot on organization and tooling, for instance, someone who blindly creates an sql structure won't go far lmao
planning an sql db is quite important imo
I guess I’ll make my point clearer
and it has quite an affect on how optimized queries are going to be too.
For minecraft I think people blindly go to SQL for no reason
false.
I am yet to see an instance where query optimization matters
The MAIN reason people go with sql in minecraft is because 99% of mc hosts provide a free mysql db
that's straight facts
wat
Also true
I think I want to understand more how you know you’re going with the correct DB
tell that to Hangar xD, they just optimized a query that was taking ViaVersion page to load 7s to ~150ms
it is absolutely true, many people in mc plugins use sql because they use yaml for storage and they're told to use sql without explaining why, so they blindly follow that without knowledge
I think something like player data storage
you don't. there is no correct db specifically
Suits nosql
At the end of the day, if you are not a big corporation, you go with what you feel most comfy with
Because all I want is to query a UUID and get all player data
okay yes, true
And for sql option 1 is to build clunky queries yourself, or option 2 is to use ORM which is bloat
player data storage is a vague term, I can see several instances where I would prefer sql, so as said, it comes down to preference
Agreed
you should use C structs and save their memory contents directly to a file
Lmao
dies
just wait until you find out that's technically UB :^)
lol
Here is an interesting thing on the topic of sql, when we first released MCCI we had huge issues with our progression service, some times things were hours behind since every few ingestions would add up
The main culprit was insertion and deletion, we spent the first week working on it, average requests were taking 500ms to 1s due to the huge amount of data
Batch insertion and deletion, plus some changes to the logic and it went down to around 50ms, some other changes later it is down to 1 to 5 ms, now our "bottleneck" is network calls between microservices
interesting
I mean it's the same reason you use typed languages. The reason I like Java over Python is because the strictness prevents issues and makes me conform to a good schema
the speed of your queries won't depend on what db you use, but how shit of a programmer you are (+ network latency, but your querying techniques are what matter the most)
Something people falsely think about in NoSQL is that you don't have to design a schema - you do, it just is implicit and not strictly defined, your code will always expect a certain structure, it's just really useful to put that information in the database instead of just hoping the data is correctly formed
reminds me of some conference keynote where people were flaming on NTFS being slow, but what they were doing was opening and closing files just for querying tiny things from them a bajillion times, and like, yeah any FS is gonna be shit that way
yes, making a good query and db structure are very important things. Although, I do think that sql is still faster than sql in large scale.
Very good point
I guess my main dislike is the clunkiness, if I’m expecting a certain schema anyway its easier to just serialize/deserialize json than build SQL queries
Though might be worth looking into
i mean, there are solutions for that streamline that process
just like there are solutions that streamline the creation of json from some object
it's not like you're gonna manually write every character in the json string
yeah or like use an ORM
I do think that sql is still faster than sql
Very profound :)
wait
i kinda wanna try jb exposed out
brain bugged there
meant nosql lmao
:-:
brain froze there
I mean true
Used hibernate in my last plugin
Felt like a lot of bloat and clunkiness
I mean on one hand its nice
ever tried jooq?
yeah Hibernate kinda sucks
On the other hand I dislike how it can lead to some unexpected behaviours something because it’s a bit voodoo magic under the hood
Same with sqlalchemy in python
exposed is kinda nice
kotlin though no?
Emi brought it up, but yes
Overall nice, just dislike how difficult it is to debug. ORM itself is also pretty slow and inefficient
I dislike ORMs personally tbh
idk I'm more into like Django ORM or Laravel Eloquent
Exposed is pretty nice, but still waiting on composite keys 😔
Hence why I am going to be doing my own sql library sometime after exams
composite dn
also mainly for learning purposes but yeah
Anyway if I use sql I think I’ll probably do it more explicit from noa
now*
I dont like not knowing exactly whats happening it leads to many bugs
many bugs? lmao
6 at least
lol
you say otherwise?
I can hardly think of many times I've had bugs from ORMs
mostly just weird query plans or performance issues
At work we use sqlalchemy
And just recently we discovered a bug
We want to insert X into db, now usually X has a reference to Y. The issue was that we updated Y in the db, but the reference X had wasnt up to date, and when we inserted X it rolled back Y
Seems obvious in hindsight
But when you have a huge codebase its very easy to miss those small things due to ORM making things rather implicit
And the issue with it is you don’t realize it immediately
wait even with an on update cascade constraint?
Yeah I haven't had issues like that
Django ORM and stuff just automatically manages relations like that
oh ok
Dont remember the exact context
Maybe worth looking into
yeah I've really liked my experiences with Django ORM and Laravel Eloquent
and a bit of Symfony's ORM
Say, I’ve seen many people say that if you need to synchronize, don’t cache
What if you constantly need to update a value
Such as coins
Would you still not cache?
I mean I would have a write through cache for that
Right but it could get out of sync the second 2 servers have their own local cache
update the redis value + store to DB bulk
^^
Currently what I do in the http server I wrote is write to cache and to db, and on read only read from cache
And since its centralized on the http server it shouldn’t be out of sync
depends, on transfering servers, make sure to update the db in the first server and then update it on the second server. You can always add a 500-1000ms delay before updating to make sure the db was updated. That delay is not really noticeable by players
Feels hacky
makes sense, what's the issue then?
No issue
it is hacky
Looking for feedback
ah
Like trying to see
Maybe I should just ditch it and stick to straight up db write/read
you could in theory use transfer/cookies now with a serialized/encoded number of coins, but cookies can be manipulated by players so
maybe if you encoded it and decoded on the server, even if they tried to manipulate it, you could just check it
just spitting random ideas out btw
no idea how feasable it is
yeah
heck you could potentially even use Vigenère cipher
old school
but unless the brute force it, could work lmao
although nowadays you have better solutions available easily
like 60% of all the possible C programs are gonna contain some UB haha
maybe more
.
.
.
.
.
⦿
🌚

Does anybody use clojure?
Johnny is the only person that uses it
Pretty much
johnny and walmart
the two genders 😌
canceled
lmao
Multi-module jitpack is neat
why tf am i services mute?
skill issue
cheater and a scammer lol
imagine
#cancelled
Not to step on any toes here, but
#off-topic message
I imagine bumping (a-la deleting and reposting)
but there's room to speculate on further reasons as well perhaps
You're requesting for hacks and still wondering why you're mute? lol
If I were to make a bukkit runnable and loop through every player and then do x on a timer, or create a bukkit runnable per person and do x on a timer, would the performance impact be noticable (player count at max would be like 50)
definitely make one runnable and iterate through the players
preferably async, if possible
If async you might as well do your own threading. Better control.
i mean i assume they'd be doing one run through in a not super significant amount of time
adding more threads into the mix for such a small amount of players would likely increase the overhead and not be worth it at all
Up to him really. Just throwing out the option.
lmao
Ok yeah that is what I was thinking I just wasnt sure as the other was simpler for my use case
Also, when I am running Entity#getNearbyEntitys(int, int, int), the distance between the specific entity and the entities the function returned is sometimes greater than the distance I set in the parameters of the function. Like if I put 10 for all 3 of the parameters, sometimes an entity will show up at like 12 or 13 blocks. I assumed this was cause it was a bounding box, so I recalled highschool math and used some math to find the diagonal distance of a box, but nope, that value is too high. Idk what to do, is there any other reason the distance would be that high?
yeah that is what I thought, but the documentation said it used a bounding box (can a bounding box be a circle?)
but centered around the player, meaning a distance of 10 would be at the edge
yeah it makes a bounding box of 20x20x20
can't be a circle in minecraft lol
which one is it?
cause both can work
but using math neither check out
cause if it was the box, than my 10*Math.sqrt(2) would have been the farthest a entity could be, but that was too high. But the circle obviously returns entities farther away than the radius of 10
I give up
I am just gonna make my own nearby entities function that does it how I want lmao
oh duh it's a square
pythagorean theorem
max is ~14.14 in the corner
@long dagger lmao
right here
10*math.sqrt(2) = 14.14
well none of the examples you said are further
i wouldn't make your own, i was literally just looking at the code a bit ago and it's like 8 layers of culling and optimization to make it faster
All I want is to grab the entities around a point, and then later determine if they have strayed away from it. When I did the pythagorean thearom, it removed them when they were 2-3 blocks past the point they were added, which is too far
If you want it done async you have to make your own.
but this in my head, you would do the entities around a point once and then check after a delay the distance between em, doesn't even need to be square rooted
cant be that much off. I just loop through chunks around player by radius, and add all entities, then filter by distance. (so that it is a circle and not square)
