#help-development

1 messages · Page 136 of 1

shrewd sphinx
#

ran into the problem when i tried to do a sb with a online player count

grim ice
#

anyone knows how to obfuscate aa forge mod

tranquil stump
#

Have you ever done any coding before?

shrewd sphinx
#

is it? let me see

grim ice
#

give!

oak raven
boreal seal
shrewd sphinx
#

what the hell its true

oak raven
#

thats gonna take atleast a year, i have no clue dude, i just wanted a simple bot

shrewd sphinx
#

i see, nice to know thank

tranquil stump
#

I learned nodejs while coding along with codelyon

oak raven
#

but to code a bot, it takes more, and with almost 0 english skills, i cant

#

i tried already

quaint mantle
#

Hello, how do you get At to have what he writes in color in the chat?

oak raven
#

i dont even know what to start with, or even how

tardy delta
#

c++ io easier than java lol

#

for basic concepts it is

tranquil stump
tardy delta
#

gonna make a discord bot with html/css?

#

gl

tranquil stump
#

💀

ivory sleet
#

noooo

#

☠️

tranquil stump
#

just learn like basic html so you can do js

quaint mantle
#

mluví tady někdo česky?

tranquil stump
#

lol

grim ice
#

conclure

#

do u know how to use an obfuscator

ivory sleet
#

which one

grim ice
#

proguard

#

or smth

oak raven
#

i just look at a video on how to program python, and i dont understand anything from it, literally 0, idk why, idk how he does this, im just confused

tepid thicket
#

But for just I/O can't say.

grim ice
#

im making a forge mod and i wanna obfsucate it

#

but like

ivory sleet
#

on a basic level 2hex

quaint mantle
#

Does anyone here speak Czech?

grim ice
#

idk how the fook do i use it

ivory sleet
#

me neither, not in union with forge

grim ice
#

it doesnt understand references to string/objects or forge

oak raven
#

nvm, im just gonna do my server without that bot

#

ty for trying to help

#

take care yall

alpine urchin
#

bye

tepid thicket
#

Interesting. Though using daemon threads on an Executor doesn't look very useful. As it would bring the insecure "Spigot behavior" to vanilla java.

#

And on Spigot itself executors are handled as daemon already anyway.

ivory sleet
#

yes

#

a lot of stuff is

#

because practice differs from theory

#

but as the stackoverflow thing said (I just read through it lightly) (for beginners mostly) you do wanna avoid it

#

because it is another layer of complexity, especially when debugging and testing

#

but yeah blood eko in case of bukkit

tepid thicket
#

Yeah, it should rather avoided when not really needed. Simplicity wins most times.

ivory sleet
#

think about it,

#

all plugins are gonna disabled

#

and the craftbukkitscheduler + simplepluginmanager ensures it

#

so shutting it down and awaiting termination could be seen as a superfluous layer of termination

#

having it daemon is just for convenience id say (in this case)

tepid thicket
#

Well it depends. When doing file appendings it would be crucial for them to be awaited.

ivory sleet
#

tho insistingly, one should not as in is strongly discouraged, use bukkit scheduler with IO related stuff

#

as IO is arbitrary and resource intensive

tepid thicket
#

Whether other plugins would be still available at the moment of shutdown might be another aspect. Indeed.

ivory sleet
#

for most IO stuff you wanna ensure a safe model regardless of how the IO tasks are dispatched into whatever executor you may use, (which I did hint at a lil bit earlier)

smoky oak
#

Hey Zorro, do you know if IO even works off-main thread? Im unsure if it was that only the main thread can change the world, or only the main thread that can write stuff to files in general

tepid thicket
#

Yeah. That's why for I/O an Executor would be used. Not the bukkit scheduler. Hence my research.

ivory sleet
#

for now FJP is the way to go almost

#

or cached thread pool with a semaphore

#

but in j20 or so you will want to use the user threads

tepid thicket
#

That would be then performance aspects whether to use a semaphore, what kind of thread pool, etc.

#

For me it was mostly here to prevent liveness failures.

ivory sleet
#

no like you almost always want to restrict IO bound tasks

smoky oak
#

sounds like ur better off writing an api plugin of sorts. what r u tryina do anyways

ivory sleet
#

either through some semaphore impl or fixed thread pool

#

this is why its extremely dangerous to use the bukkit scheduler with IO bound tasks

#

especially if you are gonna scale horizontally

#

but yeah additionally

#

for most given IO tasks they do have a beginning and end shorter than the runtime

smoky oak
#

well an api is basically just a plugin that has some public methods and classes u can use

ivory sleet
#

thus structured cpncurrency is gonna be ❤️

smoky oak
#

which in turn means you can use that class in another pluign if you set the api as dependency

#

keep in mind i have no idea what ur trying to do. I told you what i think is the best solution for this is based on what u said

#

ah

#

yea api it is

#

write the database stuff in ur api pllugin and make it either a dependency or an inclusion

#

i recommend dependency cuz some services impose file size limits of 5 and 8 mb

#

oh also

#

the actual benefit of dependency is that you do NOT need to rebuild all your plugins if u find a bug

#

just the api with the bug

tardy delta
#

hehe made it work

#

why are there so many parentheses combinations lol

smoky oak
#

maths desinged that way

#

have a matrix

#

[0 1]

tepid thicket
ivory sleet
#

very true

#

we do have the old school blocking coefficient

#

🥲

smoky oak
#

just do it on the main thread

#

usually its only a few kb at most ur writing

eternal night
tardy delta
#

this doesnt work aa

smoky oak
#

maybe just do this, keep track of how many parenthesis have been opened

tardy delta
#

mye i might

smoky oak
#

then just make an 'inner' statement between the last and the closing parenthesis

#

u also could do regex or smth similar

#

so that u edit the string as u solve it

tepid thicket
shrewd sphinx
#

how do the seamless lines in scoreboards work?

smoky oak
#

its a character that fills the entire width of the spot its in

#

unicode trickery

ivory sleet
#

thus we must also dynamically manage throughput

shrewd sphinx
ivory sleet
#

so it is a complex problem all on of its own

smoky oak
#

*dos line characters

tepid thicket
tepid thicket
ivory sleet
#

well, lets say managing error handling with the current executor api can be disastrous

tepid thicket
#

I've seen something about an rough idea to group concurrent tasks together.

ivory sleet
#

yeah, its gonna be awesome since most concurrent tasks usually can be represented in a tree-fashion manner

tepid thicket
#

I have seen an example of it with using the try/autoclose syntax for it.

#

Though can't say yet how it would turn out in practice.

ivory sleet
#

myeah

#

Thread got some factory methods now

tepid thicket
#

And there are even more other changes I haven't seen yet.

#

In general I like the idea of making concurrency easier. Though not sure to which degree it is actually possible. lol

ivory sleet
#

yeah, I mean since java 9 we got the explicit memory order effect api (varhandle)

#

a lot of things gives us power to do things more efficiently and robustly

#

but it probably has some set of cons

smoky oak
#

varwhat now

ivory sleet
#

VarHandle (x

tepid thicket
#

Oh well. Yeah I haven't read yet about VarHandles too.

smoky oak
#

i somehow feel like all java9+ stuff is qol u can ignore

ivory sleet
#

Basically AtomicReference but one implementation layer lower

tepid thicket
#

Seems like something I should catch up upon.

#

But yeah, I have a bit the same feeling as Moterius.

ivory sleet
#

Its mostly for apps that are scaling stuff to the moon

#

Mostly just puttin volatile (or synchronized) works

tepid thicket
#

Though are also some pretty nice featues in the newer java versions. (beside concurrency)

ivory sleet
#

Yeah def

shrewd sphinx
#

is there a way of updating a objective's name without recreating the entire scoreboard?

ivory sleet
#

Records and sealed being two big hits

tepid thicket
#

Even if VarHandle is a lower-level features it might make it's way then up into our APIs.

#

Are Records already implemented?

lost matrix
#

lol

eternal night
#

up to date af

lost matrix
#

He is talking more about record pattern matching

ivory sleet
#

Thats basically encapsulation violation

#

But yeah maybe

tepid thicket
#

Oh well. Java 14/16... lol

#

Yeah I meant the "data classes" they seem to come with java 19 then?

ivory sleet
#

Java 14 iirc

#

But j19 will add deconstructering

tepid thicket
#

Did records actually improve memory usage? If we think about record-arrays?

ivory sleet
#

Hmmm

#

Not sure

#

Good question

#

hashCode, equals and toString are generated using invokedynamic

#

iirc

#

Which is like fast :3

smoky oak
#

definitively didnt improve usage

#

records aint mutable

tepid thicket
#

So that the object-header would be saved only once, instead of per instance.

#

Which could make a huge difference. Especially if we think of blocks in Minecraft.

tepid thicket
ivory sleet
#

Well

#

Id argue that immutability sometimes increase reusability

#

But it depends on design and stuff

ruby fjord
#

Any good tutorial about implementing in maven multiple spigot dependencies to use for NMS ?

tepid thicket
#

Yeah. Not sure if the JVM can handle them like primitives, to spare memory.

#

Or whether it was a pure "design" update.

eternal night
#

valhalla wen

ivory sleet
#

🙏

smoky oak
#

i cant do shit with records

#

they can only be 'mutated' by creating a new one and changing the one thign you have to change

tepid thicket
#

Code wise?

#

And "value types" from Valhalla are a different thing than records again, right?

#

... some things have been renamed a few times in the experimental phase. lol

onyx fjord
#

i have a weird problemo yall

#
            if ("withdraw".equals(args[0])) {
                integerList.add(1);
                integerList.add(5);
                integerList.add(10);
                integerList.add(20);
                integerList.add(50);
                if (!args[2].isEmpty()) {
                    Integer closest = findClosest(integerList, Integer.parseInt(args[2]));
                    if (closest != null) {
                        integerList.add(0, closest);
                    }
                }
                for (Integer integer : integerList) {
                    System.out.println(integer.toString() + autoCompletes);
                    autoCompletes.add(integer.toString());
                }
                return autoCompletes;
            }

this is my code

#

on the sysout 50[5, 1, 5, 10, 20] gets printed

#

but in game i see

#

incorrectly

#

5 should be on top

snow sluice
#

why does PlayerInteractEvent trigger twice when i right click?

kind hatch
#

It fires for both hands

snow sluice
#

OH

#

omg that makes so much sense

worldly ingot
#

kacper, suggestions are sorted by best match, then alphabetically

#

You can't change that

grim ice
#

does anyone know how to obfuscate forge mods

worldly ingot
#

jfc

grim ice
#

im trying to use proguard, but its not really working

onyx fjord
#

when i type 2 it gives me 20 lol

grim ice
boreal seal
worldly ingot
#

Jesus fucking Christ

#

Just stop

#

Stop obfuscating. Holy shit

#

You don't have to obfuscate everything

boreal seal
#

you cloud make own list

onyx fjord
#

i really really cant do anything?

#

i saw literally plugins doing it lol

boreal seal
worldly ingot
#

No, because that's how the client orders suggestions

boreal seal
#

you want your resources banned?

grim ice
#

Im not uploading it anywhere

worldly ingot
#

And yes, it is best match, because you put a 2 in your arg

#

20 is the best match for 2

boreal seal
#

then dont

grim ice
#

God

iron glade
snow sluice
worldly ingot
#

SO YOU'RE NOT PUBLISHING IT, BUT YOU'RE OBFUSCATING IT FOR WHAT REASON!?!?!?!

boreal seal
#

he is an "java dev"

worldly ingot
#

holy fuck

grim ice
#

Jeez

#

chill out

boreal seal
#

thats it

#

its my new spigot singature.

#

WTF

#

lol

worldly ingot
#

I'm so fucking fed up with people wanting to obfuscate shit for no fucking reason

grim ice
#

lmao

boreal seal
#

Choco please dont ban me.

onyx fjord
#

wait can i umm add suggestions later perhaps?

worldly ingot
#

Your shit is not that important

grim ice
boreal seal
#

2Hex your shit is dogshit

iron glade
#

Choco's right

boreal seal
#

sure sure

tepid thicket
#

lol

boreal seal
#

if you can code something that advanced

grim ice
#

So it is worth something

onyx fjord
#

💀 obfuscation

boreal seal
#

you should be able to code own obsfc..

#

or manually

#

do it

grim ice
#

it totalled to 300$

boreal seal
#

2Hex you are not part of spigot

snow sluice
onyx fjord
#

isnt money burning illegal in US tho?

boreal seal
#

Choco i suggest to ban that person

onyx fjord
#

i would consider that as one

boreal seal
#

he is from MCM...

grim ice
#

MCM?

boreal seal
#

he should ask it on MCM instead

grim ice
#

I don't use it

boreal seal
#

sure

grim ice
#

I like how you're just assuming everything

#

God

onyx fjord
#

is your mod rly that big?

boreal seal
#

its big.

grim ice
#

It isn't big

boreal seal
#

27 days of exprience

onyx fjord
#

then obfuscation makes -1 sense

grim ice
#

i renamed it

boreal seal
#

sure

tepid thicket
onyx fjord
#

it matters for android apps that are maybe 200 megs

boreal seal
#

i like people who lie to be someone who they are not

onyx fjord
#

to save some

grim ice
#

Ah, you must hate me then

#

let me link my new github then

boreal seal
#

nah im just realistic

iron glade
#

I'm grabbing the popcorn, hold on a sec

onyx fjord
boreal seal
#

he wanted to use ProGuard

grim ice
#

There you go.

boreal seal
#

ill reverse is plugin and do an opensource on it

grim ice
#

check again

boreal seal
#

🤣

onyx fjord
grim ice
#

Evan you're so funny I can't believe it

#

surely, you have a lot of friends

boreal seal
#

i do have kacper

#

best friends for ever

#

and mr 8

#

which is black guy

grim ice
#

kacper is just a nice person

boreal seal
#

do you have black friends?

grim ice
#

he can be friends with anyone

onyx fjord
boreal seal
#

xd

grim ice
#

Then evan

#

can I see your github?

boreal seal
#

false

#

you cant

#

mr steal your code

#

lol

#

11

grim ice
#

Lmao

boreal seal
#

my resources arent public

grim ice
#

The guy working in the project with me wanted to obfuscate it, that's all

boreal seal
#

those on spigot where removed by choco

grim ice
#

you surely know how to make a clown of yourself

boreal seal
#

due obfuscation..

grim ice
#

What?

boreal seal
#

2Hex i honestly understand why you want to do it

quasi flint
#

popcorn tastes good

grim ice
#

then why are you crying your eyeballs out if you obfuscate projects as well

boreal seal
#

well i either create backdoors and infect them with botnet malware

grim ice
#

I never obfuscated anything, I'm doing this for the first times since my friend told me to

boreal seal
#

in case some smart ass thinks he can use my resources

#

well i dont reccomend ProGuard

#

maybe try ZS

onyx fjord
#

sure 🤡

#

🤡 Heavy 🤡 Duty 🤡 Security

quasi flint
#

i personally once used bozo, just because for the funs and i wanted to see how good it was. it was suprisingly good

grim ice
#

Bozar?

boreal seal
quasi flint
grim ice
#

I don't think there's something called bozo

#

Yeah

#

I tried it, failed

iron glade
#

I personally use a() and b() and so on by myself when creating methods and classes

#

🤡

quasi flint
#

which is

#

never

grim ice
#

Didn't work for forge, I would need to add it as a library and I have no clue how to

boreal seal
#

👽

smoky oak
#

i dont use obfuscation cuz i dont want to insult people

quasi flint
#

oh brother trying to use it with forge

#

my man mad

quaint mantle
#

Hello, can someone help me with this bug?
I have "save-user-cache-on-stop-only" set to true, and the plugins have not been touched

grim ice
#

Why though

quaint mantle
grim ice
#

Honestly, I like certain people on this channel just come to embarass themselves then proceed to not help at all

quasi flint
boreal seal
#

who embarass him self

#

the whole day

#

asking the same question

grim ice
#

that's perfectly fine

boreal seal
#

perhaps

grim ice
#

since this channel is indeed to ask questions, not to do whatever you're doing

onyx fjord
#

when you get to stuff like string encryption

#

imagine encrypting and putting key in the same place

boreal seal
#

questions about development dummy

grim ice
#

It is about development

#

And I'm doubting how much you know about this channel, considering you only sent 3.1k messages lol

quasi flint
#

Or be Like mojank

#

Obfuscate

#

But then give mappings

#

Lol

grim ice
#

Thanks but that's for when I discover on how to actually obfuscate jars with dependencies

quasi flint
#

Simple

boreal seal
#

u cant really

quasi flint
#

U dont

boreal seal
#

with dependecies

grim ice
#

You do, I've seen it a lot

boreal seal
#

bruh what kind of dev using dependecies

#

reinvent the wheel

#

only if they are shaded into the jar

#

it would be possible

grim ice
#

They are.

#

Oh actually, I don't have forge shaded

#

So rip

boreal seal
#

so you cant

#

sorry ;l

#

like you can partly

grim ice
#

It is possible though as far as I've seen

boreal seal
#

but not really would change something

#

yeah partly

grim ice
#

Sure, I will go with "partly"

#

but how

boreal seal
#

well everything that works with forge

#

should stay natural

#

u can just not break your head

#

drop some trash code into it

#

alot

#

Refactor classes names

quasi flint
#

Well proguard works on spigot and Shit, so u Just have to configure IT right

boreal seal
#

he uses extra dependecies

#

that are 3rd party

#

wont work

grim ice
#

They come with forge

#

Same as how spigot works

boreal seal
#

i would suggest you just change method names

grim ice
#

so It should work

boreal seal
#

mix everything

#

do it manually

#

not big deal

grim ice
#

I would prefer a machine doing it for me

boreal seal
#

machine wont do it better

quasi flint
prisma leaf
#

how to get the 1.8.8-R3 ??

boreal seal
#

i did actually code some plugins manually and throwed alot of shit into it

boreal seal
undone axleBOT
grim ice
#

Evan I just knew you would send that

#

Lmao

boreal seal
#

i use 1.8

quasi flint
#

And its right that He send that

grim ice
#

No

boreal seal
#

but no support for it

quasi flint
#

1.8 should die in peace

boreal seal
#

like 1.5.2 did

#

backthen we said 1.7.10 is dogshit

#

its just a question of time.

quasi flint
#

I dont wanna have people asking for 20 more years

grim ice
#

Aight so I take it that none of you know how to obfuscate forge mods (or don't want to explain)

quasi flint
#

I prefer the second

boreal seal
#

but like honestly

#

spigot is not the right place to ask it

#

if u want u can do it manually

grim ice
#

this server is always the right place to ask in

quasi flint
#

Or Just configure proguard right

boreal seal
#

its not

#

you want Choco to tell you it

#

if software is able to read it

#

human will be able

#

easily to read it

#

and reversing it backwards wont be an easy

#

its java

#

u dont like

#

dont use

quasi flint
#

Limited instructionset -> Bad obfuscation

#

Simplified AS shit

#

But

#

The Point still stands

grim ice
#

Welp

#

and btw

#

i didnt lie about the 300$

#

lol

boreal seal
#

what do u sell an anticheta?

#

anticheat?

grim ice
#

No

boreal seal
#

so what costs 50$ a copy

#

i dont get it

grim ice
#

It's quite funny actually

boreal seal
#

so what should be obsf

grim ice
#

It's a helper mod that edits another mod, to make it better

boreal seal
#

i dont think you should obsf it

quasi flint
boreal seal
#

better be opensource

grim ice
#

Though it doesnt depend on it

quasi flint
#

I will Sure hope

boreal seal
grim ice
#

I got an agreement from the mod owner

#

lol

quasi flint
#

U violate the license

#

So hard

#

Prob

boreal seal
#

ofcourse he want to obsf after stealing someone else resource

#

he dont want other to do same to his

quasi flint
boreal seal
#

not gonna help this person

grim ice
#

you're so smart

#

wow

#

Holy god you have issues lmao

quasi flint
#

Is the original Mod opensource?

grim ice
#

You just assumed 8 things in total

#

you're just salty I got 300$ off it lmao

quasi flint
#

Bruh

#

My man prob aint even working yet

#

Thats what i make in a good week

grim ice
quasi flint
#

Flexing with 300$ lol

grim ice
#

Just in case, where are you from

quasi flint
#

Germany

grim ice
#

Hmm ig

quasi flint
#

So 299,54€

boreal seal
#

i dont get it

#

who buys mods

#

now adays

grim ice
#

would've straight up not believed you if you said you were from an english country

boreal seal
#

what a thief

grim ice
#

too bad

#

It actually isnt me who gets the sales

#

It's my friend

quasi flint
grim ice
#

and he gets 20% off it

boreal seal
#

k k enough enough man this is plugin development

grim ice
#

he's also a tester

boreal seal
#

section

#

not spigot mod

#

i mean forge mod

#

for forge mods go to forge server

grim ice
#

Make me

#

💀

quasi flint
#

They will Love him lol

boreal seal
#

@worldly ingot

grim ice
#

bro really pinged him for this

#

AHAHHAHA

quasi flint
grim ice
#

unless choco is extremely biased

#

he wont do anything about it

#

and it seems to be the case judging from his overreaction about obfuscation

quasi flint
#

Are U ignoring me because u are blind or because u dont wanna admit the Mod Is opensource

grim ice
#

and your english is 40% incomprehensible

quasi flint
#

Do i care

#

No

grim ice
#

Surely you do, since you've been pinging me for quite a bit now even though I supposedly "ignored you"

wet breach
#

obfuscation is pointless. It has never stopped anything. Not sure why people keep thinking this

quasi flint
#

Look at Forge, before the official mappings existed

grim ice
quasi flint
#

Prime example

wet breach
grim ice
#

It did, trust me, just on certain communities

wet breach
#

point me to a source where it states that obfuscation in java has actually stopped anything

#

because so far it has never stopped me from reading the code, and has never stopped me from magically understanding bytecode

grim ice
#

Surely I won't find a huge project that was never touched because it was obfuscated, but as I said, this mod is nowhere close to any significant size

wet breach
#

don't care about the size

#

I have yet to come across any obfuscator that has made me stop understanding bytecode

grim ice
#

For the purpose, it will stop at least a few people from trying

quasi flint
quasi flint
#

To Not make people Inderstand it

wet breach
grim ice
#

Yes

#

Never denied that

#

that's exactly why I've been using "this community"

#

while you're using "the world"

wet breach
#

even in this community there is plenty of others who can understand bytecode just as well as I can

quasi flint
#

Bruh, you Just have to fucking learn Java Byte Code which is Not hard

grim ice
#

Not this community ahaha

wet breach
#

I have even helped plenty of people understand it as well

grim ice
#

you don't know the community im talking about

quasi flint
grim ice
wet breach
#

don't need to, obfuscation simply doesn't work for java because java was never built for such things in mind

#

and it never will be

#

you are just wasting time on it

grim ice
#

Well if you say so

wet breach
#

but if that is how you like to spend your time then go for it

grim ice
#

Honestly I was about to give up soon

wet breach
#

obviously your time isn't worth that much it seems

quasi flint
wet breach
#

As for the person complaining about people who buy mods or plugins

#

I sell plugins myself, just not to the public

grim ice
#

He's just plain salty lmao

wet breach
#

And yes it is worth it in most cases to pay someone to make something

#

then it is to grab something that is free

#

free does not mean it is better

grim ice
#

I do have a whitelist system on the mod actually

#

but yk

wet breach
#

how much something is worth is dependent on the person buying it

#

I have sold plugins well more or less my service and have made easily $1k-$2k off a single plugin

#

but such plugins are not like one day projects either

quasi flint
grim ice
#

please stop speaking

smoky oak
#

hey frosthalf how do u charge?

#

im curious

quasi flint
grim ice
#

I can't believe im actually about to block someone in a social media platform in this day and age lmao

wet breach
#

I have two ways I charge. How large of a project it is, that is if its going take multiple days to create and then I break it down to how many hours in that time frame

#

also it matters on the person or group I am dealing with

wet breach
#

the larger the organization, the higher I can bid at

grim ice
#

OH I just remembered

#

frostalf I've been meaning to ask you this

#

ElgarL told me earlier that replacing the first 2 or 3 bytes of a file

#

will stop certain tools from seeing its code, as its BOM is corrupted

#

something like that

wet breach
#

don't think code is the correct word to use here

#

generally the first nth bytes of any given file describes what kind of file it is. Removing those can break some tools, however there are some tools that don't care about the first nth bytes and determine the file type by its content. So he isn't exactly wrong but not completely correct either.

#

it is more difficult to know what kind of file something is, without the headers or first few bytes being there unless you already know the file type

#

this is how some archives work in games

#

like mpq for instance

#

mpq's give up nothing in regards to how they are constructed and you just simply have to know its structure.

grim ice
#

Ah

#

makes sense

#

I sorta want to try that

#

do I just replace them with 0s?

fleet comet
wet breach
#

however while mpq's are like that, it doesn't prevent trial and error and tampering with to reveal some of its data etc 😛

fleet comet
quasi flint
#

Once you are finished, I wanna try to deobfuscate your mod lol

wet breach
grim ice
#

Lmao it actually worked

#

gotta see if the jar still works tho

quasi flint
grim ice
wet breach
#

almost all the obfuscators work on the principle to make it hard to visibly read it

boreal seal
#

only 2 digit iq like 2hex

#

that C+V is mod

grim ice
wet breach
#

however, instead of trying to read it like you see it in an IDE, you only need to understand bytecode and can read what it does from there

boreal seal
#

his

grim ice
#

the 11th assumption you've made

wet breach
#

there is no obfuscator that can change how bytecode is interpreted

grim ice
#

brilliant

wet breach
#

unless you use a custom JVM that is

grim ice
#

and 99 iq is well above average

#

So yeah

#

well not really

boreal seal
#

its alright spigot citizens have 3 digit

grim ice
#

but it is somewhat average

boreal seal
#

and they dont ask to obsf forge mod in spigot help-dev chat

grim ice
#

since 85, is still normal

grim ice
#

it's sad that you're actually serious

#

I've wondered how childish you can be like 3 times but god is sending me answers

quasi flint
#

How old are u

grim ice
#

Definitely older than your mental age

worldly ingot
#

btw

boreal seal
#

Choco ban him already

grim ice
worldly ingot
#

Don't care

#

Question or leave

grim ice
#

Jeez alright

#

(except I was actually asking a question)

wet breach
grim ice
#

Nah, you already answered it haha

wet breach
#

your plugin whether it is an api, has to be specifically designed for bungeecord

#

just because it is on bungeecord doesn't mean that plugins on the mc servers can automatically use it from there either

#

even if you included it as a dependency

#

unless you shaded it in

#

dependency needs to be in the same place said plugin is going to run, whether it is on bungeecord or spigot mc server. Unless your API provides end points for plugins to communicate with it

wary harness
#

Is there any api

#

how to track amount of ram used per each plugin

#

or plugin which does that

wet breach
#

you would need a wrapper similar to like warmroast or whatever that need one is now

#

then you would need this api plugin on every server where a plugin will use it

iron glade
#

Ayo is this the right way to do this?

    public BaseComponent[] createClickableLink(String clickableLinkText, String URL, String hoverDescription) {

        BaseComponent[] front = TextComponent.fromLegacyText("§f§kX §r");

        TextComponent link = new TextComponent(clickableLinkText);
        link.setItalic(true);
        link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, URL));
        link.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText("§3☀ §f" + hoverDescription + " §r§3☀")));

        BaseComponent[] endText = TextComponent.fromLegacyText(" §f§kX");

        front[0].addExtra(link);
        front[0].addExtra(endText[0]);

        return front;

    }```
wet breach
#

yes because that is how plugins work

kind hatch
wet breach
#

this is doable

#

you are just thinking about it wrong is all

#

plugins can access whatever tables you want them too because MySQL is independent of everything

#

you can make your API accept arbitrary queries if you want it to

#

if all you want your API to do is be the proxy between the MySQL server and the plugins, that is what you would do

#

your API would just hold the connection and allow queries through it

iron glade
# kind hatch I mean, I like to use the ComponentBuilder.

So, would it look like this then?

    public BaseComponent[] createClickableLink(String clickableLinkText, String URL, String hoverDescription) {

        return new ComponentBuilder("X").color(ChatColor.WHITE).obfuscated(true)
                .append("").reset()
                .append(clickableLinkText).italic(true).event(new ClickEvent(ClickEvent.Action.OPEN_URL, URL))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText("§3☀ §f" + hoverDescription + " §r§3☀")))
                .append(" X").color(ChatColor.WHITE).obfuscated(true).create();
}```
wet breach
#

alternatively you could make use of redis

#

and this might solve your issue

#

why store the names?

#

you can access column names from resultsets already

#

you don't need to store them to do so

jolly gust
#

ItemStack i1 = new ItemStack(Material.DIAMOND);
i1.setAmount(16);
Hello everyone. How do I get the data above from another class without writing them there again? I know that somehow it is possible through getters, but I don't know how.

wet breach
#

?learnjava

undone axleBOT
wet breach
#

if it doesn't exist nothing is returned

grave vale
#

(className being the name of the class i1 is defined in)

worldly ingot
ivory sleet
#

you may not be able to

hazy parrot
#

What

ivory sleet
#

due to type erasure

eternal night
#

Well pass a Class<T>

wet breach
#

there is no way to instantiate generics directly

ivory sleet
#

yeah they are basically fake

wet breach
#

you can use supplier that has been around since java 8

#
class SomeContainer<E> {
  private Supplier<E> supplier;

  SomeContainer(Supplier<E> supplier) {
    this.supplier = supplier;
  }

  E createContents() {
    return supplier.get();
  }
}

resulting code to use would be this

SomeContainer<String> stringContainer = new SomeContainer<>(String::new);
hazy parrot
#

I think it w oui be better to explain what you are trying to do

#

For what reason

wet breach
#

here is another way of doing it

#
public class Test {
    public static void main(String[] args) throws IllegalAccessException,
            InstantiationException {
        Generic<Bar> x = new Generic<>(Bar.class);
        Bar y = x.buildOne();
    }
}

public class Generic<T> {
    private Class<T> clazz;

    public Generic(Class<T> clazz) {
        this.clazz = clazz;
    }

    public T buildOne() throws InstantiationException, IllegalAccessException {
        return clazz.newInstance();
    }
}

public class Bar {
    public Bar() {
        System.out.println("Constructing");
    }
}
onyx fjord
#

can i get itemstack used in ExpBottleEvent?

quaint mantle
#

Is using function like this is good practice? I found this somewhere but I wonder if I should use it. public Object getFieldValue(String field, UUID uuid) { try { PreparedStatement preparedStatement = connection.prepareStatement("SELECT " + field + " FROM players_data WHERE uuid = ?"); preparedStatement.setString(1, uuid.toString()); ResultSet resultSet = preparedStatement.executeQuery(); if (resultSet.next()) return resultSet.getObject(field); } catch (SQLException exception) { exception.printStackTrace(); } return "?"; }

wet breach
#

here is a factory pattern for such things

#
interface Factory<T> {
    T factory();
}

class Araba {
    //static inner class for Factory<T> implementation
    public static class ArabaFactory implements Factory<Araba> {
        public Araba factory() {
            return new Araba();
        }
    }
    public String toString() { return "Abubeee"; }
}

class Generic<T> {
    private T var;

    Generic(Factory<T> fact) {
        System.out.println("Constructor with Factory<T> parameter");
        var = fact.factory();
    }
    Generic(T var) {
        System.out.println("Constructor with T parameter");
        this.var = var;
    }
    T get() { return var; }
}

public class Main {
    public static void main(String[] string) {
        Generic<Araba> gen = new Generic<Araba>(new Araba.ArabaFactory());
        System.out.print(gen.get());
    }
}
#

this last way is actually more flexible then the previous two

#

because you don't have to worry about the reflection exceptions

wet breach
fleet comet
wet breach
#

what are you trying to accomplish?

#

we have no idea why those events are important for you, or how you are attempting to use them. It could be just that you are using incorrect events for what you are trying to accomplish

fleet comet
#

as an elytra course

wet breach
#

might instead want to try using this instead

fleet comet
fleet comet
#

so idk

wet breach
#

portalevent will only work if an exit portal will be generated

fleet comet
#

im using myworlds btw

wet breach
#

don't know what that is

#

anyways, the other thing you could probably do is just see if they are touching a portal frame

#

probably easier to build and cache a bounding box around the portals

#

then you can detect from the moveevent if they touched one

#

then you can do the teleporting yourself

onyx fjord
wet breach
onyx fjord
#

i have a special experience bottle thats supossed to have PDC in it with some info

#

i want to get that info on throw

worldly ingot
#

ExpBottleEvent is called when the entity hits the ground, not when released from the hand. There is no associated item stack

worldly ingot
#

That's the display item, not the actual item used when thrown

wet breach
worldly ingot
#

You'll have to make use of a Map to keep track of which exp bottle was spawned to the item that was used in a ProjectileLaunchEvent afaik

onyx fjord
#

is event.getEntity().getShooter() item in main hand still available on ProjectileHitEvent ?

#

or throw*

#

im assuming no

fleet comet
#

but the movement event doesnt work

worldly ingot
#

Don't think so. It's past that point afaik

wet breach
fleet comet
#

idk why or where tried debugging its not even getting past the block check

wet breach
#

then look at your condition then

#

see why it isn't being placed in the list you are expecting

fleet comet
wet breach
#

you probably haven't

#

are you sure the instance you are grabbing is the same one that you are putting information into?

#

however regardless you haven't shown the relevant code though for your problem, only showed code for your listener, and not all of your listener which isn't the issue anyways it seems

#

debug your collection

#

when you put something in there, output a debug message

#

then output what the collection is holding

#

and then do this from your listener class

#

see if it matches up

fleet comet
#

ok

#

the data.yml works fine

#

ik that

#

just not abt the hashmap

shrewd sphinx
#

what

#

why does spigot keep eating my spaces

chrome beacon
#

Which adds a line over all characters

#

including spaces

grim ice
#

i always like wonder

#

if its possible to make a machine, that scans ur surroundings and show u where a football is gonna end up

#

over ur eyes

#

lmao

#

or if theres a suit that can somehow know what ur thinking about and if ur wanting to see smth behind u, then it shows u a screen of whaats behind

#

so u technically have 360 degrees vision

shrewd sphinx
onyx fjord
#

can i force XP orbs not to merge?

iron glade
#

I just realized how annoying the spigot built-in component stuff is

#

adventure doing that way better imo

agile anvil
#

merge-radius:
exp: distanceToMerge

grim ice
#

9999

#

ez

onyx fjord
#

maybe a different question, will unique orbs (for example with different PDC) still merge?

vocal cloud
#

Try it and see kinda thing

agile anvil
vivid skiff
#

How can i block a player from moving but with out blocking the head rotation to?

chrome beacon
#

Listen to the move event and cancel it if the x,y or z has changed

undone axleBOT
shrewd sphinx
#

does setCancelled work on the BlockPlaceEvent?

#

as in so it actually doesnt place the block

#

ok then im defo doing smth wrong bc it isnt working ofrm e

#

(it places the block)

#

thing is it places the block and then cancelles any event after that

chrome beacon
#

Use .equals()

shrewd sphinx
#

.equals

#

yes i know im just tired af rn

#

or in my case a even better idea would be to put the item names that i want to ignore in a table and do a for loop that just loops through it

#

¯_(ツ)_/¯

vivid skiff
fleet comet
#

Making an elytra minigame plugin and this code detects when they touch blocks so override blocks they CAN step on and finish blocks, for some reason at the finish it resets them and doesnt remove the player from the inCourse hashmap, no idea why

#
@EventHandler
    public void onWalk(PlayerMoveEvent e) {
        Bukkit.getLogger().severe("debugging, event calls");
        Bukkit.getLogger().severe(a.inCourse.toString());
        if (a.inCourse.containsKey(e.getPlayer())) {
            Bukkit.getLogger().severe("debugging, passes check");
            String s = a.inCourse.get(e.getPlayer());
            Block block = e.getPlayer().getLocation().subtract(0, 1, 0).getBlock();
            Bukkit.getLogger().warning(block.getType().toString());
            if (block.getType() == Material.BEDROCK) return;
            if (block.getType() == Material.GREEN_CONCRETE_POWDER) {
                Player p = e.getPlayer();
                Bukkit.getLogger().severe("debugging, passes check");
                e.setCancelled(true);
                String course = a.inCourse.get(p);
                Location w = Bukkit.getWorld("world").getSpawnLocation();
                p.teleport(w);
                p.sendMessage(ChatColor.GREEN + "You completed this course!");
                Boolean aD = (Boolean) a.getData().getConfigurationSection("cd." + p.getUniqueId()).get(course);
                if (aD == null) {
                    p.sendMessage(ChatColor.GREEN + "You leveled up!");
                    int currentLevel = a.getData().getInt(p.getUniqueId() + ".level");
                    a.getData().set(p.getUniqueId() + ".level", currentLevel + 1);
                }
                a.getData().getConfigurationSection("cd." + p.getUniqueId()).set(course, true);
                a.inCourse.remove(p);
                p.getInventory().remove(Material.ELYTRA);
                p.getInventory().remove(Material.FIREWORK_ROCKET);
                return;
            }
            if (!(block.getType() == Material.AIR)) {
                e.getPlayer().sendMessage(ChatColor.RED + "You failed!");
                e.getPlayer().teleport(a.getData().getLocation("course." + s));
            }
        }
    }```
#

info at top ^-^

compact haven
#

what

fleet comet
#

no.. thats not that long ago

river oracle
#

you can't instanciate a generic

#

thats not how they work

#

I mean you could but I feel like you are kinda just abusing them at that point then

#

also don't understand why you'd even need to do a generic like this for a resource query

vivid skiff
#

It works, thanks

jaunty crag
#

how can i check what entity just spawned

#

i have my events set up i just need to figure out what to put after the == in my if statement

#

still does not really help because I do not know how to compare it

#

like idk if i do Entity. or what

#

Entity. does not give me anything

wild cedar
#

Hey, is there any good tutorial for auto building bukkit/spigot plugins in jenkins from GitHub? I have found one on bukkit forums but it is too old

jaunty crag
#

alright thank you!

jaunty crag
#

will do

#

im sorry wdym by entityclass

#

ohhh

#

just type zombie

#

alright

#

yeah

#

alright i just wanted to make zombies have top hats just purely to mess with my friends

#

what mobs have helmet slots?

#

is it just like humanoids or can others too

#

thats a shame

#

can i use pig saddles slots for stuff or no

#

wait

#

nvm

#

i just figured villagers

#

do you know of any way to detect when a player clicks on an item slot with shift click

#

alright

ruby fjord
#

How to generate with BuildTools spigot 1.8.1 and 1.8.2?

vocal cloud
#

Probably by not using those versions

ruby fjord
#

Please, don't simp

hasty prawn
#

I don’t think BT existed when 1.8.1 or 1.8.2 were latest

#

Afaik the oldest version BT can build is 1.8.8 I think

ruby fjord
raw sky
#

I want to summon a mob and store values about it such as speed and maxSpeed, whats the best way to do this and store this value? The mobs will be despawned after the server shuts down

raw sky
#

ok ty! imma go look into it on some random forum

ruby fjord
hasty prawn
ruby fjord
#

net.minecraft.server.v1_8_R2

#

and this

hasty prawn
#

That should exist in the 1.8 build, R2 is the 1.8.3 build

#

And I suppose R3 is 1.8.8

ruby fjord
#

mmm, Didn't think about that, I will try and tell you, thanks mate

ruby fjord
raw sky
#

Orange

ruby fjord
#

and what color is your hair?

raw sky
#

Blonde

#

bald

ruby fjord
#

exactly

#

xD

ember estuary
#

Is there any way to hide the score on a scoreboard? (the red number on the side)

#

ok ty

#

public static <T extends OtherClass> T yourMethod(Class<T> subClass) {
return subClass.newInstance();
}

#

if i understood it right

raw sky
#

Any good place to pretty much learn Java again? I can do most things in spigot but I struggle when ever it comes to java project, hell I didn’t even know what the new keyboard was up until 5 minutes ago

undone axleBOT
raw sky
#

Ty

raw sky
fleet comet
#

heyyy guys so when i teleport player to a world it only teleports them if they have operator perms, i have no other world management plugins and i dont know wtf is going on

raw sky
#

Personally multiverse is my go-to and it works wonderfully

fleet comet
raw sky
#

Well that’s weird I’ve never had that happen, are you teleporting them to one of the default 3 worlds (world nether end) or a custom one?

fleet comet
#

i load it on enable tohugh

#

tho

raw sky
#

How are you teleporting the player rn? Is it just in your own plugin

fleet comet
#

and a is the main plugin

#

courses is the world

raw sky
#

Can you try and do it a tick later? I’ve had a issue with teleporting and I made it run a tick later and it worked well

#

When do you run that code? Looks all correct to me

fleet comet
# raw sky When do you run that code? Looks all correct to me
@Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            if (args.length == 0) return true;
            switch (args[0]) {
                case "start":
                    if (a.getData().contains("courses." + args[1])) {
                        Location locUn = a.getData().getLocation("courses." + args[1]);
                        Location loc = new Location(a.courses, locUn.getX(), locUn.getY(), locUn.getX());
                        player.teleport(loc);
                        player.getInventory().setChestplate(a.elytra);
                        player.getInventory().setItemInOffHand(a.rockets);
                        player.sendMessage(Artifact.construct("&aStarted course &f" + a.getData().get("courses." + args[1])));
                        a.inCourse.put(player, args[1]);
                    }
                    player.sendMessage(Artifact.construct("&cThat's not a course"));
                    break;
                case "create":
                    if (player.hasPermission("course.create")) {
                        a.getData().set("courses." + args[1], player.getLocation());
                        player.sendMessage(ChatColor.GREEN + "Created new course " + args[1]);
                    }
            }
        }
        return false;
    }```
fleet comet
#

just not to the world

#

so if i am in the courses world

#

is teleports to that cords

#

but not if im in "world"

raw sky
#

So the issue is when you teleport to the other world, not the actual cords? Is there anything in logs

#

I will be on my computer soon so I can actually help a little more

fleet comet
#

nothin in logs

#

but yes that is the issue

raw sky
jaunty crag
#

any event for pickup that isnt depricated

pseudo hazel
#

EntityPickupItemEvent

drowsy helm
#

no

#

thats not how dependencies work

worldly ingot
#

If your plugin is running on the proxy, only proxy plugins can use it. You can only use proxy API. Not Bukkit API

drowsy helm
#

wait are you talking about plugins on the proxy

#

or pluginjs on other servers

worldly ingot
#

Same goes for server plugins using Bukkit API

wind tulip
#

is running Thread.Sleep inside of a runnable viable?

#

I saw something about it on the forums

dim palm
#

how can i modify a seeds age

worldly ingot
#

Sure but you should probably avoid it at all costs

hazy parrot
#

Inside of runnable doesn't change anything

drowsy helm
wind tulip
#

oh awesome

drowsy helm
#

yeah nah

#

it's not in the same jvm

#

i mean

#

you could cache player data on the proxy and use something like redis or channel messaging to send it to the instances

#

but a db query really isn't that taxing as long as you're doing them efficiently

nimble hill
#

How would I go about asking if a player can break blocks at a given location?
For example, to allow a player to do a skill, i need to know if they can break blocks in that area.
For instance, there are WG flags, or a claim, and i need to be able to check that. How would i go about doing that?
I Tried:

BlockCanBuildEvent can = new BlockCanBuildEvent(e.getBlock(), p, e.getBlock().getBlockData(), true);
            Bukkit.getServer().getPluginManager().callEvent(can);
            if (!can.isBuildable()) {
                return;
            }

But it does not seem to be working
Any ideas?

#

Im stumped

drowsy helm
#

if its cancelled, then you cant break

nimble hill
#

Mmm thats not going to work because theu might not actually be breaking a block

drowsy helm
#

they don't have to be breaking the block

#

you are just querying whether they can

nimble hill
#

Or is it something different

#

Lemme try it and ill let you know!

dim palm
#

what is the wheat seed material

#

that can be placeable

#

WHEAT_SEEDS or WHEAT

worldly ingot
#

The item is WHEAT_SEEDS, the block seeds is WHEAT

nimble hill
drowsy helm
#

show your code

nimble hill
#

Sure one sec

#
        J.s(() -> {
            if (p.breakBlock(p.getLocation().getBlock())) {
                p.sendMessage("You cannot");
            } else {
                p.sendMessage("You can");
            }
        });

returns true when in an area i cant break anything.

        BlockBreakEvent e = new BlockBreakEvent(p.getLocation().getBlock().getBlock(), p);
        if (e.isCancelled()) {
            p.sendMessage("You cannot adapt right now.");
            return false;
        } else {
            p.sendMessage("You can adapt right now.");
        }

in an area where i cant also returns true

#

The J.s
is a Bukkit Sync Runnable

#

Ignore the shorthand

#

Oh wait

#

DO i need to Bukkit.getPluginManager().callEvent(event);

drowsy helm
#

yes

nimble hill
#

Mmm im exhausted and just realized that ok lemme give that a try

drowsy helm
#

lmao

nimble hill
drowsy helm
#

nws lol

subtle folio
#

How do I break out of a repeating task?

worldly ingot
#

Asking nicely

subtle folio
#

Got it

worldly ingot
#

You have a few ways. How are you invoking your task?

subtle folio
worldly ingot
#

oop

subtle folio
#

Im using Bukkit.getScheduler().scheduleSyncRepeatingTask

#

with an anonymous lambda

worldly ingot
#

() -> {}?

subtle folio
#

yup

worldly ingot
#

You can pass a task -> argument and call task.cancel()

subtle folio
worldly ingot
#

runTaskTimer() instead

#

same method params, but more modern

subtle folio
#

I see

#

tysm!

#

❤️

worldly ingot
#

o/

subtle folio
# worldly ingot o/

Ive come back, if I put code after the Runnable will it get run once its complete or will I have to handle that in the runnable?

worldly ingot
#

After the runnable

#

In the runnable*, sorry

subtle folio
#

Awh, thanks again

patent onyx
#

I'm trying to embed a web server via the HttpServer class in a plugin and when I call my /test endpoint, call an event from the HttpHandler class handle method. when I call the endpoint without the event call, it works fine and delivers a response. when I add the event call, the response is empty. Has anyone worked with something like this before?

#
        public void handle(HttpExchange t) throws IOException {
            logRequest(t);
            MyEvent event = new MyEvent();
            Bukkit.getPluginManager().callEvent(event);
            String response = "{}";
            t.sendResponseHeaders(200, response.length());
            OutputStream os = t.getResponseBody();
            os.write(response.getBytes());
            os.close();
        }
lost matrix
quaint mantle
#

Can i set blocks on a different thread? (I'm on phone so cant test atm)

lost matrix
quaint mantle
#

I c

icy beacon
#

trying to make a serialize-deserialize for my object, am I doing it correctly? a line is showing unchecked cast, but I'm pretty sure I checked everything, is it just an ide error?

    @NotNull
    @Override
    public Map<String, Object> serialize() {
        return Map.of(
                "statistics", statistics,
                "runeTier", runeTier,
                "headItem", headItem
        );
    }

    public static Rune deserialize(Map<String, Object> map) {
        Object objectifiedStatistics = map.get("statistics");
        if (!(objectifiedStatistics instanceof List<?> statisticsList)) return null;
        if (statisticsList.stream().anyMatch(o -> !(o instanceof RuneStatistic))) return null;

        List<RuneStatistic> statistics = (List<RuneStatistic>) statisticsList; // Unchecked cast

        return Rune.builder()
                .statistics(statistics)
                .runeTier((int) map.get("runeTier"))
                .headItem((ItemStack) map.get("headItem"))
                .build();
    }
lost matrix
icy beacon
#

yeah

lost matrix
#

You would have to check for instance of List<RuneStatistic> in order to make this cast checked.

#

Which makes the stream useless btw

icy beacon
#

oh, i could do directly that?

#

alright

#

thx

#

by the way, do i need to make enums configurationserializable?

lost matrix
#

I didnt use the spigot serialisation system for quite some time because there are much better alternatives
but i would assume that enums are serializable on default. But ill check the implementation.

lost matrix
icy beacon
#

well, i have this enum:

public enum Bonus {
    DAMAGE(double.class, 0.2, 1.5),
    EXP(int.class, 1, 2),
    ...

    @Getter private final Class<?> type;
    @Getter private final Number min;
    @Getter private final Number max;

    Bonus(Class<?> type, Number min, Number max) {
        this.type = type;
        this.min = min;
        this.max = max;
    }
}

i don't see how it would be serialized, shouldn't i just put a name and then fetch it with valueOf?

#
public static RuneStatistic deserialize(Map<String, Object> map) {
        return new RuneStatistic(
                Bonus.valueOf((String) map.get("bonus")),
                (Number) map.get("boost")
        );
    }
lost matrix
#

You should add tighter constraints to your class field Class<? extends Number>

icy beacon
#

i probably should yeah

icy beacon
#

cool, thanks, will try that now

lost matrix
#

You can also make the enum ConfigurationSerializable

icy beacon
#

yeah, but isn't that just too much hassle

lost matrix
#

I mean it saves you the String conversion every time you need to serialize it anywhere.

icy beacon
#

i guess so, if i will need to serialize it somewhere else, i'll make it configurationserializable

#

thanks for your help 😄

lost matrix
#

Nope i implemented my own data types

icy beacon
#

oh, that could also work

#

i'm just trying to make it so i can use it with PDC

#

so, should Rune implement PersistentDataType?

lost matrix
#

PersistentDataType is an external serializer

#

It converts from Object to primitive and back

#

*primitive including String

icy beacon
lost matrix
#

So its completely disjunct from ConfigurationSerializable

icy beacon
#

i'll try to follow along but i may ask for tips

icy beacon
boreal seal
#

PDT isnt really good soluation

#

use a hashmap instead and custom objects

icy beacon
#

why so?

lost matrix
boreal seal
#

it would work

#

the same

icy beacon
#

PDT seems more in-place

lost matrix
icy beacon
#

yep, Player

lost matrix
#

Well then pdt is a good approach

icy beacon
#
  @NotNull
    @Override
    public String[] toPrimitive(@NotNull Rune complex, @NotNull PersistentDataAdapterContext context) {
        return new String[0];
    }

    @NotNull
    @Override
    public Rune fromPrimitive(@NotNull String[] primitive, @NotNull PersistentDataAdapterContext context) {
        return null;
    }

this is just serialize-deserialize but with a String, right?

lost matrix
#

And fiddling with external serialisations would only make sense if you had multiple servers and need shared data

lost matrix
icy beacon
#

oh yeah, meant to use String

lost matrix
#

Yeah looks like you can use them as primitives

icy beacon
#

I think I figured out how to setup the morePDT solution:

public static PersistentDataType<byte[], Rune> runeType = new ConfigurationSerializableDataType<>(Rune.class);