#development

1 messages Ā· Page 74 of 1

dense galleon
#

I'm already using hikari

merry knoll
#

that way your core does not need to know about any other implementation details

#

it just provides the connection and everything stays easy to remove if need be

#

as for what you want to do, all you have to do is to have a main table with all the core data

#

with uuid as primary key

dense galleon
#

I still want to try doing what I was saying in that wall of text, even if it isn't the most efficient way I just really want to try it out lol I just like the idea of handling it like that

merry knoll
#

and side tables for other plugins

dense galleon
#

I know there is countless other ways to do it

dense galleon
merry knoll
#

uuid as foreign key and you are set

dense galleon
#

I just wanted to try doing it that other way

merry knoll
#

for what you want to do, mongo might be the best if you are set on it

dense galleon
#

I don't think I got what I wanted to do across since it barely requires any SQL related stuff 🄲 it's oki I figured it was way too complicated to explain after I wrote 5 paragraphs haha

#

The database stuff I would look into later, now I am struggling Java wise

merry knoll
#

nah, i got what you want to do its just that sql is well structured

torpid raft
#

you want to delegate db stuff to your core plugin instead of letting each plugin do it for themselves

merry knoll
#

and what you want to do kinda goes against that

dense galleon
#

And that is what I am trying to do now

#

The database stuff I will do afterwards

torpid raft
#

if you're really stuck on having your generic player info map store, i'd recommend using a String,String instead of String,Object if possible

#

and maybe even consider using Redis for that

merry knoll
#

i would go with a custom object with hashing

#

rather than string

dense galleon
#

Yeah I had an AdditionalData object at some point

torpid raft
merry knoll
#

no, i would hash a "key" object

#

maybe to player

dense galleon
#

The issue though I am experiencing mainly is that

#

I want my smaller plugins to be able to call a registerAdditionalData() method to let my core plugin know "hey, plugin X is going to use the map to store String, Integer and String, Timestamp" or something

torpid raft
#

i dont see too much reason to hash a key object tbh, unless you are trying to align the database and make it ultra storage efficient

dense galleon
#

But I don't really know how to go about that

torpid raft
#

but tbh idk how much benefit hashing even gives you with that

#

i'd personally rather have a human readable name

merry knoll
#

Something like: each player data holds a map

#

that is hashed to a class type to - value

#

and you can hold column names in a seperate map if you need to

torpid raft
merry knoll
#

and avoid the whole string fetch etc

dense galleon
#

Like, I'd want that map to be populated with a bunch of 'default values' through different implementations of that registerAdditionalMethod() by other plugins

dense galleon
torpid raft
#

i dont think itll be easy to protect people from their own mistakes ngl

dense galleon
#

Yeah but there must be a way to turn this into some kind of registration system, where each plugin registers a set amount of additional data onto that map in their onEnable()

torpid raft
#

i think requiring a registration will make things a lot more complicated than it needs to be

merry knoll
#

i mean you could have the best of both worlds

#

and make your registration create a new table internally

torpid raft
#

however i do think being able to set defaults for a key is reasonable

merry knoll
#

you just dont do it each time

#

instead of the put everything in one table angle

dense galleon
#

I don't like the idea of having 20 smaller plugins with 20 different tables though in all honesty

merry knoll
#

that is what sql is made for

#

also allows you to avoid a lot of nullable columns as well

torpid raft
dense galleon
#

I got 4 so far, I wouldn't know haha

merry knoll
#

another thing you need to keep in mind is that your plugins will need to query the whole table

#

each time

#

even when they might not need to store the data half the time

dense galleon
#

Not if the data is all stored inside of the core plugin

#

Whichever the solution is, I want all SQL related code only in my core plugin

merry knoll
#

yes you can do that

dense galleon
#

And Hikari

#

Anything to do with the database or SQL I really want to just keep in my core plugin

merry knoll
#

you can avoid all sql in dependent plugins while also not making an uber table

#

what you should do to achieve that imho is to have a data class per plugin

#

and make your core handle the sql from those data classes

dense galleon
#

Would it consist of serializing data files into jsons and creating a parser in my core plugin to store the serialized data into the database as separate columns?

merry knoll
#

i would do tables

dense galleon
#

No I meant like

merry knoll
#

all you have to do is to relate tables to each other with keys

#

and your other plugins just need to provide a data class - use fetch methods

#

that take a type variable

torpid raft
#

tbh separate tables per plugin are gonna be really annoying the more i think about it

#

imagine the pain when you have a plugin that wants to alter its schema

dense galleon
#

Right now I got two tables: PlayerData and PlayerSettings

#

And they're used by the four plugins

#

If 6 plugins have "settings" to tweak and "data", I feel like having two tables per plugin containing maybe 1-2 columns would get kinda tedious

merry knoll
#

with how you want to use sql

#

you really should look into mongo imho

#

its effectively json as a database

torpid raft
#

true, this seems like a pretty decent usecase for mongo

merry knoll
#

each player can have different settings set or just not have it

#

or different data set

#

no structure needed

torpid raft
#

you want to store very high variance data between your different plugins

#

and access it from one place

merry knoll
#

albeit you can provide it to make queries faster

dense galleon
#

Sunk cost fallacy though

#

I spent hours learning SQL : ')

merry knoll
#

with mongo you dont really do much

#

other than provide data classes

#

you can just have this for example

dusty frost
#

I mean you can just store JSON in a SQL database lol

#

glorified key-value DB but meh

dense galleon
#

I think I just gotta look into this with fresh eyes tomorrow, I don't really think I will ever be able to explain what I am trying to achieve so I will just need to keep at it 🄲

merry knoll
dusty frost
#

yeah lol

#

then just serve out map lookups lol

dense galleon
#

I just really liked the idea of my plugins registering their own data types which the core plugin would store in the PlayerData class to then be stored on the database

torpid raft
#

if he wants String,Object then it might get pretty lengthy

dense galleon
#

As much as it may be more complicated

torpid raft
#

depending on what plugins decide to store

merry knoll
dense galleon
#

The objects would just be integers and timestamps I'm pretty sure

dusty frost
#

I mean how much player data could there be lol

#

I just use LuckPerms meta for my player data needs

#

nickname, tag, etc.

dense galleon
#

Though again, the main thing I was struggling with is coming up with a "registration" system

merry knoll
#

just a map

torpid raft
dusty frost
#

yeah just namespace the keys lol

dusty frost
dense galleon
#

Yes but I also want to prevent additional objects to be inserted in the map once the server has fully loaded

torpid raft
merry knoll
#

map to settings class type

#

wdym fully loaded

dense galleon
#

Once all the plugins have loaded

merry knoll
#

do what papi does

dense galleon
#
  1. Core plugin loads, with the PlayerData class and the empty additionalData map
  2. Other plugins load, and populate the additionalData map with their own pairings of keys and default values
  3. Once the server has fully loaded and all plugins are too, this map should become immutable and only allow for existing values to be updated
merry knoll
#

run a task to run 1 tick later

#

and set an internal variable closing sign ups

dense galleon
#

I don't get what that would do

merry knoll
#

server starts ticking

dense galleon
#

The issue is adding to the map and then making it immutable later on

merry knoll
#

after plugin loading is done

#

you just wrap your map in a class

#

and close set access

dense galleon
#

Right

#

But then I wonder

#

This register method, would it be in my PlayerData class?

#

That feels like it would go against the single responsibility principle

merry knoll
#

no, single responsibility

dusty frost
#

what lol

merry knoll
#

register in the map wrapper class thing

#

whatever you name it

#

honestly you are just reinventing orms

dense galleon
#

Riight okay so I'd have to make a map wrapper class

merry knoll
#

way worse

dusty frost
#

you're thinking too ahrd about this lol

dense galleon
#

I am sure that when I try writing it tomorrow I will run into some other issue and realize I didn't explain myself properly

#

I think I just need to sleep lol

#

For database storage though, the idea was that once the server has loaded before actually loading data from the tables I'd be modifying the query based on what data the map found inside of PlayerData contains

dusty frost
#

i mean you're not gonna be dynamically adding columns lol

#

in like, any case

dense galleon
#

I mean whenever a new plugin pops up or I add new functionalities to an existing one

dusty frost
#

you still wouldn't add a column?

#

that's just weird

merry knoll
#

i feel @dusty frost's dump everything into a map -> serialize and dump into db - deserialize is the laziest and fastest way to get what you want

dusty frost
#

^

#

not really worth doing more honestly

dense galleon
dusty frost
#

like your query wouldn't change

dense galleon
#

If my plugin suddently has a new setting, i'd need to add a new column to keep track of that new setting for all players no?

merry knoll
#

i think they want to dynamically select columns

dusty frost
#

you should not have a column per setting bro

merry knoll
#

depending on whats loaded

dusty frost
#

yeah i mean i get that but that's not very smart lol

dense galleon
#

Something like show players on or off

merry knoll
#

giga settings map per player

dusty frost
#

^

merry knoll
#

that gets serialized into json

#

and dumped into db

dusty frost
#

it's a huge waste of space to store a boolean in a db column

#

especially a lot of em

dense galleon
#

Is that humanly readable though

dusty frost
#

never seen JSON? lmao

dense galleon
#

No I mean

#

Inside of the column itself

merry knoll
#

why are you reading dbs manually anyway

dense galleon
#

Idk it's kinda satisfying

dusty frost
#

you just store JSON in the db column lmao

dense galleon
dusty frost
#

what lol

tight junco
merry knoll
torpid raft
tight junco
#

you could store it in bytes if you must, human readability matters nothing very little

dense galleon
#

I'm just going to sleep, I'm either getting a psychosis or what I am doing is beyond human comprehension in this instant

tight junco
#

its psychosis

dusty frost
#

yea what lol

#

i think you have a fundamental misunderstanding of what a database is lol

#

you can just like, store a string in there

#

most DBs also have dedicated JSON types

dense galleon
#

not me getting a first in my database module last year

#

I know what you meant, I just don't like how a stored json would look like in a database interface

#

I am aware there is a million better ways to go about most of this stuff, and that what I want to do is not the most efficient or smartest, it's just a challenge I am setting myself

dusty frost
dense galleon
#

And I was struggling to grasp how to implement a registration system for the map

dusty frost
#

like JSON does

terse osprey
#

JSON 🤢 , .txt with scanners šŸ˜Ž

dusty frost
#

when you read it

tight junco
#

i challenge myself to jump off a bridge

merry knoll
tight junco
#

might not be efficient but its a challenge

merry knoll
#

and sql stores bools as 8 bit? like why

dusty frost
#

yea

#

everything is byte sized yk

dense galleon
#

How significant is that though

merry knoll
#

each bool takes 8x the size it needs to

#

effectively

#

does it matter for your use case? probably not

dense galleon
#

a byte each, I'd need like a million users to feel that

dusty frost
#

i mean yeah but just the overhead

#

having like a hundred columns and stuff is way worse

dense galleon
#

I know I could store the json but I just find it way cleaner to separate the data per column even if it occupies more space

dusty frost
#

a compact single-column serialization format for the supremely non-relational data you're storing is the way to go

dusty frost
#

you're not storing relational data

#

in a relational database

merry knoll
#

i mean they are doing relational data

#

they just wanna put all of the data in one place for some reason

dusty frost
#

i mean singular settings aren't very relational lol

torpid raft
#

i wouldnt consider it relational yeah

dusty frost
#

the plugin partitioning is just organizational

torpid raft
#

where are the relations?!!

dusty frost
#

doesn't make it relational

dense galleon
#

It's not a singular place, i'd be splitting the data manually between tables based on their use instead of based on what plugin they come from

dusty frost
#

wtf lol

dense galleon
#

I give up

dusty frost
#

that is so not a good idea lol

dense galleon
#

I'll just try figuring it out myself and see what happens

dusty frost
#

i mean if you want some inspiration, look at how like GTA Online does it

#

they load like 500MB of JSON at startup for a bunch of stuff

#

if they can get away with it, you surely can lol

dense galleon
#

All this talk is just making me more confused

merry knoll
#

causing 10 min load times

dusty frost
#

yea something like that lol

dense galleon
#

Why is it not a good idea to store data based on its use instead of where it came from, if it all goes through the same plugin anyway and is all stored in the same plugin roof

#

Too*

dusty frost
#

it's not a good idea to make a bunch of random tables lol

dense galleon
#

They’re not random though

merry knoll
#

then you have plugins that circularly depend on each other as well

dusty frost
#

the whole point of this "core" plugin is consolidation and centralization

dusty frost
merry knoll
#

i never got the point of core plugins

#

isnt going modular way better anyway

dusty frost
#

I didn't either lol, but people seem to like em

dense galleon
#

I like the idea of keeping as much common code inside of a core plugin

merry knoll
#

i get putting all shared dependencies

dusty frost
#

nah I just use the Spigot library loader

dense galleon
#

I got a crap ton of util methods in there as well

dusty frost
#

gonna swap to the Paper library loader soon and use a locally hosted mirror and everything

dense galleon
dusty frost
#

I mean yeah you don't seem to have very relational data lol

#

like you just want a per-user map essentially it seems

merry knoll
#

mongo would be ideal honestly

dusty frost
#

which would be best served with yeah a non-relational databse

#

but if it must be MySQL or adjacent, then a JSON column would work wonders

tight junco
#

i make a new database for each player wicked

merry knoll
#

its driver is effectively an orm as well

#

so you dont need to touch anything either

tight junco
#

9f7cf461-903f-4ef8-8a88-bdbc49806364.db goes hard wicked

dense galleon
#

Is it not relational cause it’s too few tables that aren’t really related to each other other than the primary key?

dusty frost
#

It's not relational because that's not relational data lol

merry knoll
#

its not relational because its not relational

dusty frost
#

it's all just miscellaneous key-value pairs namespaced per user

dense galleon
dense galleon
tight junco
#

hot sexy fly and beautiful

#

yes we are

dusty frost
#

I mean like I don't know how else to describe it lol

dense galleon
#

(Forgot to turn off ping on my phone sorry)

dusty frost
#

like it just isn't the right kind of data to be stored in a relational database lol

#

It doesn't use the strengths of the design at all

dense galleon
#

The String in the maps would be the name of the column

#

And the value would be the value

#

Map*

dusty frost
#

Yeah that's key-value data

#

Not relational

dense galleon
#

But how’s that different than a plugin having 10 different columns with values

dusty frost
#

I mean the point is the relations between the tables

#

Key-value user setting data is never going to be relational

torpid raft
dense galleon
#

I don’t get how 10 plugins having 10 separate tables with key value pairs would be more relational than 10 plugins using 5 tables all together

dusty frost
#

I mean it's not

dense galleon
dusty frost
#

lmao

dense galleon
#

In my plugins at least

dusty frost
#

yeah yet another MongoDB would be better

#

if you don't even know what relational data is then you probably shouldn't be using a relational database

dense galleon
#

I can see how it could be useful in other real world applications but for Minecraft plugins I don’t really get it

merry knoll
#

in your case what you gain is modularity

dusty frost
#

Like for instance, say you have a train network. You would have a table for Train, a table for Passenger, a table for Station, a table for TrainRide, etc.

merry knoll
#

arbitrarily bundling data is just a bad idea

dusty frost
#

and they all interconnect very well

dense galleon
#

Yeah I know how it can apply in the real world

dusty frost
#

I mean I've literally done that exact scenario lol

dense galleon
#

I just don’t get how it applies to a Minecraft server though

dusty frost
#

for a train plugin I wrote for fast travel

#

and then later I realized how overengineered it was, and just moved to yaml configuration and storing ride data in JSON blobs

torpid raft
dense galleon
#

I don’t want to rewrite half my stuff to switch to something else fml 🄲

dusty frost
#

etcd šŸ’€

#

I mean Mongo would literally be perfect for this lol

#

could easily dynamically add columns, etc.

dense galleon
#

Is that a bad thing? Using mongo?

dusty frost
#

I mean for this not really

#

Especially if it's just for your own stuff, then it's basically perfect

dense galleon
#

It feels like a downgrade

dusty frost
#

It's a major upgrade for the data you want to store lol

#

You wouldn't need to dynamically migrate new columns and shit

#

you literally just store JSON raw and it loves it

dense galleon
#

(I don’t want to store raw jsons… :,,,)

dusty frost
#

You probably should be lol

#

That's the kind of data you have

dusty frost
#
{
  "flag": true,
  "username": "fjdklafjslk",
  "otherFlag": false,
}``` etc,
dense galleon
#

Is Mongo a solution to my stubbornness or a solution to my server ecosystem

#

That’s what I mean

dusty frost
#

a non-relational database is the best way to store non-relational data

#

and based on what you have been saying, it seems like you will not be having any relational data any time soon lol

dense galleon
#

Are non-relational databases looked down upon or something? I don’t wanna be at a point in a few months where I heavily regret using mongo and seeing people being like ā€œomg he used mongo what an idiotā€

#

(It’s happened in the modding community a lot, stuff like this)

dusty frost
#

I mean a little bit

#

But Mongo has grown a lot since the olden days

#

and like, I heavily abuse Redis for my server stuff

dense galleon
#

(Where I’d be told to use api X or library Y and then weeks later be told that it sucks etc)

dusty frost
#

I mean the kind of stuff you're storing doesn't benefit from the strict constraints of a relational database

merry knoll
#

if you want to do heavy queries over data = sql

dusty frost
#

so freeing yourself from that, either through a JSON column or through Mongo, would improve your life lol

merry knoll
#

otherwise stuff like mongo works fine

dusty frost
#

yeah like you're not going to be having millions of rows or anything

dense galleon
#

Is there a library similar to Hilary for mongo?

#

Hikari lmao

dusty frost
#

the MongoDB connector library already does connection pooling

torpid raft
north robin
#

is the best way to store persistent data through restarts PersistentDataContainers or something else like config files?

hoary scarab
north robin
#

i wanted to store bounty amounts of players and top bounty claimers but i also wanna access it when theyre offline so i could either store that stuff on the world or use something else

hoary scarab
#

Bounty amount could be stored PDC but for everything you want to access offline I would go with files or DB

north robin
#

alright

dense galleon
#

Online I am reading a lot of people shitting on MongoDB, are we sure that is really what I need to use

#

Nah never mind I'm not using MongoDB, too many people seem to say it's bad

mellow pond
#

Are you making a public plugin?

dense galleon
#

nah

#

it's a 'core' plugin for other plugins on my server

merry knoll
#

mongo is "bad" because people are lazy and cant be arsed to set up proper relational schemas

dense galleon
#

I think I will end up having a table per plugin

#

I have figured out how to set up a registry system for data types

#

I will simply have PlayerData in my core plugin store all player data for all plugins, and additionally my core plugin will create the tables for each plugin itself and also insert the data for each plugin

#

Is it safe to do JavaPlugin.equals(JavaPlugin)?

#

There should be only ever one instance of each JavaPlugin right?

sterile hinge
dense galleon
#

it would be plugin1.equals(plugin2)

#

I have a list containing objects that use the plugin they come from and a string as an identifier

#

And to check for duplicates I check if the two objects come from the same plugin and have the same string

sterile hinge
#

Should be enough to check the name, the server can’t load two plugins with the same name

#

Though with reloading, any aspect of that might break randomly

dense galleon
#

It should right as only one instance of each plugin can exist

regal oak
#

how i can send a fake packet on tablist? (i could send a screenshot but cant)

merry knoll
ionic violet
#

Is deluxe-tags open source?

#

I was hoping to change the command from /tags to /titles, do some text changes, and add buffs to players when they have certain tags equipped.

#

I think the third one can be done with another plugin

broken elbow
# ionic violet Is deluxe-tags open source?
  1. No
  2. For /titles command, you can use the bukkit commands.yml file to create an alias and maybe block the /tags command.
  3. What messages exactly? I thought all plugin messages are editable in DeluxeTags.
  4. Probably what you said.
ionic violet
#

Any idea which plugin would be able to do number 4?

river solstice
#

would probably have to have a custom plugin for buffs

broken elbow
#

at least for the listener of tags changing.

#

yeah

ionic violet
#

I see...thanks!

river solstice
#

or write your own placeholder for the tag, that parses the current DT placeholder for the active tag and apply effects by using the returned value from DT fingerguns

ionic violet
#

it would still be nice to be able to listen for the event though

dense galleon
#

How can I check database performance?

#

Before I figure out how to optimize my code I wanna make sure it is worth optimizing yk

broken elbow
#

Well, I mean, determine what are the worst case scenarios, and test them

dusky harness
#

Also wdym check dB performance? Like the query times?

torpid raft
#

check decibel performance

pulsar ferry
digital temple
#

Does anyone know about the Maven shade plugin? I have a problem that my relocations don't work. Does anyone have an idea what I could have done wrong here? The specified packages from my side have been created. Nbtapi and inventory framework are not relocating

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.2.4</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <filters>
                    <filter>
                        <artifact>*:*</artifact>
                        <excludes>
                            <exclude>META-INF/*.SF</exclude>
                            <exclude>META-INF/*.DSA</exclude>
                            <exclude>META-INF/*.RSA</exclude>
                        </excludes>
                    </filter>
                </filters>
                <relocations>
                    <relocation>
                        <pattern>de.tr7zw.2.12.2.nbtapi</pattern>
                        <shadedPattern>de.lightplugins.skyblock.nbtapi</shadedPattern>
                    </relocation>
                    <relocation>
                        <pattern>me.devnatan</pattern>
                        <shadedPattern>de.lightplugins.skyblock.invframework</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
        </execution>
    </executions>
</plugin>
pulsar ferry
#

What task are you running to build the jar?

digital temple
#

i used the intellij builder

pulsar ferry
#

You are using maven you need to build with maven, run mvn clean package to shade

#

The jar should be put in the target folder

digital temple
#

can i share here pictures throw links ?

neat pierBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

digital temple
ionic violet
#

Oh also I wanted to ask does DeluxeTags provide events that I can listen for?

broken elbow
digital temple
#

i build it with java 17

pulsar ferry
#

Use a paste and send your entire pom

pulsar ferry
#

That looks incomplete

digital temple
#

mhh ? what is missing

#

is it, because i installed java 19 on the my maschine ?

pulsar ferry
digital temple
#

lol, good job hastebin ... 7529_KEKW

pulsar ferry
digital temple
pulsar ferry
#

For some reason you don't have the compile plugin in there

digital temple
#

i try to change the JAVA_HOME path to jdk 17

#

no success ._.

pulsar ferry
#

Oh wait

#

it does have it, ignore me lol

#

Update the version to 3.12.2

#

instead of 3.8.1

#

And shade plugin to 3.5.1

digital temple
#

Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.12.2

#
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.12.2</version>
    <configuration>
        <source>17</source>
        <target>17</target>
    </configuration>
</plugin>
pulsar ferry
#

Try 3.12.1

digital temple
#

worked

#

maven in a nutshell haha

pulsar ferry
#

Yeah :')

#

Is it compiling fine now?

digital temple
#
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.056 s
[INFO] Finished at: 2024-02-20T20:49:32+01:00
[INFO] ------------------------------------------------------------------------`

yes

pulsar ferry
#

Huge ;p

digital temple
#

thanks Matt ♄

ionic violet
#

rip

digital temple
#

alrtight, build succeed but get this error on startup xd

pulsar ferry
#

Make sure you're getting the right jar, I haven't used maven in a while but it might create 2 jars, take the bigger one

digital temple
#

its now 5 mn, way to huge i guess

dusky harness
#

i see you're using 1.20; if inventory framework, hikaricp, mariadb, and slf4j are on maven central, you can use spigot libraries system

#

spigot downloads it automatically, so your plugin doesn't need to shade it

#

a super nice feature but not very well known

broken elbow
#

wasn't it like super bad when it came to different versions of the same library?

dusky harness
#

oh not sure
I also just remembered that it breaks maven central tos or smth

#

🄲

dusky harness
dense galleon
#

Does changing the name tag of a player require packets?

dusky harness
#

can't you change the player's displayname

dense galleon
#

Yeah but that changes the chat name

#

Not the death message/above head name

dusky harness
#

death message? that'll probably involve a listener
for head name, yeah ig probably packets

terse osprey
dusky harness
#

or something with scoreboard maybe?

dense galleon
terse osprey
#

No, I tried for quite awhile with the NMS route (I prefer nms for certain applications) but don’t remember what exactly the issue I ran into. Plus this method allows you to add multiple lines without much more hassle if you want

dense galleon
#

I see

terse osprey
#

There are some extra handlers you’ll have to add for this application off the top of my head

  1. Add to player on load in
  2. Remove from player on exit
  3. Remove and re-add when a player tries to TP (you can’t teleport if you have passengers)
#

But one bright side, TextDisplays can’t be seen through walls (on Java)

turbid hornet
#

how save and load a hashmap

#

public HashMap<Player, Integer> data = new HashMap<>();

rugged bane
rugged bane
broken elbow
#

chose a database you want to use and google how to save data to "x" database using java

digital temple
#

and make sure to use async functions for database related stuff

broken elbow
#

save them where?

digital temple
#

your hash map is saved only in memory. If you restart your server the list is empty

turbid hornet
#

for example data.yml

digital temple
#

so just do it xd

broken elbow
#

well then you have chosen your database. your database are yaml files

digital temple
#

he can just use FileConfiguration from bukkit

turbid hornet
digital temple
#

first you must create your data.yml

dusky harness
digital temple
#

and load this file on server start

turbid hornet
#

What is easy treatment and the best database?

digital temple
#

best database is still mysql

turbid hornet
digital temple
dusky harness
#

ummmm I wouldn't recommend that right now

digital temple
#

I don't know how much experience he has with programming tbh, but i always recommend to use hikari as datasource

pulsar ferry
digital temple
#

if its finlal, he cant change the values inside

dusky harness
digital temple
#

oh you got right, i missreaded the last answer xd

pulsar ferry
rugged bane
digital temple
dusky harness
#

which nbtapi isn't

digital temple
#

alright saw this Add the API as dependency to your plugin.yml

dusky harness
dusky harness
digital temple
#

so i must install nbtapi on the server ._.

dusky harness
#

if you want 🤷 or you can shade it like how you're doing rn

dusky harness
#

i think most, if not all of those are on maven central

digital temple
#

alright, then i still shade nbtapi

#

btw what is changeme in <pattern>de.tr7zw.changeme.nbtapi</pattern> ? ill think maybe the version ?

dusky harness
#

since you should relocate all the libraries you shade into its own package

dusky harness
digital temple
#

yep, but i should changeme replace with the current version ?

dusky harness
#

nono keep it as changeme

digital temple
#

thats confusing haha

worn jasper
digital temple
#

What is the best inventory framework out there ?

worn jasper
digital temple
#

ohh maven central ._.

worn jasper
digital temple
#

it has maven central repo

#

mhh last update 4 months ago

#

any other inv frameworks out there ?

worn jasper
dusky harness
worn jasper
#

^^

digital temple
#

thats true

dusky harness
#

wouldn't that mean hardcoded menus tho šŸ¤”

digital temple
#

that looks interresting

dusky harness
#

but thats cool

worn jasper
digital temple
worn jasper
#

the main shitty thing is that it's all json

#

aka not that user friendly to the common minecraft

digital temple
#

but its cool anyways

worn jasper
#

I recall telling matt about this xD

#

meanwhile I am still debating my life if I should use PacketEvents or ProtocolLib

digital temple
dusky harness
worn jasper
#

ngl ProtocolLib is in almost 50k servers, would assume most servers have it

dusky harness
#

theres also tinysomething

#

i think

#

but theres a lot of manual stuff that you have to do i think

worn jasper
dusky harness
#

mhm

worn jasper
#

and well, they still haven't released a 1.20.4 build

worn jasper
#

only dev builds

worn jasper
#

it opens a normal anvil and uses the player's inventory as a GUI

dusky harness
#

oh cmon discord

#

ā˜¹ļø

worn jasper
#

probably using packets

#

since it's the best way

digital temple
#

it looks nice tbh

dusky harness
#

what-

#

how

#

oh

worn jasper
#

xD

digital temple
dusky harness
#

šŸŖ„

digital temple
#

cant use even gifs ._.

worn jasper
#

wait a damn minute

dusky harness
#

waiting

#

šŸ‘

worn jasper
#

I don't have react perms

#

😭

digital temple
#

i have no gif perms ._.

worn jasper
#

suppose that's a tier 6 or 7 thing

dusky harness
#

hehehehehehehehe

worn jasper
dusky harness
#

?roleperks

neat pierBOT
digital temple
#

thats not fair :((

worn jasper
dusky harness
worn jasper
#

yeah lmao

#

tf

digital temple
#

Embed links in most channels

worn jasper
#

why did it react +1 and -1

#

lol

dusky harness
#

barry is judging me ā˜¹ļø

worn jasper
#

boosters get the most benefits

#

fair enough

#

either way

#

yeah I will just switch to ProtocolLib and use packetwrapper too lmao

digital temple
#

ill think i buy some boosters for pay2win 🤔

dusky harness
#

both? šŸ’€

worn jasper
#

my project has been waiting for a version in modrinth and hangar lmao

worn jasper
#

^^

dusky harness
#

ohhh

#

thought you said packetevents

#

oops

worn jasper
#

xD

#

some people use both šŸ’€

dusky harness
#

btw i wouldn't recommend using it directly since its outdated on some stuff

#

but u can use as reference

worn jasper
#

that's one of the things I fking love about packetevents

#

😭

#

if it wasn't for that ONE single bug I have with packetevents

dusky harness
#

šŸ‘€

worn jasper
#

I am too dumb to fix, my knowledge is very limited packetwise

worn jasper
dusky harness
#

Skyslycer 🄲

#

wasn't expecting a helpchat member to respond

digital temple
#

so here we go again, but thit time with booster ._.

worn jasper
#

had hopes

worn jasper
#

xd

dusky harness
#

oh lol

worn jasper
#

xD

#

but yeah it's something about it being an NBT chat component and not json chat component?

digital temple
worn jasper
#

at least that's what I got told

dusky harness
#

Expected nbt type STRING, read INT
not a very specific error ā˜¹ļø

dusky harness
#

idk

worn jasper
#

that's what I got told by a guy in their discord

digital temple
#

if we are talk about protocolLib, anyone has experienced with it ?

worn jasper
dusky harness
worn jasper
#

since this would imply ALL components are encoded with NBT

#

which doesn't explain the fact this only happens with /give

#

lmao

digital temple
worn jasper
digital temple
#

i created a virtu sign for inputs throw protocolLib. But predefined lines are not written. The virtu sign is emty.
You know where the problem is ?

// Set the location of the sign
location = player.getLocation();
location.setY(location.getBlockY() - 4);  //  -4 offset because the sign should under the player

// Create and send the sign block change
player.sendBlockChange(location, Material.OAK_SIGN.createBlockData());

// Set the text for the sign
String[] signText = new String[4];  // maybe String[3] is working ?!
for (int i = 0; i < 3; i++) {
    signText[i] = color(text.get(i)); // Assuming color method is defined elsewhere
}
player.sendSignChange(location, signText);
worn jasper
#

I mean, he already said this but I am too impatient lmao

digital temple
#

yes

worn jasper
#

you can easily do that with the api

dusky harness
worn jasper
#

unsure what that has todo with packets

digital temple
#

easly haha then explain how i dot this. I tested it many hours with no success

worn jasper
#

:-:

digital temple
#
public final class Menu {

    private final List<String> text;

    private BiPredicate<Player, String[]> response;
    private boolean reopenIfFail;

    private Location location;

    private boolean forceClose;

    Menu(List<String> text) {
        this.text = text;
    }

    public Menu reopenIfFail(boolean value) {
        this.reopenIfFail = value;
        return this;
    }

    public Menu response(BiPredicate<Player, String[]> response) {
        this.response = response;
        return this;
    }

    /**
     * Open the sign GUI for the player
     *
     * @param player the player to open the sign GUI for
     */
    public void open(Player player) {
        // Ensure player is not null
        Objects.requireNonNull(player, "player");

        // Return if the player is not online
        if (!player.isOnline()) {
            return;
        }

        // Set the location of the sign
        location = player.getLocation();
        location.setY(location.getBlockY() - 4);  //  -4 offset because the sign should under the player

        // Create and send the sign block change
        player.sendBlockChange(location, Material.OAK_SIGN.createBlockData());

        // Set the text for the sign
        String[] signText = new String[4];  // maybe String[3] is working ?!
        for (int i = 0; i < 3; i++) {
            signText[i] = color(text.get(i)); // Assuming color method is defined elsewhere
        }
        player.sendSignChange(location, signText);

        // Create and send the packet to open the sign editor
        PacketContainer openSign = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.OPEN_SIGN_EDITOR);
        BlockPosition position = new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ());
        openSign.getBlockPositionModifier().write(0, position);
        ProtocolLibrary.getProtocolManager().sendServerPacket(player, openSign);

        // Add the player and this sign to the inputs map
        inputs.put(player, this);
    }

    public void close(Player player, boolean force) {
        this.forceClose = force;
        if (player.isOnline()) {
            player.closeInventory();
        }
    }

    public void close(Player player) {
        close(player, false);
    }

    private String color(String input) {
        return Main.colorTranslation.hexTranslation(input);
    }
}

here the current methode to create a "Menu" (virtu sign)

worn jasper
#

ah shit I confused it with smt else

#

uhm, so it opens without the text?

digital temple
#

yep, the input etc is working all the way fine. But the predefined lines are not writing

worn jasper
#

I know that if you have a Sign object, there is a setLine method

#

so in theory you could place a random sign anywhere in the world, set the lines and open it to the player?

digital temple
#

I also read something about the fact that the sign is too far away and the text cannot be rendered

worn jasper
#

unsure

#

haven't messed much with signs

digital temple
#

in the old versions its working fine. But the newest updates, where you can write both sides of signs are not working.

dense galleon
#

I figured out that whole database mess thingy I was talking about yesterday haha

#

I've created a monster

#

😈

#

Star and Aki are gonna claw their eyes out

worn jasper
#

that reminds me that I gotta finish my SQL library

dark garnet
#

this is still happening to me 😭 ping if reply

#

this is a screenshot of the database, everything appears to match up
what i dont understand is why there is both a TARGET and target column

minor summit
#

The error with code 42103 is thrown when trying to query, modify or drop a table or view that does not exists in this schema and database but similar names were found

minor summit
west socket
dusky harness
#

ah reminds me of the classic "Destroy the tree" message

west socket
#

Some servers seem to have it disabled, so I assume that it can be done

#

Just not sure how

#

And oddly enough google yields like no results for it

dusky harness
#

what if you just give the player wood for one tick

#

lol

#

(you don't actually have to break it)

west socket
#

Well this one is different as you can see

dusky harness
#

oh

#

🤦

#

sorry I have the memory of a goldfish

west socket
#

All good

#

I’m thinking it might be something in the world file?

dusky harness
#

I don't think it's server-side

#

although I haven't checked

west socket
#

I mean you must be able to control it somehow

#

Because it doesn’t happen at all on hypixel

#

And most large servers

dusky harness
#

bc the client could store the data based off server ip

dusky harness
#

huh

#

wait like

#

still happens = pops up?

#

(on hypixel)

west socket
#

Does not pop up on hypixel

dusky harness
#

oh huh

#

maybe setup a protocollib packet listener or smth
still would be a bit surprised if it is server side tho

west socket
#

Yeah

#

I’ll try that

#

Only strange packet I see is "UPDATE_ATTRIBUTES"

dusky harness
#

took me a bit to figure out for the first time but you can setup ProtocolLib to listen to all packets

#

and its data

#

PacketType.something.getInstance().values() or something
and i dont remember how to get & print its data 🄲 (but its possible)

west socket
#

Im just using my own packet injector

dusky harness
#

oh

west socket
#

Let me get all the data

dusky harness
#

alr
plz ping me if you find any results since im gonna 😓

#

:))

west socket
#

Cool

#

Ill have it done in like 2m

digital temple
digital temple
digital temple
west socket
#

Fixed it using

stats:
  disable-saving: true
  forced-stats:
    achievement:
      openInventory: 1```
#

Discrepancies might be because I'm running version 1.8

west socket
#

Say what you will, but it’s still exponentially better for large scale networks with micro instances

#

If mojang got their shit together and optimized their newer server jars id be using them instead

digital temple
#

hypixel has started to update from 1.8.8 to 1.20

west socket
#

Not through conventional means

#

They’re literally gutting the 1.20 server jar and adding features onto 1.8

#

One by one

digital temple
#

of course their have a own server instance

west socket
#

My point is that for my use case, using 1.8 just makes a lot more sense

#

But you’re perfectly valid for not wanting to go out of your way to answer questions regarding it

#

And I apologize for not mentioning it up front

digital temple
#

It doesn't matter, I was still looking for a solution especially for you

#

so no apologized needed for this :))

west socket
#

Thank you

cloud panther
#

hey does, TAB have a method like "setScoreboard(player, scoreboardname)" ?

dense drift
#

Check if there is a command for that and then see what it does šŸ™‚

digital temple
dark garnet
lusty smelt
#

Hi guys if i switch from Holographidisplays to decent holograms

#

Can i still keep my folder of Holo?

terse osprey
river solstice
#

the name of the thing is "toast"

#

not sure whether you can disable those

dusky harness
digital temple
minor summit
#

the tutorial toasts are (almost) entirely client sided and it's saved in the client options file

#

from the server you can skip it, for example by switching the player to a non-survival gamemode

#

oh god this is not very server controllable

#

yeah no this is basically client sided unless they complete any step in any non-survival gamemode

#

which is still fairly client sided kekw but at least you can control the gamemode

signal rain
#

Hey. Just curious for Papi Townychat I downloaded from Ecloud a bulk of the placeholders are blank. (The server I am on has townychat and I have tried mutliple times to have the placeholder %townychat_channel_name% save to Tc, Nc, etc) I am considering making my own Papi expansion, but I wanted to check here if others had the same issue. I parsed though papi and the placeholders are 100% blank. If you need any more info let me know.

digital temple
signal rain
#

Yep. I downloaded the placeholder and already loaded it into papi. I ran a command relating to the plug-in the placeholder is part of. For this case it’s towny chat so I ran /tc. Then I went through a lot of the place holders. The only ones that had anything was town name and the default placeholder. I’m a bit confused why eCloud would have the placeholders and not use them hence why I’m assuming I did something wrong.
(I did run papi parse)

lyric gyro
#

Hello, i'm having a problem creating a PlaceHolder expansion in one of my plugins

#

may someone help me please?

dense galleon
#

In the triumph API for commands, how do you handle an optional int parameter?

pulsar ferry
#

Make it Integer and annotate it with @Optional

dense galleon
#

Cool thank you

#

All my plugins keep giving me an error regarding Artifacts.getInstance() being null, though I don't really get why it would be?
I have a field private static Artifacts instance, which I assign in my onEnable() with instance = this

#

I do this exact thing in another plugin of mine, and it works

broken elbow
#

Providing code would be helpful. Make sure that you're not getting the instance from a static block which would be called before onEnable.

dense galleon
#

The section of code which throws that exception is way after the plugin is enabled

#

I'll give more context in a sec sorry

worn jasper
dense galleon
#

Yeah I normally do that

worn jasper
#

then why aren't you now

river solstice
#

Why arent you setting it in constructor

dense galleon
#

Which I would wanna avoid instantiating if possible

dense galleon
worn jasper
dense galleon
#

Well

#

This is a registry class which holds all references to custom items in my plugin

worn jasper
#

you can also still pass it through DI, even if it's a static class, so I don't see the issue

dense galleon
#

Each of these items requires an instance of this plugin's main class

worn jasper
#

that sounds bad in some way? why is it required?

#

if I may ask

dense galleon
#

Once I fix another issue with my database I will try replacing the getInstance() with DI I guess, but I remember there being multiple reasons to why I opted for that method instead of DI

worn jasper
#

so each item is a static class?

#

wut?

dense galleon
#

I will get back to that once I figured out this other ongoing issue sorry

#
NamespacedKey key1 = new NamespacedKey("test", "value");
NamespacedKey key2 = new NamespacedKey("test", "value"); 
map.put(key1, someObject);
Object obj = map.get(key2);
```Will this succesfully get `someObject`?
#

I think it does right? Since NamespacedKey overrides equals()?

#

Reading how Map#get() works

sterile hinge
#

if hashCode and equals is properly implemented for NamespacedKey and the map is a HashMap or a compatible subtype

#

(If map is e.g. IdentityHashMap, it won't work)

dense galleon
#

I'd say that it should work

#

Yeah the map is a HashMap

lusty smelt
#

Somebody that knows how i can improve hopper speed

#

?

river solstice
#

what

#

prob spigot.yml ticks-per

#

hopper check, hopper transfer

terse osprey
# lusty smelt Somebody that knows how i can improve hopper speed

Listen for when a hopper is transferring items, have it message all staff members (Could also have text message implementations for the offline staff) and the staff tps to the hopper and manually transfers the items. You’re welcome be sure to leave me a rating if my answer helped you šŸ˜Ž šŸ’Æ 🤯

dense galleon
#

Should I just have an instance of my main class as a parameter

#

But what if this same method needs to be called by other plugins too, who don't have an instance of the plugin's main class?

#

That's where I feel like JavaPlugin.getInstance() makes sense

#

Huh

#

Nah what is going on actually

#
    public Artifacts() {
        System.out.println("New instance");
        instance = this;
    }``` I assign `instance` a value in the constructor, yet when I try using that variable in a static method in the same class later on it has a value of null?
#

This is the case only for that plugin

#

Another plugin instead has no issues with getInstance()

dense galleon
#

Am I going insane

#

public static final Map<NamespacedKey, ArtifactItem> ARTIFACTS = new HashMap<>(); I got this map which values I add from other mods too, and even though all those mods load after this one the map results empty?

tight junco
#

declare instance in on enable

#

maybe maybe not actually

dense galleon
tight junco
#

or you could do the if instance == null instance = this return instance on the getInstance method

dense galleon
#

In general, my plugin's main class seems to be having issues since both my instance field is null and ARTIFACTS is empty though other plugins add to it

#

Like look at this

#
    public static void registerArtifact(ArtifactItem item) {
        Bukkit.getLogger().info("Registering artifact: " + item.getKey());
        ARTIFACTS.put(item.getKey(), item);
    }```
#

Yet when I check the contents of ARTIFACTS, it results empty?

dense galleon
#

It's as if my other plugins have access to a different copy of this plugin

#

Ah

#

What happens if in my pom.xml

#
            <groupId>com.klyser8.github</groupId>
            <artifactId>Artifacts</artifactId>
            <version>1.0.0</version>```I did this, without the `<scope>provided</scope>` section?
#

Does it bundle the dependency into the plugin, resulting in effectively two copies of each class?

proud pebble
#

also are you making sure that you depend/softdepend on your plugin?

dense galleon
#

So if I don't write the scope, the plugin automatically gets bundled in?

dusky harness
#

by default, the scope is compile which bundles in yeah

dense galleon
#

Yeah alright that was the problem then

#

How do servers create custom head textures without resource packs?

#

Do they just own an account which they set a skin to?

dusky harness
#

and then server owners add heads using that

dense galleon
#

i see

dense galleon
#

How would I go about adding a tab autocomplete/suggestion to a command, composed of a list of server names the player can teleport to (Waterfall)?

dusty frost
#

Is this command part of a proxy plugin or a backend plugin?

dense galleon
#

I think backend?

#

It's a paper plugin

dusty frost
#

Then you have to figure out a way of getting the list of server names that exist on the proxy into the paper plugin

dense galleon
#

I'd imagine a bungeecord plugin which would check every so often what servers are available and sends that info to a paper plugin?

dusty frost
#

I mean either way you'd have to have something on the proxy to actually swap the people between the servers

#

So you might as well just have that command as part of the proxy plugin directly

#

then you can just access the list of servers directly from memory no communication required

dense galleon
#

I already have a command to switch between servers

dusky harness
#

maybe this would work
(caching the server names)

dense galleon
#

not sure if that's significant

dusty frost
#

in a paper plugin?

dense galleon
#

yeah

dusty frost
#

how does that work

dense galleon
#

I registered an outgoing channel I guess

#

I did this like a year ago I honestly dont remember

dusty frost
#

oh very weird

#

well then yeah what dkim said

dense galleon
#

I got a method saveDataAndSendPlayerToServer which saves the data of the player asynchronously and then sends them to the target server once the data has been stored on the DB

dusty frost
#

oh yeah you're doing the player data system

#

you should have a look at HuskSync

#

it's open source, it's what I use on my network for cross-server player data

#

uses Redis for super fast caching time and a DB to persist, super great

#

it also doesn't directly integrate with sending players, it just listens to PlayerLeave/PlayerJoin events so it works with everything

#

much less fragile

dense galleon
#

I just finished writing my player data system though

#

And it seems to work pretty well?

dusty frost
#

oh I mean yeah I guess

#

I would still recommend listening to PlayerLeave/PlayerJoin events

#

instead of having a specific send thing

dense galleon
#

Yeah that's what I do too

dusty frost
#

oh

dense galleon
#

The send thing is for a specific command

dusty frost
#

so what's the point of this method then

dense galleon
#

It just makes sure that the player's data is saved before they get sent to another server through the command

dusty frost
#

oh is your thing not fast enough to just save and load from the time between playerjoin/playerleave

dense galleon
#

It should be, I honestly don't remember why I wrote it a year ago

#

but I remember adding it as a failsafe

dusty frost
#

okay well

#

kinda weird but anyways, what dkim said should work for you

dense galleon
#

Yeah looking into it

dense galleon
dusty frost
#

you send it through the BungeeCord channel

#

look at the top of that page

dusky harness
dusky harness
dense galleon
#

I swear that is not how I did it for this other one I got :' )

dusty frost
#

I mean that's the Bungee plugin messaging lol

dusty frost
dense galleon
#

This is what was trying to do haha

#

Am I meant to write that code elsewhere, and then in there write the listener?

dusky harness
dense galleon
#

Yeah well

#

It doesnt work as I am not returning a list

#

Changed it to try with resources, though yeah I think something is fundamentally wrong with how I am doing it rn haha

#

I just don't really know where I should be listening and sending the list of servers

dusky harness
#

oh and maybe update the list on player join if the serverNames is empty

dense galleon
#

But yeah alright I will do that tomorrow then, gotta sleep

#

Thanks for your course correction haha

dusky harness
#

its just message links from earlier in the convo
but alr, good night! 😓 😓 šŸ›ļø

signal rain
tight junco
#

it has

spring crescent
#

Okay guys, so I have a plugin I'm starting on, and I need some advice on setting up a database. I can't seem to figure out what columns and tables that I need to support the features that I'm looking for. I'll preface this by stating I've started a repository, with a readme that basically explains what the plugin is and how it functions. https://github.com/mkaulfers/hardcore-seasons/tree/main

I need to track user-created inventory content in a database, as well as any players that have joined, are surviving, or have been banned due to death. The goal is, at the end of the season, when all but one or all but X number of configured survivors are remaining and the season ends, they can redeem those resources on a separate server, eg. survival or skyblock. I need to be sure that I handle the case where a user survives, but doesn't immediately redeem their rewards. For example, if season 1 ends, and season 2 ends, a player from season 1 should be able to redeem their resource earnings at any time. In effect, I should be able to track multiple seasons simultaneously.

I started working out some of those details via pseudo-code in comments, which you can checkout here: https://github.com/mkaulfers/hardcore-seasons/blob/main/src/main/java/com/xtwistedx/storage/SQLHandler.java#L66
I also want it to be somewhat scalable for future features I have planned, so abstraction is somewhat important.

dreamy wave
#

I dont know if this is the place for it.
But if I have a placeholder for %player% does the Plugin that its coded into auto download it or does the Server Owner have to?
If it comes down to the Server Owner has to; Is there a way to have the Plugin auto download the Library of PLAYER?

dusky harness
#

also:

neat pierBOT
#
FAQ Answer:

Player placeholder not working? If you are using a plugin which supports PlaceholderAPI, and the %player% placeholder doesn't work, then change it to %player_name% and download the player expansion.
Commands:
/papi ecloud download player
/papi reload

dusky harness
#

if you mean %player_name%, then I think it just relies on the server owner; I don't think you can auto download

dreamy wave
#

Well this is my first time using PAPI and I wanna start using Placeholder support in my configs n what not, just dont want there to be errors cause the Owner has to Download the eCloud of PLAYER
So if I direct %player% to the players display name / name then it should just work and nothing has to be downloaded?

dusky harness
#

but I'd still add PAPI in case the user wants to do other placeholders as well

dreamy wave
#

of course.

#

Thank you for your response šŸ™‚

bleak arch
#

Hi

#

I have a problem

spring crescent
#

Nice

terse osprey
#

Sorry to hear man

bleak arch
#

org.bukkit.command.Command still exists in spigot 1.20.4?

spring crescent
#

Docs... my dude

bleak arch
#

When I try to put that version it tells me that that part of bukkit does not exist but in 1.20.1 it works for me

#

Im confused :/

spring crescent
terse osprey
terse osprey
#

Yup lol

bleak arch
#

what a strange problem

terse osprey
#

Truly puzzling

spring crescent
#

Can you be more specific about what led up to this problem? You're getting responses like this because it would appear, to readers, that you have not done any due diligence xD

bleak arch
#

That's all it tells me when compiling it tells me that this import cannot be found in spigot 1.20.4 SNAPSHOT R0-1 or something like that

spring crescent
#

Ahhh import cannot be found. So you have a misplaced import, or a missing dependency somewhere.

#

Or you have a dependency definition that says "This dependency is ONLY for XXXX version"

bleak arch
#

I use maven but I think this is not the problem

spring crescent
#

Share your dependency plz

terse osprey
#

If you’re on eclipse restart the IDE as well

spring crescent
#

Heck, even IntelliJ might be worth a restart xD

#

And a clean

bleak arch
#

intellij Idea won't let me compile

#

I can't share code 'cause I can't use my PC and it's 2 am

spring crescent
#

-.-

terse osprey
#

Huh

#

There’s your problem

#

You have to use your PC to compile

#

Problem solved

spring crescent
bleak arch
spring crescent
#

Dude @digital temple do you exist in every MC discord in existence? lmao

river solstice
dense galleon
#

I am so confused, why couldn't they share code because of how late it was

river solstice
#

maybe not on pc

dense galleon
#

Ah I guess they turned off their computer and wrote from their phone

spring crescent
#

I've run into an interesting issue where HikariCP is throwing a NoClassDefFoundError exception. I'm fairly new to maven and I think this is probably something to do with the way I have setup my dependencies in the pom.xml. Could anyone direct me in the correct way to manage this?

https://paste.helpch.at/aveqovusav.xml

#
      <dependency>
          <groupId>com.zaxxer</groupId>
          <artifactId>HikariCP</artifactId>
          <version>5.1.0</version>
          <scope>compile</scope>
      </dependency>

Should be noted I've ensured that the <scope> is setup as compile

pulsar ferry
#

Make sure you build with maven and not with your IDE
You need to build the jar with mvn clean package to shade hikari into your jar, the jar will be in the target folder once the task is done, make sure to pick the right jar, it's the biggest one

spring crescent
#

@pulsar ferry so I've discovered the issue is to do with the way I have my dev environment setup. Currently I have a configuration that runs the server in the IDE for debugging purposes. In addition, I have an artifact that is a pre-run step for that configuration. I found the shade-plugin, but I would like to have it automatically place itself into the appropriate plugins folder. Are you aware of any dev setup environments where I can configure this? I feel like it should be pretty standard but I'm a newb to MCDev environments xD

#

Resources for setting it up properly**

merry knoll
#

you would probably have a way easier time just using gradle

#

instead of maven

#

write a task in gradle to move your jar wherever you want after its compiled and you are done

worn jasper
#

gradle > maven. always.

ocean crow
#

Been working on my own TP system for my server, the accept and deny are both clickable, is there an easy way to see if a bedrock receives it and not do the clicky buttons? Iirc they can’t click and go out to a link via ingame.

#

Only thought was check if the ign started with * but haven’t tested it, anyone else do smth similar?

spiral prairie
#

Geyser API

ocean crow
#

Hmm fair, okay I’ll give it a shot.

dense galleon
#

Does it make sense to have a database table with a PRIMARY KEY of type INT NOT NULL AUTO_INCREMENT, or should I just have the UUID be the primary key

#

My dad who's done stuff with databases a lot for work told me it should be an auto incrementing ID and not the UUID so that it is less resource intensive

ocean crow
#

Realistically probably would be best to be an incriminating int, since ya. Generating a UUID each time would definitely use more data and shit for it.

dense galleon
#

I mean sorry

#

It is player data

#

So the UUID would be of the player

ocean crow
#

Ya fair

dense galleon
#

Is it still better to have the auto incrementing ID and then the UUID just as a column?

graceful citrus
#

you would then have to map the id to the uuid

#

defeating the purpose

#

uuid as primary key is fine, you are not the one generating it

ocean crow
#

Yeah true

dense galleon
#

Yeah I also thought that but he keeps saying that it would be more correct to have an auto incrementing int haha

ocean crow
#

Normally used to my code dynamically creating dbs for us. :(

dense galleon
#

That is what I am writing myself too

#

A way to just create columns dynamically

graceful citrus
#

but you will have to query for the uuid regardless

#

you SHOULD mark columns as unique etc if your data structure allows it

dense galleon
#

I suppose it's more about getting other tables data using the UUID which I guess would be slower?

dense galleon
#

Than using an int

dense galleon
graceful citrus
#

if you do more than just a couple queries he is correct

#

you would query to get the internal id

worn jasper
#

In theory, there is nothing that changes in it lmao

graceful citrus
#

then use that id to query for other data (and keep the id cached)

dense galleon
#

But even then I guess the difference in performance would be negligible

#

Especially if the database and the server run on the same machine

graceful citrus
#

database location does not affect the performance

#

it affects the latency

#

even if you block a thread, other threads will use the core in the meanwhile if your block is not taking cpu cycles

worn jasper
#
SELECT * FROM table
WHERE uuid = "";

Is basically the same for both cases. The issue comes to updating data and having a virtually useless column since uuid is already unique.

#

performance is legit the same.

#

amount of storage used for the db would be very slightly bigger with ids

graceful citrus
worn jasper
#

in big databases it would be a bit more noticeable

graceful citrus
#

its just not needed imho

worn jasper
#

you would have to still somehow retrieve it

#

lol

graceful citrus
worn jasper
#

you can't magically know which id is being used in the database for user X

dense galleon
#

My dad says that it is about "respecting the standards/norms" and "if you have to update a player's UUID for one reason or another, you'd have to manually do all of the tables"

graceful citrus
#

uuid is an id

#

its even in the name