#dev-general

1 messages · Page 45 of 1

crude cloud
#

wdym by this

rotund egret
#

Ah yes this is the way

shrewd walrus
#

"Messages Failed to Load" "Please Try again"

i've tried app, browser and my phone and its all the same

shrewd walrus
#

rank #0

#

thats me 😎

crude cloud
#

yeah you're so good you're over 1st place

obtuse gale
#

first plugin i have ever developed, you can check the code if u want

#

open to feedback 😄

storm kelp
rotund egret
shrewd walrus
#

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)

storm kelp
shrewd walrus
#

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

compact perchBOT
zinc plinth
#

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

shrewd walrus
#

seems like ur not compiling ur plugin properly

#

are you using maven or gradle?

zinc plinth
#

maven, well i just deleted commands package and created another one and its working

#

xd

shrewd walrus
#

make sure you're running the maven clean command everytime u make ur jar

zinc plinth
#

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

shrewd walrus
#

are u adding it as a dependency in your pom?

#

and after you added it have u reoaded the maven changes

obtuse gale
rotund egret
#

github clueless

obtuse gale
#

"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."

shrewd walrus
#

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

pastel imp
#

@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

cobalt marlin
#

ai sucks at anything above doing boilerplate

distant sun
#

great news from google, jetbrains has made an ide for java and kotlin!

oblique heath
#

wowowow

pastel imp
#

lmao

rotund egret
#

18y lmao

inner umbra
#

Is there a reason we still can't .forEach() on arrays?
I know you can use Stream.of() or Arrays.asList()

potent nest
#

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)

inner umbra
#

Why would it not?

potent nest
#

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

inner umbra
#

🤷 The amount of times I have to do the above methods I find it worth it lol

potent nest
#

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

inner umbra
#

I find forEach cleaner then writing out a for loop.

potent nest
#

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

prisma wave
#

real languages fix this

rotund egret
#

Kotlin stays winning

potent nest
#

Kotlin is NOT a real language

rotund egret
#

Well that might be true

prisma wave
#

real languages fix this != all languages that fix this are real

lone anvil
#

Hey guys

#

Can anyone help me with something?

oblique heath
#

depends

rotund egret
#

I can't

oblique heath
#

i can help only if it involves camels

#

i'm in a camel mood today

rotund egret
#

Ocaml

oblique heath
#

true

#

id try my best if the help was ocaml related ngl

brazen ether
#

this is so frustrating

#

minecraft map colors are very limiting

#

it looks fucking green!

#

very little light colors sadly

#

better..

slate elk
#

was wondering guys

#

is there a way

#

to search videos from spesfic years on yt?

#

google didnt help.

#

done

#

thanks to Yapperyapps !!

rotund egret
#

No problem

rotund egret
#

Cursed?

cerulean ibex
#

cuz E gets erased to Event which something something handler list idrk the bukkit event api sucks

rotund egret
#

This was simpler on Sponge 😦

potent nest
#

yes you want the registerEvent api instead

cerulean ibex
#

think for the listener param u just provide a blank listener idek what its for

rotund egret
#

I was wondering about that

cerulean ibex
#

it looks like the method was made to be called by registerEvents()

inner umbra
cobalt marlin
rotund egret
#

Mmm yes I have done it, all thats to do is actually test it 4699_devilSmug

rotund egret
#

It has begun 😌

final hinge
#

Beware of @mental locust for scamming.

cobalt marlin
final hinge
rotund egret
#

They don't need to be

paper pine
#

Is this the Deluxe Menus discord?

#

I need help

compact perchBOT
#

There is no time to wait! Ask your question @paper pine!

distant sun
brazen ether
wind patio
#

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.

crude cloud
#

staffcp

cinder flare
#

most dangerous devops deployment lmao

wind patio
cinder flare
#

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

wind patio
#

docker 😩

cinder flare
#

no nvm when you can just install one version 😌

lone anvil
#

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

cobalt marlin
#

you need to init the variables

#

or pass them in the constructor

slender kiln
#

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

wind patio
#

no

#

u can do it on your pc

pastel imp
#

lol

wind patio
#

lol wat

pastel imp
# wind patio 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.

#

¯_(ツ)_/¯

wind patio
#

or he absolutely demolished those courses and inhaled the knowledge and now he's done making plugins and now wants to test them

slender kiln
#

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

slender kiln
wind patio
#

yes

pastel imp
#

If I were to bet, you coming from python

#

Am I right?

slender kiln
#

Nope

pastel imp
#

sad

slender kiln
#

Hehe

#

Ik python

pastel imp
#

what lang?

slender kiln
#

Javascript

pastel imp
#

eh well javascript technically also has classes lol

slender kiln
#

It's different

pastel imp
#

but js and java are still quite a bit different

slender kiln
#

Ye

slender kiln
#

Hehe

pastel imp
#

also your question was already answered

slender kiln
#

?

pastel imp
#

just run a local server

slender kiln
#

Oh just host one on my PC?

pastel imp
#

hmhm

#

for testing that is more than enough

slender kiln
#

K

#

Thanks lmao

#

Lemme go finish the course

#

Heh not sleeping today

slender kiln
#

Trust

wintry plinth
potent nest
#

the score seems to mean nothing? lol

#

also english only

brazen ether
#

is it in theory possible to port Chisel into a plugin

#

I feel like with block entities + some click detection it's very possible

agile galleon
#

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

wind patio
#

possible, yes
practical? unlikely

brazen ether
#

it would be funny

#

procedural animation via block entities

#

credit to bawnorton

#

ts is wild

brazen ether
wintry plinth
pastel imp
#

I mean, it labeled "fuck you, that's cool" as toxic xD

wintry plinth
#

hahaha

pastel imp
wintry plinth
#

I was confused by "got outplayed"

pastel imp
#

thought it was like a service or smmt

wintry plinth
#

I linked because you could use that for that thing you was building

pastel imp
#

ignore that

#

xD

wintry plinth
#

its open source too 😂

pastel imp
#

that's the coolest part xD

wintry plinth
#

Finally started using LLMs locally, instead of relying on chatgpt

pastel imp
#

Pog.

pastel imp
#

any recomendations on apps that are simple (no bloat) to test rest apis? (overall http requests)

ocean quartz
#

Httpie

remote goblet
#

dewicious

wind patio
#

IntelliJ has a quite simple http client

pastel imp
pastel imp
wintry plinth
half harness
#

besides it not opening until the 10000th attempt

half harness
ocean quartz
oblique heath
#

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

wintry plinth
#

I use https://paw.cloud but mac only

RapidAPI for Mac – The most advanced API tool for Mac

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.

pastel imp
#

like, tf

bronze olive
#

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.

wind patio
wintry plinth
slender kiln
#

The cursor is soo annoying in the new ui

wintry plinth
dawn hinge
#

I don't notice it either

slender kiln
#

It says ui

ocean quartz
#

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

potent nest
#

new ui works fine for me

slender kiln
#

Idk why

wintry plinth
#

I really love the new UI tbh

#

Couldn’t imagine going back to that old one now

slender kiln
#

My enter does not go to a new line for me

wintry plinth
#

It was so clunky in comparison

wintry plinth
#

Go to your settings and type “Keymaps”

#

Then click the 3 dots, and I think there’s an option to reset it

slender kiln
#

Also uhh {} autocomplete does not work for if statement

wintry plinth
#

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

slender kiln
#

K

#

I'll try

signal forge
#

hello i need help with a thing i want to do in a menu.

slender kiln
#

What do you want

slender kiln
signal forge
#

i want to make just a rotating sytem of heads in the menu

slender kiln
#

It's not like I can help but more explanation will make it easier for others to help you

#

Lmao

signal forge
#

5 seconds: head 1
5 seconds: head 2
5 seconds: head 3

#

that in bucle

#

do u understand me?

slender kiln
signal forge
#

ye

#

all in the same slot

slender kiln
#

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

signal forge
#

how to make a loop

ocean quartz
#

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

slender kiln
#

Lmao

#

Me typing the whole loop for you

stuck minnow
pastel imp
#

Also, wrong channel

stuck minnow
cobalt marlin
static zealot
#

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).

static zealot
cobalt marlin
ocean quartz
#

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

crude cloud
#

i don't get why people give a bajillion gb of ram to intellij

#

i give it two and it always works wonders

agile galleon
#

You can give IJ more ram?

#

I thought it just takes what it needs ahahah

wintry plinth
#

I allocated it 5gb oops, though I never see it use above 1gb

crude cloud
#

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

wintry plinth
wind patio
crude cloud
#

i have less than the ones that come enabled by default lol

#
  • mc dev
rotund egret
#

Whose running a bazillion plugins in dev

wintry plinth
#

As I don’t need half of them

#

Twig, subversion, etc

crude cloud
#

i disable a bunch of them

ocean quartz
#

I have 45 plugins and just 3gb allocated

cobalt marlin
#

dont think plugins take that much honestly

pastel imp
#

like in netbeans you can access them all directly

ocean quartz
#

How big of a codebase are we talking? Because this is mine omega_lul

pastel imp
#

sad life

#

actual sadness

#

switches to netbeans

#

(joking)

final pine
#

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?

cobalt marlin
#

default of 2 is not enough though

wintry plinth
wintry plinth
crude cloud
cobalt marlin
#

3 would be enough unless i am indexing a new project probably

crude cloud
#

yeah fair

#

but then you have Charlie over here giving it his entire system memory

cobalt marlin
#

and theres still 30ish gigs free regardless so, i dont see why not give it a bigger max heap

wintry plinth
#

🫣 - 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

wind patio
#

idk ive been rocking 32g for a while now, havent had any issues

#

16 seemed not enough

cobalt marlin
ocean quartz
#

It's very hard with 16, specially when you're dealing with mc

cobalt marlin
wintry plinth
#

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

crude cloud
#

"need" is a strong word lmao

#

what you need is a second computer to offload that stuff to peepoSMILEEEEEEEE

cobalt marlin
#

i feel like once you need 64+ you need to go remote

pastel imp
#

where th do y'all see those stats

wind patio
#

statistic plugin

ocean quartz
# wind patio brov

Tbh if the project was in Java instead of Kotlin it'd be quite a lot more lines omega_lul

wintry plinth
lone anvil
#

Hey guys

#

Could anyone help me in something?

crude cloud
#

oh boy

mellow coral
#

@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.

ashen whale
#

how do i make one of those hologram like giant banners that just stay in the same spot

pastel imp
half harness
#

Barry can't do much when barry isn't in the same server

pastel imp
static zealot
#

well, yes. but some staff members might be able to

pastel imp
#

banning him would avoid him joining again and doing the same

west nimbus
#

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?

static zealot
west nimbus
mental locust
#

?

#

who ping me

static zealot
west nimbus
#

yes

#

server.pluginManager.registerEvents(CitizenVelocity(), this)

#

can u help me?

remote goblet
#

if you're registering the event and nothing is happening, the event isnt firing which you'll have to figure it out...

mellow coral
#

Upfront without reassurances (aside from talk), middleman, or whatnot is the suspicious part.

rotund egret
#

Lmao

#

Cope

#

Oh you're the one that got scammed. Even funnier

pastel imp
#

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.

rotund egret
#

The thing about ponzi schemes is that not everyone is getting scammed, just the people on the bottom.

agile galleon
#

the benefits of crypto just get exploited by all the shit people in this world which makes crypto have a bad reputation

rotund egret
#

That might mean something

wind patio
#

yeah like

#

crypto is shit

agile galleon
#

i wouldnt say crypto is itself shit, just the people using it

wind patio
#

so that makes it kinda shit

#

imo

pastel imp
#

Just like Skript, the concept is cool, but the people that use it make it bad

#

or well, 95% of the people

storm kelp
lavish notch
#

Decentralised Currency isn't really Decentralised as well lol. Central places are often used like Bianance.

lone anvil
#

Hey guys

#

Anyone willing to help me?

#

In a plugin?

#

Something isn’t working in my code

inner umbra
lavish notch
inner umbra
#

I think you underestimate how many people have their own "network" running at home.

lavish notch
#

Noted

prisma wave
#

some random guy running a few hashes on their gpu is basically worthless

#

in both PoW and PoS systems

inner umbra
#

Wasn't talking about mining. Thats a whole other story lol

prisma wave
#

then what?

inner umbra
#

Currency storage

prisma wave
#

what… having a local wallet?

inner umbra
#

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.

prisma wave
#

correct me if im wrong but are they not like... the same thing

#

mining is how you keep track of transactions

#

by verifying hashes

pastel imp
#

yes

#

mining is verifying hashes

#

basically

#

and you get rewarded by verifying them

brazen ether
#

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

brazen ether
#

yes

wind patio
#

postgres vs mysql/mariadb for minecraft servers? pros cons?

pastel imp
brazen ether
#

public

#

alright thank you

#

I am not very experienced with web related stuff so was just looking for advice

pastel imp
pastel imp
wind patio
#

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

wind patio
#

no, for the server

pastel imp
wind patio
#

oh, well, own

pastel imp
#

because if it's for your own, then it changes a bit

wind patio
#

I suppose it's a question of whether the plugins support it

pastel imp
#

Well, in that case, yes, there are differences. MariaDB is seen as a more performant mysql in a nutshell

pastel imp
#

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

cinder flare
#

for like, a website or something, postgres is obviously far superior, but for mc stuff it doesn't really matter, just run maria

potent nest
#

SQLite

crude cloud
#

SQLDN

cinder flare
#

so sqlite wouldn't be very effective at that lol

crude cloud
#

symlink it evilhehe

half harness
oblique heath
brazen ether
oblique heath
#

you can implement it the same way you implement any webserver backend, and use any hosting provider to run it

brazen ether
#

any free ones you recommend?

oblique heath
#

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

brazen ether
obtuse gale
#

What are the most used cpus in minecraft server hostings? Im talking about performance

oblique heath
#

ryzen 5xxx or 7xxx are pretty popular i think

terse elbow
#

why do i not have permissions to change my name in this server

pastel imp
#

because you don't? uh?

#

I think it's mainly for safety reasons?

rotund egret
#

I don't have cinematics, I exclusively use live action shots for any of my ads

wind patio
#

I use live action shots for in-game stuff

rotund egret
#

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

brazen ether
surreal garnet
quiet sierra
mellow coral
#

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).

brazen ether
quiet sierra
#

well I did it with retextured golden apples

#

And a lot of emulation

quiet sierra
#

But you basically just want to push stuff to an InfluxDB database and render stuff

slate elk
#

hello everyone

#

long time

#

tony falk is back

#

😮

plucky heron
#

Does anyone know how to setup deluxe tags with Luck Perms?

mellow coral
#

on a public view for all to view

brazen ether
#

and nbt

#

and also has completely custom eating times

pastel imp
brazen ether
#

the rust propaganda is filling my feeds and it is workin

#

should i learn it

rotund egret
#

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
cobalt marlin
rotund egret
#

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

cobalt marlin
potent nest
#

low level or not doesn't really matter, but you need to understand type systems

rotund egret
#

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

potent nest
#

Rust has more than enough OOP features

rotund egret
#

Sure

crude cloud
rotund egret
#

FFI and then sure

potent nest
crude cloud
#

💪 💯

dry coral
#

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?

wind patio
#

use a messaging (producer/listener) system such as apache pulsar, rabbitmq and whatnot

#

imo

agile galleon
#

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

rain halo
#

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

dry coral
#

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

dry coral
pastel imp
#

mariadb does the job fast

dry coral
#

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

pastel imp
#

what's up with people loving nosql nowadays xD

pastel imp
dry coral
#

It's really good for something that might have many new features added

dry coral
#

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)

pastel imp
#

make sure to secure it though ¯_(ツ)_/¯

dry coral
#

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

pastel imp
# dry coral <@310721759110496257> you dislike nosql?

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

dry coral
#

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

pastel imp
#

Yeah, although that is also why you usually deploy stuff to a dev env.

dry coral
#

Ofcourse haha

pastel imp
#

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

dry coral
#

True, I guess it depends on use case

pastel imp
#

You may be able to do it programatically but there is a huge advantage if its done directly in the sql

dry coral
#

It is quicker tbh

#

which is a good point

agile galleon
#

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

dry coral
#

Hm why vault?

agile galleon
#

Because it's not async

dry coral
#

ouch right

agile galleon
#

I implemented some careful caching on each server

dry coral
#

in what sense

agile galleon
#

And for your use case a messaging thing to update each server's cache when a transaction happens

dry coral
#

Right but sounds kinda silly to update cache on a server that the user isnt playing on

agile galleon
#

True

#

Just maybe you have cross server transactions

dry coral
#

Scariest thing is that the http server will hang (or crash) and cause the server to literally die

agile galleon
#

Make it redundant or maybe self rebooting idk

dry coral
#

I think timeouts + auto reboot should solve that

pastel imp
agile galleon
#

No

pastel imp
#

it is a solution

#

instead of using Vault is smt like Treasury

#

way better

flint crow
#

???

#

whats the issue w vault

#

💀

agile galleon
#

If all required plugins had support for that hahah

agile galleon
flint crow
#

ac_cat_approval correct

agile galleon
#

basically

rotund egret
#

Vault is something that should've been in the api blessed be SpongeAPI

pastel imp
agile galleon
#

okay?

#

doesn't help the case though

pastel imp
#

you can always ask them to support it xD

agile galleon
#

"what's Treasury"

#

"Vault isn't bad"

pastel imp
agile galleon
#

"Get off of my lawn you creep"

#

"Don't have time"

#

"The plugin is abandoned"

pastel imp
flint crow
#

OKK why does vault need to be updated

rotund egret
#

Vault doesn't support multiple currencies does it?

agile galleon
#

lemme explain

agile galleon
#

vault is so simple you could make it in an hour

rotund egret
#

Hardly a fault

agile galleon
#

if you think about whats missing it is

wind patio
#

would there be any issues if one would replace Vault with Treasury? Say missing balances or smt

rotund egret
#

It's years old, it had everything it needed for its time fwiw

pastel imp
#

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.

pastel imp
#

it can actually work side by side with vault though

wind patio
agile galleon
#

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

rotund egret
#

spongehero Sponge stays winning

pastel imp
#

The issue is that vault is too popular. If people pushed for Treasury or similar, god, the world would be a better world.

agile galleon
#

this ^

#

or if Spigot marketplace finally died and not 80% of all customers would buy from a platform where Spigot dependency is mandatory

pastel imp
rotund egret
#

I thought you said it was new

pastel imp
#

oh yeah, it's also multi-platform

pastel imp
agile galleon
#

its not new

rotund egret
#

That's what I said

pastel imp
#

I mean

agile galleon
#

nobody claimed so?

pastel imp
#

it's from 2023

#

not that old lol

rotund egret
#

True

agile galleon
pastel imp
#

hasn't gotten updated in 7 months but it's not like these types of stuff require that many updates.

pastel imp
rotund egret
#

Let it sit for 7 years and it'll be mature enough

pastel imp
#

doubt it

#

people/devs are too brainwashed rn

rotund egret
#

True, use Sponge spongemas

pastel imp
#

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

pastel imp
#

it also explains why Treasury is so much better lol

#

oh yeah forgot treasury also has transaction history

cinder flare
#

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

rotund egret
#

Your cursed code for the day

//Kotlin 1.3 :(
fun <T> Optional<T?>.getOrNull(): T? {
    return try {
        orElseGet(null)
    } catch (e: NullPointerException) {
        null
    }
}```
crude cloud
#

uhh

#

why would that....

#

I'll just forget about it

rotund egret
#

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

crude cloud
#

hear me out

rotund egret
#

Or just use an if statement and isPresent

crude cloud
#

orElse(null)

rotund egret
#

but that's so much cooler

#

kt 1.3 emi

#

😦

crude cloud
#

what about it

rotund egret
#

Doesn't have that method

#

or java8 I guess idk

crude cloud
#

but Optional isn't from kotlin, isn't it?

rotund egret
#

Sucks to be this low

#

Wait I stg orElse wasn't there before

#

What was I using then

crude cloud
#

it's been a thing since Optional day 1 lol

rotund egret
#

I must've had a weird build issue then or something, I was looking for this thing for like 10 minutes

crude cloud
#

at least it wasn't an hour

#

... right?

rotund egret
#

oh wait getOrNull is what I was looking for

#

Which kotlin I think provides

#

Which is why I got mixed up

crude cloud
#

a

rotund egret
#

b

rotund egret
crude cloud
#

right

rotund egret
#

I did spend an hour beating kotlin back into 1.12.2 trying to figure out how cursed my gradle build needed to be

dry coral
#

Though in general player data makes more sense for a non relational db where im just storing key value pairs

cinder flare
#

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

pastel imp
#

usually not recommended to store json (at a big scale like all player data) in a table

#

for that use columns for each

dry coral
#

I mean

#

Once you store json

pastel imp
#

using json in sql also removes several features

dry coral
#

you literally have no use in sql

pastel imp
#

yesish

dry coral
#

Might as well just use nosql

rotund egret
#

The trick is to store a mongodb reference in the sql stable so you can lookup json data

pastel imp
#

you still have a stable and fast way of accessing them

#

but at that point

#

just use mongodb with indexes

dry coral
#

Yeah exactly

pastel imp
#

but I personally think storing data in json (whether it is stored in sql or nosql db) is bad practice.

rotund egret
#

Cursed behaviors are best though

ocean quartz
#

Storing json in sql is fine depending on how you do it

pastel imp
dry coral
#

Yeah well if its your whole player data its stupid

pastel imp
#

kinda goes against the whole idea of a table at that point xD

dry coral
ocean quartz
#

"not ideal" depends a lot on what exactly you're storing

pastel imp
dry coral
#

Why

#

I havent seen a good reason as to why yet

pastel imp
ocean quartz
#

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

pastel imp
dry coral
#

What does SQL get me that fits my use case

ocean quartz
#

98% is very wrong, I can think of many many cases that it is very useful

pastel imp
#

there are several good ways to use skript

#

yet 98% use it the wrong way

#

lol

pastel imp
#

stupid example but you get the point

dry coral
#

None of these help with the use case

#

Its features I dont need

pastel imp
#

questionable actually, I would argue you are doing some things programatically that could be done in sql directly

dry coral
#

Probably

ocean quartz
#

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

crude cloud
pastel imp
#

feels like this is a whole lot similar to the whole "what's the best IDE" topic lol

dry coral
#

I think its an interesting topic

#

I could never figure out which use case fits which DB

ocean quartz
#

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

pastel imp
#

For things that are permanently updated, sure, making a query every second is not ideal

ocean quartz
#

What

dry coral
#

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)

prisma wave
#

caching is more for network conditions than anything else

#

and scalability

dry coral
#

What would be the pros of each DB in this case

cinder flare
#

if your data is always going to be stored and accessed together, it can be extremely useful and performant to store JSON blobs

ocean quartz
cinder flare
#

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

dry coral
pastel imp
prisma wave
crude cloud
#

erm but what about the case where your data sucks dick? it is extremely non performant

cinder flare
pastel imp
ocean quartz
#

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

cinder flare
#

Like, I wouldn't trust basically any NoSQL database to store any data I care about

cinder flare
#

besides maybe Mongo just because it's been out so long, but meh

dry coral
cinder flare
#

every time i think of Mongo, I think of "MongoDB is web scale"

prisma wave
#

MongoDatabase

#

songoda

dry coral
#

No not hardly

pastel imp
cinder flare
#

you can have JSON implementations that don't allow invalid JSON

#

and like, it's just one tool in the toolbox

dry coral
#

Like a fixed json schema!

cinder flare
#

if you're always going to be serializing/deserializing it anyways, it's no problem to store it like that

dry coral
#

?

cinder flare
#

yeah sure

dry coral
#

I think SQL suits more for predictable data

#

Thats my issue with json blobs

#

You dont know the length

cinder flare
#

I mean I guess I'll put it this way

#

I don't trust anything else to store my data reliably

pastel imp
#

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

dry coral
#

I mean

#

I have a question

cinder flare
#

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

compact perchBOT
#

There is no time to wait! Ask your question @dry coral!

crude cloud
#

There is no time to wait! Ask your question @dry coral!

pastel imp
# dry coral You dont know the length

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"

dry coral
#

Thats my point

pastel imp
dry coral
#

Ah I was speaking about json blobs in an sql table

pastel imp
#

the whole argument of "predictable data" is not valid imo

prisma wave
#

i have a question

compact perchBOT
#

There is no time to wait! Ask your question @prisma wave!

pastel imp
#

since you still have to specify the format if you want to properly serialize it afterwards.

rotund egret
pastel imp
#

in both cases, you, the developer, have to know what data is going to get stored.

prisma wave
pastel imp
#

lol

dry coral
#

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

pastel imp
#

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

dry coral
#

I say this coming from someone who all day works with SQL

pastel imp
#

now I hardly use nosql

dry coral
#

At work

#

Im trying to get a different perspective

pastel imp
#

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

dry coral
#

I guess I’ll make my point clearer

pastel imp
#

and it has quite an affect on how optimized queries are going to be too.

dry coral
#

For minecraft I think people blindly go to SQL for no reason

pastel imp
#

false.

ocean quartz
#

I am yet to see an instance where query optimization matters

pastel imp
#

The MAIN reason people go with sql in minecraft is because 99% of mc hosts provide a free mysql db

#

that's straight facts

crude cloud
#

wat

dry coral
#

I think I want to understand more how you know you’re going with the correct DB

pastel imp
crude cloud
#

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

dry coral
#

I think something like player data storage

pastel imp
dry coral
#

Suits nosql

pastel imp
#

At the end of the day, if you are not a big corporation, you go with what you feel most comfy with

dry coral
#

Because all I want is to query a UUID and get all player data

dry coral
#

And for sql option 1 is to build clunky queries yourself, or option 2 is to use ORM which is bloat

pastel imp
dry coral
#

Ttue

#

True

#

I think its a mix

pastel imp
#

I mean, you could in theory always use both

#

when in doubt, use both

#

xD

dry coral
#

Agreed

crude cloud
#

you should use C structs and save their memory contents directly to a file

dry coral
#

Lmao

pastel imp
#

dies

crude cloud
#

just wait until you find out that's technically UB :^)

pastel imp
#

lol

ocean quartz
#

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

pastel imp
#

interesting

cinder flare
crude cloud
#

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)

cinder flare
#

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

crude cloud
pastel imp
dry coral
#

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

crude cloud
#

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

cinder flare
#

yeah or like use an ORM

ocean quartz
pastel imp
#

wait

crude cloud
#

i kinda wanna try jb exposed out

pastel imp
#

brain bugged there

pastel imp
#

:-:

#

brain froze there

dry coral
#

Felt like a lot of bloat and clunkiness

#

I mean on one hand its nice

pastel imp
#

ever tried jooq?

cinder flare
#

yeah Hibernate kinda sucks

dry coral
#

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

rotund egret
#

exposed is kinda nice

pastel imp
rotund egret
#

Emi brought it up, but yes

dry coral
#

Overall nice, just dislike how difficult it is to debug. ORM itself is also pretty slow and inefficient

pastel imp
#

I dislike ORMs personally tbh

cinder flare
#

idk I'm more into like Django ORM or Laravel Eloquent

ocean quartz
#

Exposed is pretty nice, but still waiting on composite keys 😔

pastel imp
#

Hence why I am going to be doing my own sql library sometime after exams

crude cloud
#

composite dn

pastel imp
#

also mainly for learning purposes but yeah

dry coral
#

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

cinder flare
#

many bugs? lmao

rotund egret
#

6 at least

pastel imp
#

lol

dry coral
cinder flare
#

I can hardly think of many times I've had bugs from ORMs

#

mostly just weird query plans or performance issues

dry coral
#

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

pastel imp
#

wait even with an on update cascade constraint?

cinder flare
#

Yeah I haven't had issues like that

#

Django ORM and stuff just automatically manages relations like that

pastel imp
#

oh ok

dry coral
dry coral
cinder flare
#

yeah I've really liked my experiences with Django ORM and Laravel Eloquent

#

and a bit of Symfony's ORM

dry coral
#

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?

pastel imp
#

I suppose you would and every x time update it?

#

a bit tricky

cinder flare
#

I mean I would have a write through cache for that

dry coral
#

Right but it could get out of sync the second 2 servers have their own local cache

cinder flare
#

update the redis value + store to DB bulk

pastel imp
#

^^

dry coral
#

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

pastel imp
dry coral
#

Feels hacky

pastel imp
dry coral
#

No issue

pastel imp
dry coral
#

Looking for feedback

pastel imp
#

ah

dry coral
#

Like trying to see

#

Maybe I should just ditch it and stick to straight up db write/read

pastel imp
#

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

dry coral
#

I mean

#

could sign it

#

and then verify it

pastel imp
#

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

prisma wave
#

maybe more

gusty fulcrum
#

.

dawn hinge
#

.

long dagger
#

.

crude cloud
#

.

prisma wave
#

.

ocean quartz
#

⦿

potent nest
#

🌚

crude cloud
prisma wave
#

ahh clojure moon

#

a relic of a bygone era

agile galleon
#

Does anybody use clojure?

prisma wave
#

some people do yes

#

it's reasonably popular for like backend development i believe

pastel imp
#

oh wait its a programming language?

#

I am confused

prisma wave
#

it is yes

#

mixed with the 🌚 emoji

rotund egret
#

Johnny is the only person that uses it

agile galleon
#

Pretty much

prisma wave
#

johnny and walmart

cinder flare
#

the two genders 😌

pastel imp
cinder flare
#

lmao

rotund egret
#

Multi-module jitpack is neat

mental locust
#

why tf am i services mute?

wind patio
#

skill issue

sly sonnet
#

imagine

#

#cancelled

rotund egret
ocean quartz
long dagger
#

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)

cinder flare
#

definitely make one runnable and iterate through the players

#

preferably async, if possible

inner umbra
#

If async you might as well do your own threading. Better control.

cinder flare
#

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

inner umbra
#

Up to him really. Just throwing out the option.

cinder flare
#

lmao

long dagger
#

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?

cinder flare
#

i'm pretty sure it's a radius

#

so the box will be 20x20x20

long dagger
#

yeah that is what I thought, but the documentation said it used a bounding box (can a bounding box be a circle?)

long dagger
cinder flare
#

can't be a circle in minecraft lol

long dagger
#

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

cinder flare
#

a rectangular bounding box

#

not sure on the outside thing

long dagger
#

I give up

#

I am just gonna make my own nearby entities function that does it how I want lmao

cinder flare
#

oh duh it's a square

#

pythagorean theorem

#

max is ~14.14 in the corner

#

@long dagger lmao

long dagger
#

bruh

#

I said that

#

but that was to big

long dagger
#

10*math.sqrt(2) = 14.14

cinder flare
#

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

long dagger
#

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

inner umbra
#

If you want it done async you have to make your own.

long dagger
#

I also want it a circle

#

so yeah...

cinder flare
#

oh well

#

good luck i guess lol, gonna be a lot worse optimization wise

cinder flare
long dagger
#

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)