#dev-general

1 messages · Page 210 of 1

static zealot
#

that guy apparently ... xD

hot hull
#

While we be here shading 2mb shit without giving a care smh

gentle coyote
#

Can somebody tell me what the maximum amount of rows in an inventory is?

hot hull
#

9

#

Wait no what

#

6

#

Idk why I said 9

gentle coyote
#

Thank you^^

prisma wave
#

Technically it's higher but the client glitches out with anything higher

hot hull
#

Shut up zoomer

distant sun
#

Lmao @ocean quartz

#

Tell them to make their own lib

onyx loom
#

damn i wanna see their reaction when find out kotlin jar size if they complaining about 90kb LUL

static zealot
prisma wave
#

elara standard library will take away 30kb

onyx loom
#

30kb for print functionalities 🙂

prisma wave
#

no

#

-30kb

static zealot
#

xD

onyx loom
#

O

ocean quartz
#

You put it in the server and it deletes your files kek

onyx loom
#

👀

digital patrol
#

ok uhh

#

i paid some guy to do my server setup

#

i thought it was done

#

i uploaded all files

#

[SQLITE_CORRUPT] The database disk image is malformed (database disk image is malformed)

#

thats the error

#

and when i login it says please wait connecting to database

compact perchBOT
#

There is no time to wait! Ask your question @chrome obsidian!

surreal quarry
#

dont post in ehre asking for help somewhere else

#

someone will see it

obtuse gale
#

where is my error here : player.getInventory().addItem(new ItemStack(Material.IRON_SWORD, 3));

Error line : ```Mutiple markers at this line

  • The Constructor ItemStack(Material, int) is
  • The method addItem(ItemStack...) in the type Inventory is not applicable for the arguments (ItemStack)```
ocean quartz
obtuse gale
#

ok ty

obtuse gale
#

I need project ideas

#

Not MC related, wanna be able to do it on my macbook

hot hull
#

@obtuse gale Moosic app

obtuse gale
#

Y

#

What would it dk

#

Do

hot hull
#

Play music...

obtuse gale
#

Y tho

hot hull
#

Bruh you said you wanted a project

obtuse gale
#

I mean well yeah but like doesn't that already exist...

hot hull
#

:bruh:

obtuse gale
#

lol

regal gale
#

Make your own

quiet depot
#

lol aj who cares if it already exists

onyx loom
#

most things uve made probably exist already anyway thonk

winter iron
#

How would I go about changing how fishing works in terms of lure but without the enchant

#

I want it to increase based on some upgrade

#

that isnt lure

#

enchant

steel heart
#

I think there is an attribute for luck that might be a factor of fishing

winter iron
#

ok ty

misty coral
#

Is there any event that works like InventoryClickEvent but for player opening own inventory too?

#

I need to have what action player made, what items he moved and where, what he have in cursor etc

steel heart
#

There's InventoryOpenEvent and InventoryDragEvent and InventoryInteractEvent iirc

misty coral
#

InventoryOpenEvent and InventoryInteractEvent do not have that what i need, InventoryDragEvent do not work in player eq

carmine delta
#

Is this where I can ask for help with fixing a bit of my code?

steel heart
#

Is there any event that works like InventoryClickEvent but for player opening own inventory too?
wth do you need then?

#

yes SAO

carmine delta
#

Ah okay.

hot hull
#

@ocean quartz Dms smh

ocean quartz
#

Oh, i forgot

quasi ice
#

Excuse me how i can download all the placeholders with one command?

surreal quarry
#

wot?

#

placeholderapi?

obtuse gale
#

yes

#

all the placeholders

frail glade
#

clip, I'm your biggest fan! I've downloaded all the PlaceholderAPI expansions!

surreal quarry
#

what a big fan of clip

lavish notch
#

How can I replace text in a TextComponent, with another TextCompenent?

obtuse gale
#

setText getText

#

lol

lavish notch
#

Mind providing an example?

obtuse gale
#

component1.setText(component2.getText()).....

#

I mean..... it isn't rocket science lol

lavish notch
#

Cheers

#

wait.

#

Oopse... My bad, didn't word my question right. I want to replace for example {xyz} in a TextComponent, with another TextComponent.

obtuse gale
#

oooh

#

so, like, composite/nested components

lavish notch
#

I guess

obtuse gale
#

hmmmmmmmmmmmmmmmmmmmmmmmmmmm

remote goblet
#

@ocean quartz How would you define PathfinderGoalFollowEntity ?

#

I'm confused on how to make a custom entity follow a player in pathfinding sadcat

obtuse gale
#

entity.teleport(player.getLocation())

#

Ez

#

👌

ocean quartz
#

I sent you the link to mine .-.

#

You get the abstract navigation and do a to the player entity and it'll path towards it

obtuse gale
#

AAAAAAHHH!

ocean quartz
#

Or if you're not making the plugin public on spigot then just use paper's mob api

remote goblet
#

Yours completely confused the everloving fuck out of me

ocean quartz
#
override fun a(): Boolean {
    // Basically makes it run only once a second
    if (!shouldRun()) return true

    // Gets the distance between the player and the pet
    val ownerLocation = owner.location.clone()
    val distance = petInsentient.distance(ownerLocation)

    // Checks if distance is less than the follow distance
    if (distance < followDistance) return true

    // Checks if distance is less than the tp distance
    if (distance < tpDistance) {
        // Walks to player
        navigation.a(owner, movementSpeed)
        return true
    }

    // Teleports to owner
    petInsentient.setPosition(ownerLocation.x, ownerLocation.y, ownerLocation.z)
    // TODO despawn pet if player goes too high
    return true

}

It's not that complicated

obtuse gale
#

override fun
that doesn't sound very friendly 😦

ocean quartz
#

You're just overriding one fun with another, it's still fun, just a different one

surreal quarry
#

you decide the new amount of fun

obtuse gale
#

0

#

return false

#

Integer.MIN_VALUE

surreal quarry
#

now that... that is not fun

ocean quartz
#

String.MAX_VALUE

obtuse gale
#

poggers

remote goblet
#

yeah it still confused me

true edge
#

I need help from a MC dev.

#

It's such a minor issue but I really need help with it .

ocean quartz
true edge
#

there's a full on dissection of code language happening in that channel I don't wanna be a dick and disrupt it .

quiet depot
#

just disrupt it, this isn't a training centre for polite, interruption-less conversations, it's a support chat

true edge
#

They stopped so I have gone ahead , thanks anyways.

#

and no, you wouldn't disrupt mid sentence if two people are talking that's is literally the exact same thing.

true edge
#

I can't post my problem as the photo is more understanding than writing it out .

ocean quartz
#

You can explain the problem and post the image as well

true edge
#

What, where??

obtuse gale
#

?imgur

compact perchBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.

true edge
#

I see , thank you

obtuse gale
#

you can also say "shit I can't post images" and barry will tell you what to do

true edge
#

Barry seems like a nice guy

obtuse gale
#

specify an api version then in the plugin.yml lol

#

api-version: 1.13

true edge
#

._. wut

obtuse gale
#

add api-version: 1.13 to ur plugin.yml

true edge
#

.plugin has a folder for the plugin folder?

obtuse gale
#

what?

true edge
#

Does .plugin have a folder for the plugins folder?

ocean quartz
#

Are you the dev of the plugin you're talking about?

obtuse gale
#

.plugin?

true edge
#

I don't understand what you mean Matt.

obtuse gale
#

did you code this plugin

true edge
#

Ohhhh

#

No no

ocean quartz
#

Oh this isn't an mc dev question then, it's just a plugin question
It's a warning, it's not an issue, the plugin dev should know what it's doing, if it doesn;t have that it most likely is an outdated plugin

true edge
#

Okay so, I paid my minecraft developer who lives in Ukraine to make me a custom plugin the file itself is like 3 kb as I needed something so minor done hence the file size and basically he is away and won't be active for two and a half days where I needed this plugin so I could disable the whitelist.

#

But I am having to be put on hold for such a minor problem

ocean quartz
#

I mean the plugin should be working, the api version shouldn't be that big of a problem here

true edge
#

Restarted the server that plugin wasn't even visible then went into my filezilla, made sure it was there and it was in with the other .jar's and so I ran through console. Saw that error and told my bud just before he went offline and he said It’s legacy material support don’t allow initial
No, it just need recompile file

obtuse gale
#

I kinda didn't get that last part lol

true edge
#

yea that was the Ukraine guys text.

#

I don't know what that means you guys can't understand what he means we're both fucked.

obtuse gale
#

I don't speak butchered english sadly

true edge
#

Wait , if I was to change my server version in control panel would that work as I am on paper and he setup one test server I think under plain 1.16.3

obtuse gale
#

does the plugin use any blocks, sounds, particles, entities...?

ocean quartz
#

I think just opening the jar in winrar or something like that and adding the api version should do it

obtuse gale
#

depends

#

does the plugin use any blocks, sounds, particles, entities...?
that's why I'm asking this lol

ocean quartz
#

Yeah but either way it should work fine if it didn't

true edge
#

Basically that plugin in a nutshell does this It announces in chat who currently has the Dragon Egg and when the original player has the Dragon egg stolen it says in chat "Player has stolen Dragon Egg from player"

ocean quartz
#

It's just a warning not an error

true edge
#

that's all .

#

hence 3kb file

#

and how would I go about getting a 1.16.3 api version and where would I put it?

obtuse gale
#

Eeh you can give it a try I guess:

  1. Open the jar with winrar/7zip
  2. Extract the plugin.yml out of it
  3. Edit it and at the very top add an extra line that reads api-version: 1.13
  4. Save the yml and put it in the jar with winrar/7zip again
true edge
#

Okay 🙂

#

at the very top where?

#

I have got it open and am looking at the code

obtuse gale
#

how many "very top"s are there?

true edge
#

no, like what number?

obtuse gale
#

any, really lol

#

but it has to be at the very very left

#

no spaces before it

true edge
#

I first pasted it and it vanished like it just disappeared so this is the second copy paste is that right?

obtuse gale
#

is that the plugin.yml?

#

or a config.yml?

true edge
#

plugin.

obtuse gale
#

what kind of madman puts comments in his plugin.yml......

#

put the api-version: 1.13 somewhere where there aren't any # at the left

true edge
#

The file only has plugin.yml

#

[ERROR] .... Could not load 'plugins/DragonEggAnnounce.jar' in folder 'plugins' but the "Couldn't specify an api version" has gone that is the only error I am getting now.

obtuse gale
#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
HelpChat Paste - Usage
Hastebin

obtuse gale
#

paste the full error ig..

woeful summit
#

Hi guys.

obtuse gale
#

sup

woeful summit
#

Does anyone know how to make Wither Skeletons spawn more often in the Nether on my server?

#

Not by increasing the whole mob spawn rate.

#

Just for Wither Skeletons in Fortresses.

#

How could I do that?

obtuse gale
#

invalid url

true edge
ocean quartz
#

You might wanna send everything that is on the plugin.yml file

true edge
#

Uh, where?

obtuse gale
#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
HelpChat Paste - Usage
Hastebin

true edge
#

You're going to laugh when you see the plugin.yml I sure did .

ocean quartz
#

What the hell is this

true edge
#

That is the plugin lol

ocean quartz
#

This is a config file as the plugin.yml what

obtuse gale
#

that's no plugin.yml

#

lmao

#

wtf

true edge
#

that was the only file in there under plugin.yml 😂

#

matter of a fact that is the only file

#

😂

ocean quartz
obtuse gale
#

yeah what the fuck

true edge
#

Lol so what now?

#

Is it fixable?

obtuse gale
#

just redownload the jar

#

and ignore the warning

#

and wait for the dude

true edge
#

The dude puts config file as the plugin.yml though I don't wanna go back and ask for help :/

obtuse gale
#

don't ask

#

just

#

wait for him to be back xD

#

and ask to fix that warning

#

that's all you need to say lol

true edge
#

Could I pay one of you guys right now to fix it :-:

#

I have had my server blueballed too much I just want to be able to turn the whitelist off

#

and invite players

#

this is the last thing I need this plugin that's all.

obtuse gale
true edge
#

Pays guy from Ukraine to setup stupid simple plugin takes 3 irl days goes on dodgy discord server gets wind of plugin configuration guy offers and it'll take the dude 20 minutes I hate the approaches I take with people sometimes lol ( talking bout the Ukraine guy )

obtuse gale
#

f

true edge
#

Yuppers.

glass shadow
obtuse gale
#

bruh ive been working on a project for 6 months and i cba to do it but i need to finish it....

#

I just keep running into new problems

#

and my code styles changed like alot in 6 months

#

so its kinda messy

real harbor
#

idk why but this querry wont work (should work),
@bot.command() async def test(member): cursor = my_db.cursor() cursor.execute("SELECT score FROM ajparkour_scores WHERE name LIKE " + str(member)) abc_dd = cursor.fetchall() abc_dd = abc_dd[0][0] score = abc_dd[9:(len(abc_dd)-1)] print(score)

prisma wave
#

What's not working

#

Also you shouldn't use string concatenation in queries

quiet depot
hot hull
#

One day I'll properly use prepared statements :((

quiet depot
#

imagine writing queries manually

regal gale
#

Boi so you've not been using preparedstatement the whole time? thonking

hot hull
#

I just String.format that bitch

prisma wave
#

😳

obtuse gale
#

weak

#

I just make the user input the entire query

obtuse gale
#

@half harness so what do i have to do now

half harness
#

ask in #development or if its busy and dev general isn't busy then ask here

obtuse gale
#

why cant u answer it tho

half harness
#

bc im partly busy

obtuse gale
#

oh

#

k

ocean quartz
#

Curious to know how you guys would approach this problem
Basically when writing the yaml let's say 3 paths:
path.one -> "one"
other -> "two"
path.two -> "three"
Then writing as

path:
  one: "one"
  two: "three"
other: "two"

My solution is to map it into a String, Object map where it'll be saved by parent, for example path is a parent to the map one -> "one" and two -> "two"
But not sure if that'd be the best solution

quiet depot
#

so Object in this case, could either be a String or a Map<String, Object>?

ocean quartz
#

Yeah, if object is instance of map, it means there is children, if not then it's just writing it's value

#

Iirc snakeyaml reads it like that, so i guess writing it like that would make sense

quiet depot
#

yeah

#

that's what I do

ocean quartz
#

Alrighty, probably gonna have to do some sort of recursion on it at some point yikes

quiet depot
#

eh

#

nah

#

you shouldn't be doing it manually

#

load -> get file contents, snakeyaml deserialize to Map<String, Object>, convert to json tree (gson), map to object (gson)
save -> object instance to json tree (gson), json tree to Map<String, Object>, snakeyaml dump to string, write contents

ocean quartz
#

Oo interesting you turn it into json
Not a bad idea

quiet depot
#

to be fair, pretty sure snakeyaml has object mapping functionality

#

i just don't know how to use it so I cheat & convert to gson

prisma wave
#

You may want to consider a Trie structure too

#

I believe they're pretty much this

#

if you want an overengineered solution that is

steel heart
prisma wave
obtuse gale
#

Yes

#

That's my mouth in action

steel heart
#

lol

obtuse gale
#

Now the real question is

#

What is that shadow casted onto my eye

steel heart
#

yo wtf

obtuse gale
#

Yeah go figure that out now

#

Spooky

steel heart
obtuse gale
#

mystery unsolved?

#

no way to know according to matt

steel heart
#

lol

lavish notch
#

1.12 and below... how do I get the item's name from String? (IE: Birch Wood, instead of Log)

#

(...and before yous say/ask, I don't care about client side languages or whatever)

prisma wave
#

with medium to high difficulty

#

afaik there's no reference for that on the server side, it's all done client side

#

all the server knows is WOOD and a data number

#

So you'll probably have to make your own "database" or I think vault or essentials has one

steel heart
#

isnt it possible through nms or smtng, like to see what locale the client is using

prisma wave
#

you can find out the client's locale yes

#

but that doesn't include the actual localization

obtuse gale
#

there is a slight chance that you could, maybe, probably, get away with it using TranslatableComponents, not entire sure how that works with item ids and data but I'm sure you could find something if you're roaming around craftbukkit code

lavish notch
#

I would ask for some spoon fed code, as I don't fully understand java myself.

prisma wave
#

I doubt there is any

steel heart
#

I mean Material.matchMaterial is the best match perhaps?

lavish notch
#

I'm doing that currently

prisma wave
#

the point is the server doesn't know anything about what Birch Wood represents, so there's no way to parse that to a material without making your own dictionary

lavish notch
#

Just not sure what to do from there

prisma wave
#

the best workaround I can think of is XMaterial for 1.13

lavish notch
#

Well... 1.13 has better items names. so that isn't an issue.

#

it's 1.12, to 1.13

prisma wave
#

yeah I know

#

but I think XMaterial can parse 1.13 names too right?

#

and then convert them back to 1.12

#

which is probably your best option

lavish notch
#

Aight.

lavish notch
#

I have the following Map;
Map<Material, Map<Short, Integer>> soldMap = new EnumMap<>(Material.class);

and soldMap.values().toArray()[i].toString() (when looping through each entry) returns {Number=Number}. How do I get the numbers separately?

steel heart
#

dud

#

Use a Table perhaps?

#

2 keys and a value

obtuse gale
#

who in his sane mind at this day and age uses shorts lol

steel heart
#

u short

obtuse gale
#

dude

#

I'm like

#

1.86 mts

#

don't bully

#

pls

gentle flare
#

Big bruh moment

remote goblet
steel heart
#

lmao

remote goblet
#

Why can't i just get a bee to follow me sadcatbutcozy

steel heart
#

its obvious though

ocean quartz
#

Because you're doing that in the entity's a fun, you need to create a custom pathfinder for it

remote goblet
prisma wave
#

the age old question has been answered?

steel heart
#

by convention its one

obtuse gale
#

very convenient

steel heart
#

except that it breaks the pattern that 0 to the power of x is 0

prisma wave
#

it's undefined

#

it could be either 1, 0 or infinity

steel heart
#

it is but conveniently its 1

prisma wave
#

depending on how you work it out

#

yeah but that doesn't mean it is 1

steel heart
#

true

#

you should make it randomly return null, 0 or 1 lol

prisma wave
#

I don't think julia has null

#

and it's not my language lol

#

although

steel heart
#

oh nvm

#

iirc isnt 0.1^0.1 like almost 1 or smtng

#

0.99...

prisma wave
#

doesn't look like it

steel heart
#

okay try 0.00001^0.00001

ocean quartz
#

I mean any number with power of 0 is 1

prisma wave
#

yeah

ocean quartz
#

0^0 == 0! == 1

#

Which is pretty funky

steel heart
#

its basically x/x = 1

prisma wave
#

except with 0

clear bramble
#

When you need to write a plugin to assist you in writing a different plugin

#

This was supposed to be a quick project

umbral mica
#

rip

prisma wave
#

Same here lmao

#

I'm trying to resist the urge to make a new library that overengineers a seemingly simple problem

#

It's a slippery slope lol

hot hull
#

Well what's the problem BM

steel heart
#

Too big brained

prisma wave
#

tryna make a nice text based gui with clickable links to things

#

so you can list things and click different bits to toggle booleans and such

#

it's mostly working, but a mess

#

and a few more layers of abstraction with an overengineered library would definitely help

hot hull
#

Been playing with EulerAngles for the past like 4-5 hours, and sheesh my brain is confused

prisma wave
#

yikes

hot hull
#

Yikes why

prisma wave
#

5 hours of euler angles

#

lol

hot hull
#

I've still no idea how in the hell they work, or even a close representation of them

obtuse gale
#

It's just rotation along the 3 different axis

#

Ez

#

🌝

#

Also, 8 am on a Sunday
Back to sleep I must go

hot hull
#

If only it were that easy Fefo

gentle coyote
#

Hey^^
I'm currently using the InventoryMoveItemEvent and I want to disable moving to specific slots inside the inventory only. Is there a solution to get the target slot from that event?

heady birch
#

tryna make a nice text based gui with clickable links to things
@prisma wave Lanterna or Jexer

prisma wave
#

i mean for minecraft lol

#

with textcomponents

gentle coyote
#

Hey^^
I'm currently using the InventoryMoveItemEvent and I want to disable moving to specific slots inside the inventory only. Is there a solution to get the target slot from that event?
Well, I can also use the InventoryClickEvent, but I need to retrieve the target slot from that. Is that possible?

#

As players use shift-click I need to check where the item is going to be placed in the top inventory

clear bramble
#

I meeeeeean its possible but there's nosuper simple way to do it

#

If you can't just compare the inventory before and after and get the first slot number that's different you could always manually implement the logic

hot hull
#

Can I introduce you to mf gui, which will probably make ur life 100 times easier

#

?mf

compact perchBOT
static zealot
#

nah. Probably more like 99 times

ocean quartz
#

3 times, take it or leave it

clear bramble
#

97.4 at most

#

O

static zealot
#

I'll take it

#

even if it is 1.1

clear bramble
#

Mood

obtuse gale
#

Hello

#

gamers

#

I woke up

#

😎

prisma wave
#

impressive

ocean quartz
pine fox
#

i want to start developing in java, any hints? (I just know how to C++)

obtuse gale
#

How much c++ do you know?

pine fox
#

1month of study

obtuse gale
#

I found the transition quite easy from it, maybe a bit uncomfortable at first but easy nevertheless

#

any hints?
Hmmm don't know what you mean by that exactly lol but I'll just say that the javadocs are very useful 👀

#

The main, big, fat difference is that everything has to be inside a class, you can't have variables or functions outside of classes

#

need help with someone who knows how to use ''wine'' application. please ping me

ocean quartz
#

I feel like from C/C++ to Java is more soft than the other way around, since in a way you are moving to something a bit more simple

hot hull
#

Might be time to finally try hibernate :O

obtuse gale
#

Yeah sleeping for long periods is good

#

A whole season

hot hull
#

Oh..

ocean quartz
#

I wish i could hibernate this dumb pandemic

obtuse gale
#

Fun fact: you can live for the rest of your life without eating nor drinking

ocean quartz
#

True fax

#

You can also drink lava, but only once

obtuse gale
ocean quartz
#

Love those reviews

obtuse gale
#

Mood indeed

#

Aye

ocean quartz
#

Anyone wanna let me borrow some brain cells? Can't think of a solution for this stuff

obtuse gale
#

why does my spotify rich presence not show up
It's there but it isn't green thonking

#

Anyone wanna let me borrow some brain cells? Can't think of a solution for this stuff
No

ocean quartz
obtuse gale
#

lol what's the problem

#

hah

ocean quartz
#

So, I read this from a file:
{first=first value, second=hello, nested={first=nested value!, second={first=forth!, second=fifth!}}} (a map)
Which then i turn it into a simplified map flattened, which was super easy to do
{first=first value, second=hello, nested.first=nested value!, nested.second.first=forth!, nested.second.second=fifth!}
But can't think of a way to turn it back to a nested map cryingblob

obtuse gale
#

Hmm

#

Split the key

#

On \\.

#

And the # of elements in the array would be the # of nested thingies

ocean quartz
#

This is the result of my current solution, which is pretty broken but getting there
{first=first value, second=hello, nested={nested=fifth!, second={second=fifth!}, first={}}}

obtuse gale
#

Hmmmmmmm

prisma wave
#

recursion

ocean quartz
#

Avoiding that would be golden

prisma wave
#

split on \., first value is the key, second value is another map, keep splitting until value isn't a map

#

i don't get the recursion hate

#

it's effective

#

and nice

ocean quartz
#

Not hate, ptsd

prisma wave
#

👀

obtuse gale
#

Yeah and the last element of the split array is the final key/value pair

prisma wave
#

yea

obtuse gale
#

Every other element is the key to the "next" map

prisma wave
#

right to left recursion is probably better actually

#

so you get the final key/value and go backwards from there

ocean quartz
#

Alright time to dive into this empty hole

prisma wave
#

recursion isn't that bad

#

you just have to watch out for

#

recursion isn't that bad

#

you just have to watch out for

obtuse gale
#

and then console gets spammed with an endless number of SOE

prisma wave
#

😬

ocean quartz
#

Yeah i know, like i said, it's just ptsd, in school using c we had to do an entire test where we had to try recursion when ever possible and it was awful

prisma wave
#

understandable

ocean quartz
#

Ayy got it working non recursively

{first=first value, second=hello, nested.first=nested value!, nested.second.first=forth!, nested.second.second=fifth!}
{first=first value, second=hello, nested={first=nested value!, second={first=forth!, second=fifth!}}}
#

Awesome

Properties from file - {first=first value, second=hello, nested={first=nested value!, second={first=forth!, second=fifth!}}}
Properties - {Property{path='first'}=first value, Property{path='second'}=hello, Property{path='nested.first'}=nested value!, Property{path='nested.second.first'}=forth!, Property{path='nested.second.second'}=fifth!}
Properties to write - {first=first value, second=hello, nested={first=nested value!, second={first=forth!, second=fifth!}}}
prisma wave
#

nice

remote goblet
#

Spigot

#

is dumb as fuck

#

as i realise

#

This particle is the mycelium particle????????????????????????????????????????????????????

#

Hello

#

what the fuck md5

lavish notch
#

Is there an easy way to check if a server is mojang authenticated (premium)?

hot hull
#

Just get a random player's uuid, and check if it's a premium one

lavish notch
#

what if there are no-players online?

obtuse gale
#

Server#isOnlineMode?

#

?docs

compact perchBOT
obtuse gale
#

getOnlineMode*

ocean quartz
#

alert Docs are outdated where is 1.16.4, come on staff!

hot hull
#

Or that :kek:

lavish notch
#

What if it were under a bungeecord? @obtuse gale 😛

obtuse gale
#

Well

#

Bukkit.getOfflinePlayers()[0].getUniqueId().getType() == 4

distant sun
#

is that a thing?

obtuse gale
#

What is?

distant sun
#

getType

hot hull
#

3 is offline right?

obtuse gale
#

Don't know if it's called like that exactly, but if the UUID is of type 4, it's legit because it's random based

#

3 is "name based" (i.e. offline mode)

prisma wave
#

based

obtuse gale
#

Yes

#

Very

onyx loom
#

is 1.16.4 out yet?

ocean quartz
#

Nah

prisma wave
#

that website looks legit

#

I have come to the conclusion that every spigot command framework sucks

#

not even Cloud can satisfy requirements 😦

obtuse gale
#

Nothing like a good old arrow code switch case command parsing

prisma wave
#

😨

#

Honestly considering that at this point

ocean quartz
#

What do you need? ;o

prisma wave
#

actual support for in between arguments

#
booster type info <identifier>
booster type <identifier> rewards ```
#

cloud almost supported it, but it refuses to resolve this because there's ambiguity in the 2nd argument (identifier vs info)

ocean quartz
#

Oh yeah i remember you talking about this, sounds pretty ass to implement

prisma wave
#

Might see if I can decouple luckperms' one

#

yeah manual is probably gonna be the way to go here 😦

obtuse gale
#

I know for a fact that brig resolves that.. but you are looking for an annotations thingy, not much of a builder-type framework

prisma wave
#

Ideally annotations yeah, I think the builder style looks really messy

obtuse gale
#

LuckPerms is interesting tho, each parent command has its own class, defining their own children commands (basically just inheritance), but I don't think there is an ambiguous situation like that presented in there

#

But it could be easily solvable

prisma wave
#

Maybe not

#

I don't think it is that ambiguous

#

if the 2nd argument is info, follow the info branch, otherwise follow the identifier

#

obviously it would be more difficult than that in practice

obtuse gale
#

Yeah given how LP does it, it is easily solvable, same for brig

#

Difference being, the LP command system is not a builder type, each "piece" gets its own class

prisma wave
#

yeah it's more inheritance based

obtuse gale
#

Mhmm

ocean quartz
#

Maybe what I'll add in the upcoming update might help you

@SubCommand("sub")
public void command1(player, string, string);

@SubCommand("sub")
public void command2(player, int, string);

Basically 2 methods with the same name but different parameters and it'll choose the correct one based on the given types

prisma wave
#

That would be good

#

but the problem then is you wouldn't get tab completion

#

I guess I'll have to do it myself

#

the hard way

ocean quartz
#

So the tab completion will be different based on the type?

static zealot
#

add it for default as well

ocean quartz
#

Will do

prisma wave
#

i honestly don't know at this point

#

identifier would be a string too, but dynamic

ocean quartz
#

Because if so that's possible with my framework using the completeFor annotation

prisma wave
#

ideally the completion for booster type would be [info, *allValidIdentifiers]

#

and then booster type info => allValidIdentifiers, booster type reward => rewardSubCommands

#

if that makes sense

ocean quartz
#

Kinda xD

prisma wave
#

well identifier has to be a valid identifier obviously, so there's a finite set of possibilities there

#

so therefore the set of completions would be {info, allValidIdentifiers}

#

idk i'm confusing myself here

ocean quartz
#

Can you show me two examples of possible commands? One for each

prisma wave
#
booster type info testbooster
booster type testbooster rewards list
#

where testbooster is a Booster with that as the identifier

ocean quartz
#

So type will always be type?

dusky drum
#

guys any idea how i could make upload progress bar, i currently handle uploading in php since i have to store some data into SQL

prisma wave
#

Yeah type is a subcommand

#

so always the same

dusky drum
#

like if i upload 2 files it just like timesout..

ocean quartz
#

Oooh okok, hmm idk how that would be done then, can only think of a way which would be to complete both info and the testbooster together

prisma wave
#

yeah that's what I mean

#

so when you type booster type the options are like

info
testbooster
otherbooster
obtuse gale
#

I mean if you're going with the inheritance way, ideally you would have a base command class with an execute and a suggest methods, for the suggestions you can just iterate through the children commands map calling suggest, if it's a static argument (a literal basically), well.. it would suggest the literal, if it's a non static argument, return whatever the argument should suggest

#

The idea is basically to delegate everything to the children commands

prisma wave
#

yeah that seems like a good idea

prisma wave
#

Now I know I said all you need is print function

#

but you can't deny this is cool

onyx loom
#

that website looks legit
@prisma wave bing in a nutshell 🙂

prisma wave
#

good news

#

according to my very not biased and fair benchmarks

#

elara is faster than julia

#

the numbers do not lie

obtuse gale
#

i have a question because i'm dumb lol

#

what's the best ide for spigot development?

prisma wave
#

most people would say Intellij

steel heart
#

Eclipse fingerguns

ocean quartz
obtuse gale
#

@steel heart

steel heart
obtuse gale
#

No

#

Stop it

#

I will call the KGB

steel heart
#

KGB? KinderGartenBamboos

obtuse gale
#

No

#

KinderGartenBazinga

steel heart
#

Anyone else that had a bad experience with guice?

obtuse gale
#

Juice?

#

I like juice

static zealot
#

me to. But its poison.

steel heart
#

Yeah but the google di framework

static zealot
#

but for some reason I love poison 😦

obtuse gale
#

Aa

static zealot
#

Bb

#

Cc

#

Dd

steel heart
#

U guys are high or what? Lul

obtuse gale
#

M

static zealot
#

Mm?

#

Nn?

obtuse gale
#

Yeeee

prisma wave
#

guice

#

good

#

👏

umbral mica
#

agreed

steel heart
#

Hell nah

#

It has been my very downfall

ocean quartz
obtuse gale
quiet depot
#

@steel heart guice 10/10

ocean quartz
#

@obtuse gale Thought it was needed, isn't that big to be noticeable so never payed much attention to it

obtuse gale
#

Well at least it isn't as much as adventure making me add check-qual

#

but I can exclude that one >.>

distant sun
#

@lavish notch use a .gitignore file

lavish notch
#

BRC did tell me to use that, but I just dismissed it out of sheer laziness at the time :P

what is it exactly?

prisma wave
#

marks files that should be ignored by git

#

eg your .idea folder

#

generally speaking things that aren't necessary to the build (ide files, compiled classes) should be ignored unless you have a specific reason to include them

lavish notch
#

Oh, yeah - I figured I didn't need to upload them but chose to anyway

umbral mica
#

If you're using IDEA, there's a plugin (.ignore iirc) that will generate ignore files for you

surreal quarry
#

@lavish notch any reason Hastebin#post isn't a static 'util' method and instead requires a Hastebin object

#

also in your command class you have a lot of places where you do

if (sender instanceof Player) {
  // do something
} else {
  // error
}```
and I think a lot of them can be replaced with
```java
if (!(sender instanceof Player)) {
  // error
  return false;
}
// do something```
which will reduce a bit of the arrowish code there
#

theres probably other places where something similar could be done but its late and i need to sleep lol

obtuse gale
#

will ramshard save my card info?

#

if so how do i unsave it

ocean quartz
obtuse gale
#

mf-config SOON™️?

ocean quartz
#

Maybe, this is just really basic functionality so far
But got reading/writing with comments working

lavish notch
#

@surreal quarry Yeah... It just happens to be the way I've written it. Couldn't decide if I should group all sub-commands together, or all executors together

hot hull
#

Or use mf commands and actually have shit organized fingerguns

clear bramble
#

I'm really dissatisfied with the way I'm doing loot tables for my aether generator

#

Idk what to do differently tho

lavish notch
#

@old wyvern What do you not like about my showcase?

prisma wave
#

Anyone clever got any idea on what would be the absolute fastest way to check if a character is in a set?

#

for some context, i'm currently using a map[rune]Struct{} (Map<Char, Boolean> effectively), but the function accessing the map is a massive hotspot, and so it's getting pretty slow

#

I considered multiple if statements but that seems to be even slower

#

I might be overthinking this but as you can see map access is taking up a HUGE proportion of the time

steel heart
#

maybe a use a char array?

#

you could do some pretty funky stuff with that as well

prisma wave
#

yeah that's what I've ended up doing lol

#

random access is much faster than hashing

errant geyser
#

Conclure these doggo pics keep getting better

steel heart
#

fingerguns hmm I should switch to smtng helloweenier

obtuse gale
#

halloweiner

steel heart
#

lol

#

yo wtf

loop: while (true) {
  if (ThreadLocalRandom.current().nextInt(2) == 0) break loop;
}

why has no one told me this :/

hot hull
#

What the fuck is that hideous thing

steel heart
#

tbf no idea

old wyvern
#

Told you what?

#

Labels?

steel heart
#

ye

#

thats for being able to access nested loops I assume

old wyvern
#

Yes

obtuse gale
#

aahahah what

prisma wave
#

I am proud to announce that elara will never have those

steel heart
#

elera mitten is typing...

prisma wave
#

hi

#

Considering rust

#

Go has let me down

#

what happened to Niall

#

Nvm

#

@heady birch rust ?

onyx loom
#

🤣

prisma wave
#

I am serious

#

Garbage collection is just too slow

#

Rust or C++ is the only viable option for maximum speed

obtuse gale
#

I love me some c++

prisma wave
#

😕

#

It's a bit

#

old fashioned

#

elara deserves a modern language

#

Such as rust or Haskell

obtuse gale
#

old fashioned
I disagree

#

C++ is constantly evolving

#

With each new standard bringing new features and capabilities without being bloated

prisma wave
#

auto 😐

#

Jokes aside I feel like Rust is more modern and has the benefit of memory safety

steel heart
#

c++ hmm

prisma wave
#

I guess the ecosystem would come into play a bit

steel heart
#

c# is superior

prisma wave
#

Absolutely not

steel heart
#

watch your words

obtuse gale
#

auto 😐
what about it

prisma wave
#

it's kinda ugly

obtuse gale
#

It gets evaluated at compile time

prisma wave
#

I know

obtuse gale
#

like.. most of the language

prisma wave
#

But the word is ugly

steel heart
#

pythons lambda though PogChomp

obtuse gale
#

#define var auto

prisma wave
#

Compared to let, var etc

#

🙂

obtuse gale
#

#define let auto

prisma wave
#

isn't that an anti pattern

obtuse gale
#

lol yea for the most part

prisma wave
#

probably best to avoid it though

obtuse gale
#

macros are.. kinda not advised

#

unless it's absolutely necessary

prisma wave
#

Yeah

#

I mean rust and C++ are both pretty ugly I think

#

But they are both good

obtuse gale
#

but if you want to go 100% safe you can

// includes

#define var auto

// your ugly code

#undef var
prisma wave
#

C++ would have more support + bigger ecosystem but so far we're not using any other libraries so probably not necessary

#

Lol

#

I think we've pushed Go to its limits in terms of performance

#

And the main reason to use it (concurrency) isn't really applicable for a parser

onyx loom
#

use elara to make elara

prisma wave
#

That would be nice

#

Although

#

If elara compiles to JVM, that would be a lot slower than our current thing 😕

onyx loom
#

😦

obtuse gale
#

🙂

onyx loom
#

wait would it actually be slower lol?

prisma wave
#

yes

onyx loom
#

i mean 170~ microseconds is pretty speedy

prisma wave
#

By quite a lot I imagine

obtuse gale
#

but we need speeder speed

onyx loom
#

interesting

#

i kinda wanna see the difference now lol

obtuse gale
#

we n e e d more speed

#

need f-

#

need for sp-

#

need for speed

#

national football society

prisma wave
#

😐

#

Well most notably is JVM startup times

#

It's a pretty significant difference - when running a Java / kotlin app it usually takes a few seconds to start whereas with native it's almost instant

onyx loom
#

ye, but after its startup time then jvm should be faster right

prisma wave
#

Probably not faster than native

#

But close

obtuse gale
#

yeah but the JVM's performance also mutates over time, C++ is pretty much constant other than how lucky you get on the OS being nice on memory provision and.. temperature?

prisma wave
#

I'd guess negligibly slower in terms of performance but definitely using more memory

#

Yeah

#

JVM has its benefits but I wouldn't use it when performance is key

obtuse gale
#

JNI 🌝

prisma wave
#

🥶

#

Do graal native binaries still require a JVM to be installed?

#

I'd guess so

obtuse gale
#

🤷

prisma wave
#

actually maybe they bundle all the necessary stuff

#

not really important anyway

onyx loom
#

have u considered the option of using something lower level for elara 🌝

prisma wave
#

im not using assembly if that's what you're suggesting

onyx loom
#

🌝

prisma wave
#

no

#

NO

onyx loom
#

🌚

prisma wave
#

:clojuremoon:

#

elara written in clojure???

onyx loom
#

no

prisma wave
#

now that would be nice

onyx loom
#

NO

prisma wave
#

i think it's time to try rust 🙂 🌚 🌝

onyx loom
#

have fun

prisma wave
#
fn main() {
    println!("Hello, world!");
}``` im basically an expert already
#

semicolons though 😐

onyx loom
#

ew yuck

obtuse gale
#
int main() {
  printf("Hello, world!")                                                                    ;
}
onyx loom
#

ew

prisma wave
#

semicolon?

surreal quarry
#

imagine having a language that doensn't know when lines end

#

gross

prisma wave
#
let main => print "Hello World"
``` 🙂 👍
obtuse gale
#

imagine not being able to write your entire software in a single line

onyx loom
#

👍

obtuse gale
#

minified c++

onyx loom
#

let is starting to grow on me more and more

surreal quarry
#

elara should add mutable methods :)

prisma wave
#

let is good

#

@surreal quarry what

onyx loom
#

i liked it for variables, but not so much for functions. im starting to like it now tho

surreal quarry
#

lmao

onyx loom
#

let mut?

prisma wave
#

yes

#

it's good

#

perfect even

#

more languages should adopt it

#

java 18:

  • replaced var with let
onyx loom
#

😮

#

java 18 tho, kek

prisma wave
#

warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
🙂

#

zsh: command not found: rust
😕

#

elara should add mutable methods :)
@surreal quarry please explain

#

what

surreal quarry
#

oh that was a joke

#

i dont think thats even possible

#

and if it is its a terrible idea

prisma wave
#
let mut main => print "Hello"
main = () => print "Hello2"

main()
//Hello2
``` 🙂
#

im sorry

surreal quarry
#

yea that was the idea but its hideous and has no use case imo lol

prisma wave
#

anti pattern

#

we might end up using the mut for something different if it's a function

#

you know how kotlin has List and MutableList, in elara it would be 1 type but you need to do let mut list = blah if you want to call a mut method

heady birch
#

Rust is modern alternative for all programming languages

ocean quartz
#

And yet it has semicolon 😦

surreal quarry
#

oh and then like you would make a let mut some-list-method and it would only work if the list was mutable?

prisma wave
#

yeah exactly

surreal quarry
#

yeah thats a cool idea

prisma wave
#

a mut function requires a mut variable

onyx loom
#

why can i not install IJ ultimate through toolbox? im signed in with my account and everytime i press install it shows the checking symbol in top right and cancels

prisma wave
#

bad

#

elara toolbox

#

idk

surreal quarry
#

be better :)

#

or put it in rice

prisma wave
#

lmao

onyx loom
#

i just uninstalled it ultimate because it says "manually installed" at the top and looks disgusting

surreal quarry
#

build from source

prisma wave
#

what

onyx loom
#

enable android plugin

prisma wave
#

android plugin

obtuse gale
#

yes

#

Enable android plugin

surreal quarry
#

intellij knows

prisma wave
#

😨

normal talon
#

ANDRIOD

#

is amazong

static zealot
#

duh... Just enable android plugin

onyx loom
#

looks like im manually installing ultimate again 😔

#

ill have to deal with the ugliness 😔

prisma wave
#

😦

normal talon
#

Not very nice 😦

static zealot
#

imagine actually having IIJ Ultimate.

normal talon
#

Imagine

onyx loom
#

student pack 🙂

normal talon
#

what

#

Im a student

onyx loom
#

even tho i dont use any of its features

normal talon
#

Gimme

onyx loom
#

github student pack

#

google

normal talon
#

oh

#

xd

surreal quarry
#

yea what even are the features

#

i have it too from the student pack

prisma wave
#

duplicate detection

#

spring boot support

#

all the features from every other Jetbrains IDE

#

etc

#

database stuff from datagrip

#

some more enterprise shit that nobody uses

normal talon
#

what is it even free

prisma wave
#

?

onyx loom
#

for students yes

surreal quarry
#

IJ community is free

prisma wave
#

yes

surreal quarry
#

and ultimate is free for students

onyx loom
#

github student pack
google

normal talon
#

Like all students ?

prisma wave
#

technically for educational use only

#

but

#

who cares

normal talon
#

Do I need to use my student mail xd

onyx loom
#

ye

surreal quarry
#

i dont think you need to but it makes it easier for them lol

prisma wave
#

you don't have to

#

I didn't but i needed proof I went to a school

normal talon
#

hmm

#

Do you get all those things for free or something

prisma wave
#

yes

normal talon
#

all those things that are listed

surreal quarry
#

you get a ton of shit

#

its pretty cool

onyx loom
#

spring boot sounds nice

#

might use it one time

prisma wave
#

ding boot >>

#

but yeah it's decent

#

it's either really easy or really hard when you've tried about 500 different annotations to get a simple thing to work

onyx loom
#

sounds like a usual day then 🙂

surreal quarry
#

for gh student pack did you have to give your graduation date?

onyx loom
#

yea

prisma wave
#

yeah i think so

#

/usr/bin/cargo run --color=always --package elara-rust --bin elara-rust
Compiling elara-rust v0.1.0 (/home/alex/IdeaProjects/elara-rust)
Finished dev [unoptimized + debuginfo] target(s) in 0.43s
Running target/debug/elara-rust

Elara ran program in 0.02ns
🙂

#

that was quick

surreal quarry
#

i forget but if i did then i lose it in like 7 months :(

prisma wave
#

k

#

you can apply again

surreal quarry
#

true

normal talon
#

Now I need to wait

onyx loom
#

jcenter is another mavenCentral repo type place right?

normal talon
#

Approved Submitted Oct 26, 2020 Congrats! Your request for @normal talon was approved.

prisma wave
#

yeah @onyx loom

onyx loom
#

u should only have to wait a couple days cozy

#

mine was like 2 days

surreal quarry
#

yea if you give your school email its really fast

normal talon
#

I didnt know they knew my school

#

cuz it's in the netherlands

prisma wave
#

they've got an open source repo of loads of schools

onyx loom
#

im pretty sure if someone has applied from ur school before then itll be faster as they dont have to check licenses or whatever, stuff like that

#

as its all setup before etc

prisma wave
#

yeah

normal talon
#

you also got a domain host ??

#

wut

onyx loom
#

ah yes

#

github student pack good

normal talon
#

Why didn't I head about this before

heady birch
#

Spring boot is free always free

prisma wave
#

im officially a rust expert

#

i read 3 pages of docs and almost understood a bit

onyx loom
#

im sure niall is proud

prisma wave
#

he'd better be

#

@heady birch rust pub struct Lexer<'a> { input: &'a str, pos: usize } code review 🙂

onyx loom
#

i love it, u start a new language and u already working on the lexer

normal talon
#

is your name going to be rust mitten ?

remote goblet
#

mackenzie the code isnt awful but the lack of .gitignore making the /build and /.idea/ file show up is wack also the fact you use uppercase characters in package names EmiCool

normal talon
#

why not

onyx loom
#

lol

surreal quarry
#

why BM

#

oh L

onyx loom
#

oh wait

#

my bad

prisma wave
#

thanks

onyx loom
prisma wave
#

clojuremoon

#

rustmoon

onyx loom
#

when will clojuremoon become a global emote built into discord

#

no nitro needed

#

we must make a business proposition to discord

prisma wave
#

i agree

#

send them the sars image

#

that's good persuasion

onyx loom
#

🤣

#

this image was uploaded to

#

?mf

compact perchBOT
prisma wave
frail glade
#

?

onyx loom
#

SARS

prisma wave
#

@heady birch what is Sender

frail glade
#

"clojuremoon"

prisma wave
#

nvm I think I found it

#

clojure in the moon

#

🌚 + clojure logo

onyx loom
#

clojuremoonfingerguns

frail glade
onyx loom
heady birch
#

Sender? Idk I havn't even used lifetimes in rust yet soo....`

prisma wave
#

lol

onyx loom
#

fake rust user 🙄

prisma wave
#

I think it's for channels

#

you have Sender for 1 thread and Recevier for another

#

also how have you not used lifetimes

#

they're unavoidable

#

literally the third line i wrote needed them

#

string: &'a str 😬

heady birch
prisma wave
#

lol

ocean quartz
prisma wave
#

probably because null is a pointer and not a value

static zealot
#

you learn something new everyday

#

except if you're Blitz. If you're blitz you never learn anything

normal talon
#

Well

#

Not true

onyx loom
#

maven { url 'http://repo.extendedclip.com/content/repositories/placeholderapi' }
or

        url 'http://repo.extendedclip.com/content/repositories/placeholderapi'
    }```
#

which is better

obtuse gale
#

I am better

onyx loom
#

👀

steel heart
#

1st

#

2nd doesnt even have indents right

onyx loom
#

thats just discord

static zealot
#

second is better

#

always has been

obtuse gale
#

second is better

#

Because I am first

#

😎

static zealot
#

that means you are worse?

obtuse gale
#

Blitz

#

Stfu

static zealot
#

no u!

obtuse gale
#

If you were to participate in a losers competition, you would end up second and not first

#

Because you are a loser

static zealot
#

ye and you first because you are the best at being a looser.

obtuse gale
#

BLITZ

#

STDU

#

Jcjeibf

#

Do you even gleek?

#

Thought so

#

sup

#

lol the java

#

wdym by "enough"?

#

I mean that's a calculation, yes lol

umbral mica
#

wdym

obtuse gale
#

Also, wouldn't the damage be dictated by the event?

#

I don't think you should return an int instead thonking

#

Or

#

You are returning the input tho

#

strength

#

It should return void

#

And the final damage would be the one you set in the event

ocean quartz
#
 public static int setDamage(int strength, int damage, EntityDamageByEntityEvent e) {
        e.setDamage(e.getDamage() * damage / 2.1 * strength);
        return strength;
    }

@obtuse gale Static util for this?
Would it be much simpler for this to be a private method in the listener and instead of passing the event you do like event.setDamage(getDamage(strength, damage))? Seems like a weird method

steel heart
#

that method seems to belong more to an instance

ocean quartz
#

I mean it is a method

steel heart
#

e.setDamage()

#

a util method could be like: calculateDamage

ocean quartz
#

Yeah

obtuse gale
#

@steel heart

#

@ocean quartz

steel heart
#

@obtuse gale

ocean quartz
obtuse gale
#

I love you too

steel heart
#

pls dont, you seem to miss the point with static

#

static utilities *

hot hull
#

Conclure u suck

steel heart
#

no u

ocean quartz
#

If a method is only used by one class (this one for example it makes no sense to be used more than that) just make it a private method

hot hull
#

You gave up on build battle cause you knew you were gonna get rocked

steel heart
#

nah I had english lesson

hot hull
#

Ofc ofc

steel heart
#

BRO

#

u want fkn visual proof?

hot hull
#

English lesson more important than build battle, I see how it ks

#

Is*

steel heart
#

ye u booboo

hot hull
#

Tell the teacher to fuck off and be done with it

steel heart
#

dude you're just pissed cuz I won first round without even trying :p

ocean quartz
hot hull
#

I got second with 2 pieces of glass, an itemframe and a water bottle

#

...