#dev-general

1 messages Β· Page 9 of 1

cobalt marlin
#

you could turn your methods static depending on their contents

#

static method(var1, var2) {
// do stuff with var1 and var2
// should not touch anything outside
// return something as result
}

#

^ if they fit this, then you should probably turn them static instead

pastel imp
#

Also, wdym with dependent on state?

cobalt marlin
#

it sounds like coupling

#

especially a name like manager handler

pastel imp
#

so bad idea in general?

cobalt marlin
#

you want your classes to serve a single purpose*

#

whenever possible

pastel imp
#

Mainly made it to make constructors smaller, since some classes were using like up to 8 other classes

#

and constructor was simply too big

cobalt marlin
#

stuff like "manager" "handler" usually encompass too much* functionality

#

and should usually be divided into multiple

pastel imp
#

Yes but then the consturctor would be visually quite confusing

cobalt marlin
#

are these managers

#

similiar?

pastel imp
#

similar in which way?

cobalt marlin
#

functionality

#

do they manage different stuff but with same methods

#

basically

pastel imp
#

They manage stuff, I have a manager for my config, another for messages, another for guis, etc.

cobalt marlin
#

so they are basically caches?

pastel imp
#

some of them yes.

#

Like the config.

cobalt marlin
#

thats a bit of a special case

#

i am guessing you want only one instance of those managers?

#

there wont be more than one config manager instance at a time etc

cobalt marlin
#

for example:

potent nest
#

If one class depends on too many of those "managers", it's clearly doing too much

cobalt marlin
#
class Apple {
  private variable 1
  private variable 2

  // this cant be static
  method1() {
    // uses variable1/2
    //return or not return, does not matter since variable1/2 are state dependent.
  }
  
  // this method can be turned static, it does not care which Apple instance its in
  method2(variable1, variable2) {
    // doing stuff
    return variable3
  }
}
pastel imp
#

on the second method, so it doesn't use var1 and var2 while "doing stuff"?

cobalt marlin
#

it uses the passed variables

pastel imp
#

oh ye okay

cobalt marlin
#

and does not use the class fields

pastel imp
#

what if while doing something I am using another class inside that method?

#

that I injected with DI

cobalt marlin
#

one thing to be careful about is

#

^ exactly that use case

#

thats not static-able

#

method2 is only a good static method

#

if its self contained

#

as in it takes var1 var2, does stuff with them

#

then returns something or not

pastel imp
#

so I can only use static if the method doesn't use anything from any class, aka like additions, or Serialization, etc?

cobalt marlin
#

it can use other stuff from classes

#

for example

#
static goodStaticMethodUsage(serializerClass, serializableClass) {
  return serializerClass.serialize(serializableClass);
}
#

^ this is still self contained

#

it takes 2 instances

#

does stuff with them

#

then returns

pastel imp
#

in that caserthe serialize method is also static

#

hence self contained

cobalt marlin
#

no

#

it can be this

#
class AppleSerializer {

  String serializeApple(appleClass) {
    // serialize the apple and return
  }
}
#

serialize method itself

#

can depend on state

#

^ this method should be static normally right?

#

since its self contained

#

but another example

#
class AppleSerializer {
  variable appleType
  AppleSerializer(appleType) {
  // DI
  }

  String serializeApple(appleClass) {
    // serialize the apple **ACCORDING TO APPLE TYPE** then return
  }
}
#

^ this one is not static

#

it uses the apple type stored in the class

#

to serialize the given apple

#

and both are fine to use in a static method

quiet depot
#

guice

pastel imp
#

hmm thanks I will see what I can do about my whole system lol

prisma wave
#

State bad

distant sun
gusty glen
# quiet depot guice

I found a better, easier to use replacement Piggy, did you already hear about Toothpick? I'm using it for some time and it is amazing, you use it just like Guice, but with almost no boilerplate required, and it is easier to use in Kotlin

cobalt marlin
#

you generally should not need DI in kotlin anyway

gusty glen
quiet depot
#

runtime based

#

reflection free

#

i am now confused

cobalt marlin
#

its nowhere as bad there, you can just write functional half the time

obtuse gale
#

"dependency injection" isn't just "pass the thing in the constructor"

#

passing variables to functions is also DI

quiet depot
#

@gusty glen i likey

#

will try next time i write code

cobalt marlin
brittle leaf
#

it kinda makes sense since a constructor looks basically the same as a method and a constructor doesnt specify a return type because it always returns itself

obtuse gale
#

it's not really about that "the constructor is also a function", it's more like, picture this

int sumOneAndTwo() { return 1 + 2; }

The second you want to use any other two numbers that aren't 1 and 2 you could use global state to manage where those values are coming from

int lhs = 0;
int rhs = 0;
int sum() { return lhs + rhs; }

Sure this is valid, but we know how stinky and painful it is to manage global state like that and it's still constraining you to always use those two, instead you could make them parameters

int sum(int lhs, int rhs) { return lhs + rhs; }

Which also allows you to bind one of the parameters to a specific value

int sum(int lhs, int rhs) { return lhs + rhs; }
int inc(int i) { return sum(1, i); }

This is still a pure functional style

prisma wave
#

There's not really any point in having the term DI if any parameter passing is DI

quiet depot
#

type of parameter matters

#

emily said variable

#

not value

#

variable more like reference, in which case, i'd argue di

prisma wave
#

what

quiet depot
#

passing an int isn't dependency injection

#

passing in an instance of a manager, is

prisma wave
#

Yeah sure

#

But that paradigm is only really a thing in OOP

#

And so if you were going for a fully functional kotlin style, in theory you wouldn't ever do that

obtuse gale
#

well in a purely functional style you would DI functions to other functions

#

applyBinary i j f

#

1 2 +, 3 5 *

potent nest
obtuse gale
#

true GH_Nerd

prisma wave
#

I still don't think that's the same as OO DI

#

Do map and filter use dependency injection?

obtuse gale
#

does filterNotNull inject o != null into filter?

prisma wave
#

not in the same way

#

I read an article ages ago that said "currying is not dependency injection" but can't find it now

obtuse gale
#

sucks

prisma wave
#

But if you say currying is, then having any closure is also dependency injection

#

And then we're back to parameter passing being DI

obtuse gale
#

Okay let's take regular "values" out of the question

#

Then if passing objects to other objects is DI, then surely passing functions to other functions is also DI in its own paradigm, no?

hot hull
#

Just use static everywhere, who even cares

obtuse gale
#

frosty go touch grass

#

and tell me how it feels like

hot hull
#

Would go right now, but it's pouring outside

#

Anyway I am now a web developer

obtuse gale
#

oh no

#

are you okay?

cinder flare
#

lmao doing React?

#

suffering like the thousands that came before you?

brittle leaf
#

static everywhere dounds fun

prisma wave
#

oh boy have i got a paradigm for you

hot hull
#

heck outta here with react

#

Using Vue cause I'm not a sociopath

static zealot
#

ok

cinder flare
#

Vue ain't much better lol

#

Svelte is the best I've seen so far, but even it still has problems

hot hull
#

It's web development, what you expect

cinder flare
#

the literal tens of thousands of people doing it making tools to not suffer so much lol

hot hull
#

Anyways you can see my beautiful creation on my profile, it ain't finito yet tho

cinder flare
#

wow, that really didn't need Vue lol

hot hull
#

It didn't but it was a heck of a lot easier using it.

cinder flare
#

this is a static website

hot hull
#

Star

cinder flare
#

why is there even javascript

#

lmao

hot hull
#

Get the fock out

#

It's not just the main page

cinder flare
#

i know i clicked on the experience

#

it is also a static page

hot hull
#

And?

cinder flare
#

vue is way way way overkill

hot hull
#

Don't matter

#

Go touch grass

cinder flare
#

how can you tell me to go touch grass

#

you learned vue to make a fucking static website

#

you could've just written actual HTML and it would've been like 90% faster lmao

hot hull
#

Mate

#

get out

cinder flare
#

of?

static zealot
#

that website is pretty nice tho

#

ngl

hot hull
#

Seems to not satisfy the almighty Star

steel heart
#

maybe pHp?

distant sun
#

Where was moved the ban button?

half harness
#

if you mean discord ban

distant sun
#

Ah, found it

half harness
#

Anyone know how to replace text in gradle resources (src/main/resources for example)? But not the actual file
basically processResources -> expand but without ${}
Or just modifying the resource itself
The reason why I don't want the ${} is because it gives a warning since I'm trying to modify the plugin.yml file πŸ˜–

distant sun
#

What warning?

half harness
#

oh it does that to everything

#

since I need a key & value

#

Hmm

#

${stuff: value}

#

I wonder if that would work

#

πŸ₯΄

#

not sure if gradle allows that

obtuse gale
#

filter

distant sun
#

"${version}"

obtuse gale
#

what's your use case?

half harness
obtuse gale
#

huh?

half harness
#

my use case is putting dependencies in build.gradle.kts and it would be replaced in plugin.yml libraries without having to use a full plugin.yml gradle plugin

#

and this would allow renovatebot to update the dependencies (since it doesn't search in plugin.yml and afaik I can't make it search other files)

obtuse gale
#

why not just

#

libraries: ${libs} or whatever

half harness
#

that it has to be an array

obtuse gale
#

turn it off

half harness
#

I don't want to :((

obtuse gale
#

it's not a problem if you are aware it's not a problem

half harness
#

since then won't it also not warn of anything else?

#

and also on other IDEs/computers it will warn again

#

unless theres a way to turn it off in the file itself

obtuse gale
#

yeah you could uninstall the minecraft dev plugin

#

then there is no schema for the plugin.yml

half harness
#

yes but the thing is that I want to only turn off that one part, not the entire plugin

#

or the entire warning

#

which would still appear for other people with the plugin

obtuse gale
#

you can't just do "that one part" without doing things that are just bad

half harness
#

wdym without doing things?

obtuse gale
#

like

libraries:
  - blah

and then find the - blah and replace it with everything else

#

that's just bad

half harness
#

oh I didn't think of that

obtuse gale
#

that is terrible

half harness
#

but then I'd have to disable the entire warning/plugin

#

or ignore the warning

half harness
#

I don't want to have warning laying around though

#

and you can't suppress in yaml files :(

obtuse gale
#

a warning tells you "hey something in here could be wrong, just so you know you may not be doing what you're intending to do

#

suck it

half harness
#

D:

obtuse gale
#

what about it

half harness
#

not yellow triangle

#

red circle

#

it's considered an error

obtuse gale
#

wat

#

i'm talking about the warning

half harness
#

oh

obtuse gale
#

who ever mentioned errors

half harness
#

I was thinking of something else

#

so you're saying yml ${libraries: libs} is bad while ```yml
libraries: ${libs}

obtuse gale
#

i mean for that matter just do ${libs} alone

half harness
#

But if I do ```yml
${libraries: libs}

obtuse gale
#

no

half harness
#

why

obtuse gale
#

i'm literally talking about just ${libs}

#

not libraries: ${libs}

#

and expand it to the whole thing

half harness
#

also ${libs} gives an error

#

at least for me it does

obtuse gale
#

what does it say 🀨

half harness
#

libraries: ${libs} gives like a "this is not an array" warning

obtuse gale
#

okay you know what

#

do whatever you want

#

you have my advice

#

take it or don't

half harness
#

Emily out of curiousity

#

do you use mcdev plugin

obtuse gale
#

yes

#

for mixins

distant sun
#

Why dont you use a gradle plugin that handle this for you, dkim?

gusty glen
inner osprey
#

Anyone know how to write a javascript that replaces placeholder outputs?


If region = spawn, display "Asterya Isle"
If region = auction, display "Auction House"```
#

(sry if this is the wrong channel)

sly sonnet
#

I know

#

It is pretty easy but i'm not currently home

dense dew
sly sonnet
#

Oh, np

dense dew
#

hi

#

any hacktoberfest repos? 😳

static zealot
#

HelpChat/ChatChat

#

BlitzOffline/FrozenJoin

half harness
#

still got 5 hours for me

#

questionable

distant sun
#

well, the event started at 9PM for me, so I assume they use a certain timezone

half harness
#

oh theres a specific time too

#

I assumed it'd be midnight

distant sun
#

UH OH! YOU HAVEN'T MADE ANY PULL/MERGE REQUESTS YET. SUBMIT YOUR FIRST CONTRIBUTION TO A PARTICIPATING PROJECT TO GET STARTED WITH HACKTOBERFEST!
I guess it started

half harness
#

wait where do you see that

distant sun
static zealot
half harness
#

sad

#

28 days

static zealot
#

Well. There's 2 PRs open

half harness
#

oh PAPI3

static zealot
#

1 is a big one

#

Not OS

half harness
#

papi 3 is last committed on 2021

#

πŸ’€

static zealot
#

Also they don't count commits to your own repos right? It makes sense, just asking in case it does

obtuse gale
#

@potent nest hello i summon you

#

invokestatic SirYwell.get():SirYwell

half harness
#

oooooooooooooooooooooooooo

obtuse gale
#

does reordering enum constants break already-compiled switches?

#

i think i'm asking the wrong question because i know it does

#

but

#

i cannot find absolutely nowhere in neither specification how switches on enum constants work, jls cannot be more vague about it and jvms.. well... tableswitch/lookupswitch works on numbers, not "enums"

#

is the "compiles to switch on ordinal" specified absolutely anywhere?

prisma wave
#

I dunno

obtuse gale
#

i know you don't know

#

if i knew you knew i would've mentioned you

#

not sirywell

prisma wave
#

no you wouldn't

obtuse gale
#

actually i wouldn't have mentioned you either

#

yea

#

lmao

potent nest
hot hull
hot hull
static zealot
hot hull
#

Might revive the global version instead

static zealot
#

No

#

I am PRing to the global one anyways lmao

hot hull
#

Need to go over what even is made, and what could be added

#

Wanna hop in my dms and gimme some ideas on what features could be added?

static zealot
#

haha

potent nest
obtuse gale
#

oh right the array is based on the runtime ordinals

#

somehow in my mind it was like well this is pretty stupid what is this inner class array nonsense but it's actually a pretty clever trick so it doesn't break when enum entries are reordered

#

I see now

distant sun
long dagger
#

Is it possible have a bunch of proxies all across the US, and send players to the one closest to them? I know using RedisBungee you can send people between bungee proxies, but is it possible to send them to the closest one? I think I could use IPs to get the general location.

cobalt marlin
#

so regardless of where you put all of your "close" bungee proxies, they will get routed from the main to there

long dagger
#

ah

cobalt marlin
#

its a mc limitation, unless they disconnect then connect again sadly its not possible

#

and there is no way to redirect a client

#

so you can only route

obtuse gale
lament bridge
#

Any good ideas for a plugin i can make as practice?

cobalt marlin
#

like sql, gui with pagination etc

#

they are usually used in basically every plugin

obtuse gale
#

inventory api Dead

cobalt marlin
#

if those feel too complex still, then something simple is probably better
something with cooldowns for example

cobalt marlin
#

they function kinda weird with all the cloning they do

obtuse gale
cobalt marlin
obtuse gale
#

"funny" cube is a dictator

cobalt marlin
#

dam

#

enable emotes

obtuse gale
#

i think all support channels that are not #development have embeds/attachments/external emojis disabled

#

no funsies

cobalt marlin
#

why though

#

embeds make sense

#

attachments not so much

static zealot
#

is it not just for small tiers?

obtuse gale
#

no

static zealot
#

please test my game I just made.

cobalt marlin
#

ah true, people there probably are a bit more gullible

cobalt marlin
lament bridge
static zealot
#

While we are aware of this, it is very understandable for a user that doesn't usually spend 12 hours a day on the internet to not be aware of these kind of scams going on.

obtuse gale
#

you gotta keep in mind the average discord user lacks large brain chunks

cobalt marlin
#

i can see why it can spread

static zealot
obtuse gale
#

yeah that's far more believable than in any random server

cobalt marlin
static zealot
#

We are very used with the internet and with all the bad stuff that happens on it since we spend 8+ hours a day on it.

sick belfry
#

Yes

cobalt marlin
#

but i see the point

#

what about emotes though

#

those are malware too? KEKW

static zealot
static zealot
cobalt marlin
#

i just realized that they were disabled there tbf

static zealot
#

You have to talk with cube about that. Idk

compact perchBOT
cobalt marlin
#

barry also seems a bit stricter there

static zealot
#

Yeah. Because less experienced people are the ones usually going in those channels.

cobalt marlin
#

yeah it makes sense

static zealot
# compact perch

I love how "Access to the HelpChat SMP Server" is still listed as a perk :))))

cobalt marlin
#

only one thats lowkey annoying is the caps limiting thing it has

static zealot
#

Yeah. I do feel like it should be increase a bit as well.

cobalt marlin
#

maybe check past x messages as the % of caps or smt

#

its annoying when someone types in caps only, but feels quite limiting atm

static zealot
# compact perch

yeah. Access to external emojis is listed as a booster perk. I knew I've seen that mentioned somewhere.

pastel imp
#

can I use Intellij's profiler to profile bukkit plugins?

obtuse gale
#

i mean not plugin specifically, you profile the entire runtime

obtuse gale
#

you don't run just the plugin

#

you run a whole ass server

pastel imp
#

so profiling would be useless?

obtuse gale
#

no

#

but it would include a fuck ton of data

pastel imp
#

pain

obtuse gale
#

obviously different profiling tools have their own way to do different kinds of filtering

pastel imp
#

so would a profiler like spark be better?

potent nest
#

not necessarily

pastel imp
#

My confusion levels are high rn

long dagger
hot hull
#

A plugin which gives you plugin ideas

lament bridge
pastel imp
half harness
#

Anyone know the differences in ```java
// org.bukkit.Particle
EXPLOSION_NORMAL,
EXPLOSION_LARGE,
EXPLOSION_HUGE,

sick belfry
#

Shit that isn't the domain

half harness
#

Ha

#

:)

#

Can't really try it right now and can tomorrow so was seeing if anyone else already had a project with explosion particles

half harness
#

oh

#

yep

#

πŸ‘

sick belfry
#

Yes

half harness
#

πŸ–ŒοΈ

#

I'll just do EXPLOSION_LARGE for now

#

since that's in the middle

#

:)

sick belfry
#

Aight

fiery bane
#

anyone good with fawe api?

prisma wave
#

I'm sure someone is

fiery bane
obtuse gale
#

show code

fiery bane
# obtuse gale show code
Bukkit.getServer().getScheduler().runTaskAsynchronously(MineEnchants.getInstance(), () -> {
            Bukkit.broadcastMessage("B");
            try (EditSession editSession = WorldEdit.getInstance().newEditSession(FaweAPI.getWorld("World"))) {
                Bukkit.broadcastMessage("C");
                EllipsoidRegion explosiveRegion = new EllipsoidRegion(FaweAPI.getWorld(block.getWorld().getName()), BlockVector3.at(block.getX(), block.getY(), block.getZ()), Vector3.at(3, 3, 3));

                Bukkit.broadcastMessage(editSession.countBlocks(explosiveRegion, new BlockMaskBuilder().addTypes(BlockTypes.SLIME_BLOCK).build(editSession)) + ": ");

                for (BlockVector3 b : explosiveRegion) {
                    //if (quarry.withinMineWE(b)) {
                        //b.setBlock(editSession, BlockTypes.AIR.getDefaultState());
                        //b.setBlock(editSession, BlockTypes.AIR.getDefaultState());
                        block.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, new Location(block.getWorld(), b.getBlockX(), b.getBlockY(), b.getBlockZ()), 1);
                    //}
                }

            }
        });```
obtuse gale
#

hm i'm gonna assume FaweAPI.getWorld("World") is returning null, you should try debugging to see if it's null or not, print it or something

potent nest
#

Uh there should be a null check probably…

fiery bane
#

I fixed btw forgot to say, Thanks

potent nest
#

Was it the problem Emily mentioned?

fiery bane
#

yeah

#

I had removed World

#

but i forgot

obtuse gale
obtuse gale
hot hull
#

Sheesh, clean

#

new IJ hella sexy

quiet depot
#

@hot hull but there's no pattern

#

it's boring

#

jb splashes have always been rather artistic

#

that "iJ" stylising is new tho, don't mind that

ocean quartz
#

2022 has been pretty good

#

2021 was hella ugly

quiet depot
#

tbh I haven't coded much this year at all so I haven't seen the splashes

ocean quartz
#

Nothing beats 2019 though

quiet depot
#

was that the wireframe one?

#

oh, no, that was the blobs

#

2018 had the best splashes imo

ocean quartz
#

Yeah

distant sun
ocean quartz
#

18 was cool too, but I still prefer the blobs

quiet depot
distant sun
#

Damn

#

And now we got.. this

quiet depot
#

yes lol

#

I hope this isn't a permanent change

ocean quartz
#

16 was quite cool too

quiet depot
#

I don't think I ever saw those splashes myself

distant sun
#

Can we not just use our own images? πŸ˜„

quiet depot
#

I'm guessing I first used ij around 2017

queen saffron
#

you probably can

distant sun
#

Pff, 2016

queen saffron
#

Im currently doing Computer science and i have to use Visual studio code

#

;/

distant sun
#

2016.3 was the best

distant sun
#

Look up for a pets extension, nova

quiet depot
#

lots of people really like vsc

queen saffron
#

*Visual studio

#

Not vsc

quiet depot
#

oh

ocean quartz
distant sun
#

C# I guess

quiet depot
#

what lang is vs for?

#

c#?

queen saffron
#

But for C# i really dont know why we are still learning it

#

They say cuz its a basis language

#

but im like- What about python? Thats a basis language and its still used widely.

distant sun
#

For real Matt

quiet depot
#

python isn’t really good for medium or large projects nova

distant sun
#

C# is still used wdym

quiet depot
#

if you code well c# will scale to any project size

queen saffron
#

No im aware-

quiet depot
#

it’s a good lang to know

distant sun
#

In all projects I've been on they were using C#, either for everything or just for some parts of the app

queen saffron
#

But what i mean is that they are trying to learn us the basis of coding.
And are giving us assignments from 2013 or somethin

distant sun
#

I cant stand VS, that shit is ugly and confusing tbh

quiet depot
#

more langs are like c# than oython

queen saffron
#

fair fair

queen saffron
#

But "Windows forms applications"

quiet depot
#

I know I’d much rather learn c# than python in uni

distant sun
#

Do they not allow ReSharper? Or whatever the jetbrains product name is

ocean quartz
#

Tbh I prefer C style languages over python style languages

quiet depot
distant sun
#

We will do java for the next 2 years, one course per semester kek

queen saffron
distant sun
queen saffron
#

I already got offered a job and im in my first year lmao πŸ˜‚

hot hull
#

Was hella good

distant sun
hot hull
#

I like the new ui tho

#

Really clean

quiet depot
#

is there a new ij ui?

ocean quartz
#

Yeah

distant sun
#

Idk ij was looking great already

quiet depot
#

can someone post a pic

ocean quartz
#

New UI is much better though

hot hull
distant sun
#

Maybe

#

It is just more flat imo

quiet depot
#

where’s replacement for top action bar

hot hull
#

bottom left are some stuff

quiet depot
#

bottom left looks like stuff that was bottom left before hand

hot hull
#

Honestly can't remember where anything was anymore

distant sun
#

This new ui will be optional, right?

hot hull
#

Yea

distant sun
#

Great

quiet depot
#

yeah I didn’t really have any issues with the old ui tbh

hot hull
#

Old one is great, I just like that this one is more compact

quiet depot
#

do you also like small keyboards that are missing 50% of the keys

distant sun
#

Not having a numpad is already enough for me. The other day i wanted to type one of those alt combinations to get a symbol, but guess what, I cant smiling_face_with_3_tears

hot hull
#

Never.

#

I prefer my keyboards being chonkers

quiet depot
#

ok good

hot hull
#

Was gonna build a custom keyboard, but 99% of the frames are 60% or some shit

quiet depot
#

macro keys are essential

distant sun
#

500$ for a keyboard is not a great investition imo

#

Is just a keyboard after all

quiet depot
#

is that what a custom keyboard costs?

distant sun
#

Idk, but probably 200$+

hot hull
#

Depends where you buy it, but in most cases you can't get the configuration you want, which annoys me

#

My current one is an SS Apex 5, which is a great keyboard, but I was limited with the switch selection

distant sun
#

E.g. 2$/switch * 100 keys = 200$

#

I think the great ones are pretty expensive, right? I remember I saw on amazon a small bag for like 40$

#

Or even those rings to make them more silent

hot hull
#

I mean even normal keyboards are getting quite expensive nowadays

distant sun
#

I got a red dragon keyboard without numpad for like 30€, it is not the best but it does its job

#

Tbh mechanic keyboards are a different kind, typing feels better xD

hot hull
#

Can't imagine going back to the old keyboard

distant sun
#

I will have to use my laptop's keyboard starting from monday. God i hate uni.

quiet depot
#

in some ways I prefer laptop keyboards

#

I type faster on them

distant sun
#

Yeah, I just dont like them 100%

dense dew
#

😳

cobalt marlin
half harness
#

Be able to use git (Setup .gitignore, create pull requests)
IntelliJ git plugin (?) ez

inner umbra
#

GitHub can't even use .gitignore xD

lavish notch
#

Am I having a mental break down or does m as a unit of time (eg. 5m) represent minutes and not months?

brittle leaf
#

atleast going off datetimeformatter

lavish notch
remote goblet
#

id also say months would also be mo

lavish notch
prisma wave
#

m should definitely be minutes

inner umbra
#

In Date isn't mm minutes?

lavish notch
hot hull
#

m is and always has been minutes

prisma wave
#

careful

ocean quartz
#

Yes I see the 5th line, that's exactly what I mean
If you ignore the .gitignore there won't be a list of files to ignore therefore you add all files, so you can imagine you can't really ignore itself right

#

What does that have to do with what I said? lol

prisma wave
#

ignoring gitignore is not possible lmao

#

no it's not

#

you probably just didnt commit it in the first place

distant sun
#

What if you use gitignore as it is supposed to be used kek

prisma wave
#

you are not showing anything

ocean quartz
distant sun
#

Maybe 😬

prisma wave
#

no, it just doesnt exist / you didn't stage it

#

even with .gitignore you have to manually stage files

#

besides

#

you should not be ignoring .gitignore

#

it's a bad idea

prisma wave
#

and defeats the point in having it

lavish notch
distant sun
#

start and end timestamp

lavish notch
#

or discord's epoch, whatever it's called.

cobalt marlin
weak kayak
#

hey guys

#

does anyone know, i lost old discord account i mean has been disable anyway i need a datas and i cant go to (request all of my data) how can i get data's. Thank u

dense dew
#

?not-discord

compact perchBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

manic lance
obtuse gale
potent nest
#

JavaScript JDK

rotund egret
#

ATM Machine

prisma wave
#

PIN number

pastel imp
#

Is one if statement with several conditions inside the same as having several ifs (without else) in a row?

#

In terms of performance and maintenance.

#

(In this case its an OR if statement aka ||)

obtuse gale
#

do you really care if it runs .03 nanoseconds faster?

#

(no you don't)

#

code for readability first

prisma wave
#

I care

oak raft
#

Do server owners use the latest version of mc now or is there a preferred version to have a server on still?

#

If that makes any sense

#

I remember before ppl would have their base server on 1.12.2 and use via version

#

For performance reasons I believe

pastel imp
obtuse gale
#

I mean idk what you think, but I think this

if (foo.bar() || foo2.bar()) {
  // thing
}

is more readable and maintainable than

if (foo.bar()) {
  // thing
} else if (foo2.bar()) {
  // same thing
}
oak raft
#

That is very useful actually wtf

#

Thanks

#

Interesting, it’s mostly 1.19.2

#

So I’m assuming that server owners will update their jar every time a new one comes out?

cobalt marlin
#

for a lot of small friend groups etc, it makes sense that they are hosted on latest

oak raft
#

I forgot to take that into account :/

cobalt marlin
#

what would be more useful would be a pie chart showing % of players playing on servers on x version

oak raft
#

Agreed

cobalt marlin
#

rather than raw amount of servers using a version

#

this makes me happy and angry though

#

especially since i keep getting asked to make plugins for java 8

oak raft
#

Lmao

#

β€œNo”

#

Java 11 only 3.5%?

cobalt marlin
#

i mean its either j8 or j17 /18

oak raft
#

Oh

#

I forgot I don’t have nitro 😦

cobalt marlin
oak raft
#

Well

#

Then I’m gonna assume that it’s mostly 1.8 🫠

brittle leaf
#

cus if foo or foo2 then do the same thing, the other is if foo do thing, else if foo2 do a different thing

#

like yeah do method 1 if you want foo and foo2 to do the same thing if they are true, but method 2 for if you want seperate functions depending on the outcome of this

obtuse gale
#

sure

#

I was just providing an example to his original question

#

that would be the code without explicitly using a logical or op

last nacelle
#

whats the best way to save a player's reference? Like for instance if they were to have /veinminer on or /veinminer off, would I just save the hashmap containing that info to a yml file or is there a more conventional way to do things.

last nacelle
#

oh like h2?

cobalt marlin
#

h2 - sqlite if you want it local

#

or a proper sql

#

postgre - maria

#

or mongo if you dont want to deal with sql

#

only use yml if you want users to be able to edit

#

through files

last nacelle
#

okay, thank you

gilded granite
#

Hey! I'm making an essentials plugin similar to EssentialsX, except less bloated and with more useful features. What are some features you would like to see in a plugin like that?

obtuse gale
#

/beezooka

distant sun
#

20 aliases for all commands, the more obscure they are, th ebetter

gilded granite
obtuse gale
#

I mean you asked what I'd like to see in a plugin like that

#

And I responded

half harness
#

I think you should have modules

#

You can disable modules

#

Like a fun module

#

Idk

#

Hi bm

prisma wave
#

an essentials plugin similar to EssentialsX, except less bloated and with more useful features

#

hi kotlin =

#

sorry

#

that was a bit mean

#

but

#

it's treue

half harness
#

Do you know why essentials makes worse versions of vanilla commands

prisma wave
#

does it?

half harness
#

Yes

#

Kill for ex

#

With vanilla there is so much customizability

prisma wave
#

true...

#

/killall !player

half harness
#

U can do that with kill cmd

#

Although ig it's more "difficult"

#

Kill all makes sense

#

But not kill

potent nest
#

those commands exist for a long time already

distant sun
prisma wave
#

/kickall zombie

gilded granite
gilded granite
prisma wave
#

yeah no go for it lol

#

it's a good project

#

just thought it was funny

gilded granite
gilded granite
half harness
#

*

#

theres also ** but I've got no idea what it does

gilded granite
#

i've only really seen one plugin do a decent job at this, being CMI, but its full of bugs and costs money, whereas this is gonna be free & open source

half harness
#

I just remember seeing it in tab completion

gilded granite
cobalt marlin
half harness
#

lol

prisma wave
#

CMI would be good if it wasnt buggy

#

in terms of features it's really nice

cobalt marlin
#

you get to be bloated while being lightweight still

obtuse gale
#

Can't tp to coordinates
this is false?

prisma wave
#

/tppos

obtuse gale
#

yea lol

gilded granite
half harness
#

Can't tp with direction

#

I think

#

but regular coords should work

obtuse gale
#

it also takes yaw and pitch

#

and world

half harness
#

oh

cobalt marlin
half harness
#

I didn't know about yaw and pitch

#

thats nice

gilded granite
#

Might bake it all into one plugin with a config to enable/disable modules but that may be a bit laggy

cobalt marlin
#

so they can add their stuff

gilded granite
cobalt marlin
#

like how papi operates

gilded granite
half harness
#

so as long as it doesn't take like 5 seconds

#

it should be fine

half harness
#

at that point it's just a plugin in a plugin though

#

the goal should be to have to only install 1 plugin

#

and, possibly, disable some stuff

cobalt marlin
#

yeah, but it can come with extreme basics

#

and let people add the stuff they want on top

#

like tp etc some use a dedicated plugin

#

while others want all in one

#

same with stuff like kits

half harness
#

yes but there's no benefit to that instead of just installing a regular plugin

#

ex holographic displays vs hologram module

#

PAPI (plugins/PlaceholderAPI/expansions) for example has its own API and aren't for normal plugins

cobalt marlin
#

i was gonna say if it had the api integrated for these that could actually be cool

#

but then you can just shade

obtuse gale
#

also the default /give amount can be changed in config and you can pass nbt data to it

cobalt marlin
half harness
#

the modular plugin can have an API

#

which can have like getEnabledModules()

#

and those can have APIs of their own

cobalt marlin
half harness
#

well no

cobalt marlin
#

saves the trouble of relocating and such i suppose?

half harness
#

no I mean like moderation module, fun module, etc all built-in to the plugin, and can be disabled in the main plugin's config

#

Β―_(ツ)_/Β―

gilded granite
pastel imp
#

it's obviously an abuse of ifs lol, and the functions are the same in looks but imagine every method is completely different thing

#

at the end it's quite a preference thing I assume and depends on the use case

obtuse gale
#
if (
    foo.bar() ||
    foo2.bar() ||
    foo3.bar() ||
    foo4.bar() ||
    foo5.bar()
  ) return;
#

or however you wish to format it

potent nest
#

I mean that's not really a real world example

obtuse gale
#

what do you know

#

(don't look in my github)

sweet cipher
#

If you have that many if’s you could probably abstract them away into separate methods, it may look cleaner if that’s what you are worried about

#

Or you know the true way

#
public boolean ifOr(boolean… bools) {
    for (bool b : bools) {
        if (b) return true;
    }    
    return false;
}
#

I’m on my phone so that is going to look so ugly

prisma wave
#

or use a fold because you're not a loser that uses for loops

obtuse gale
#

public void moment

prisma wave
#

fail!

inner umbra
#

That would always return true if the first boolean is true anyways.

#

And it didn't reply. 🀦

obtuse gale
#

guess.. what an or does

inner umbra
#

Was talking about what masterofthefish posted

prisma wave
#

yeah so was emily

obtuse gale
#

yes me too

prisma wave
#

it's supposed to or all the values

#

true || anything = true

inner umbra
#

Oh it's not formatted right for me lol

distant sun
#

Stream#any ayowhat

obtuse gale
#

yes Fish your style disgusts me

inner umbra
prisma wave
distant sun
#

Fish ??

obtuse gale
#

MOTF

distant sun
prisma wave
#

No need to shout.

prisma wave
#

in every way

distant sun
#

None

static zealot
#

imagine not writing

if (condition) return value
if (another-condition) return value
if (yet-another-condition) return value
if (another-condition-!?!?) return value

prisma wave
#

haters stay mad

sweet cipher
sweet cipher
#

It’s discords fault for how it works on my phone

#

Also I never use a for loop without brackets in actual code, it’s just such a pain to type on my phone

#

I’m not a monster

sweet cipher
hot hull
#

Still gets me every time

final var
potent nest
#

why

distant sun
hot hull
distant sun
#

it is great

hot hull
#

Indeed it is

lament bridge
#

How do I get different color wools in 1.8

#

This is incredibly annoying

hot hull
#

Would be less annoying if you weren't using 1.8

lament bridge
hot hull
#

np, anytime

lament bridge
#

Are you a stackoverflow moderator by any chance?

hot hull
#

Thankfully not

#

Anyways, to actually answer your question, it's changed via material data iirc

static zealot
#

itemstack data. but close enough

brittle leaf
#

isnt something like uhh, new ItemStack(Material.WOOL, 1, 0-15?)

lament bridge
#

I think this is something
ItemStack wool = new ItemStack(Material.WOOL, 1, (byte) 14);

static zealot
#

you can do that, you can also just do ItemStack#setDurability or something like that.

lament bridge
#
        stack.setDurability((short) 0);
    }```
like this?
static zealot
#

yeah. tho 0 is white and the default one.

hot hull
#

Any of you got any fine repos to contribute to?

lament bridge
#

Would this return the 1.8 equivalent of Material.WOOL_someColor

        stack.setDurability(value);
        return stack.getType();
    }
   public ColorToItem() {
   this.setType(colorWool(itemStack, (short) integer)); 
    }```
static zealot
#

colored wool did not have it's own material for each color in anything lower than 1.13.

lament bridge
#

I understand

pastel imp
# lament bridge "How do I do y in x?" "Dont use x" ty

What else should the answer be? No one is forced to give support for a 7 year, 2 months, and 10 days old minecraft version. It's your fault at the end if you refuse to update, so his answer is quite the best answer you could get.

lament bridge
pastel imp
#

Xd or try

lament bridge
#

I wish I could trust me.

pastel imp
#

Wut

obtuse gale
#

I mean you can

#

They just won't take it nicely aPES_Laugh

worthy violet
#
ObjectMapper mapper = new ObjectMapper()
                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
 Item[] items = mapper.readValue(json, Item[].class);
 for (Item item : items) {
     System.out.println(item);
 }

I have this code and I this json (https://paste.gg/p/anonymous/b4babcabec414e048c8bd7b185da2fa8) and I have already figured out how to only get the id and count but now I cannot figure out how to tell jackson to ignore the null fields in the json array when deserializing.

oak raft
long dagger
#

I have a few powerful dedis, and I was wondering what would be the best approach to a game like skywars. I am going to implement dynamic instancing, but should I also have multiple games per server? I know networks like Hypixel have a skywars game per server, but I also know that it is quite common to see multiple games per server. What is the best approach since I am not worried about performance?

cobalt marlin
#

depends on the playercount, but you can easily host multiple on one server

#

@long dagger

long dagger
#

I am expecting around 300 people on skywars at once

cobalt marlin
#

for skyblock its a bit different

#

but in general, what you want to consider is how you handle the worlds

long dagger
#

I meant skywars lol

#

my brain is not working today

cobalt marlin
#

i mean in general, if you are not running a custom server implementation

#

its most likely always faster to share the server

#

it obviously depends on how your plugin functions in the end

#

especially how it resets the map

long dagger
#

alright, I wasnt sure what was the best approach. I am not currently using my own server jar

cobalt marlin
#

the issue is the stuff that happens on init

#

its quite heavy and no point doing it multiple times

long dagger
#

I wasnt sure if that was faster than a schematic paste

#

I haven't ran tests yet

cobalt marlin
#

depends on how you paste

#

if you paste using nms, then your method most likely is faster

long dagger
#

it uses the world edit api to paste the schematic

cobalt marlin
#

no as in

#

your revert

#

bukkits set block is not that fast

#

since it runs light updates etc

#

but you can skip them using nms

long dagger
#

yeah I was using set block

#

just cause that is what was easiest

cobalt marlin
#

lemme send you a resource that will prove useful most likely

#

there was a really nice thread about it on spigot

long dagger
#

ok, thanks

cobalt marlin
#

here

#

in cases like minigames where players are not around

#

when the edits happen

#

you can skip A LOT of the steps

#

like sending update packets etc

long dagger
#

yeah no players will be in the world/server

cobalt marlin
#

you still want to update lights (or even better cache them and just revert)

#

since worlds will be small (relatively) and just copies of each other

#

there are a lot of small optimizations you can do

#

to make the minigame generation blazing fast

#

some of those also become pseudo thread safe

#

depending on the implementation btw

#

so there is quite a bit you can do

long dagger
#

it says in the setBlockInNativeChunk that the chunk needs to be loaded

cobalt marlin
#

yes, you can load through code

long dagger
#

will I need to preload it before the operation?

#

ok

cobalt marlin
#

or just keep them loaded

#

since they will be reused

#

what you can do is also cache the chunks

#

before the game

#

then re set

cobalt marlin
long dagger
#

yeah

long dagger
#

I will look into this, thanks! πŸ™‚

cobalt marlin
humble silo
#

Why does intellij Evaluator just suck so bad for kotlin... like i hate it so much, its their own language, why cant they just get debugging right

#

I think part of my issue is that im using the JPMS, but like... comon intellij, figure it out

rotund egret
#

What's wrong with it

hot hull
#

Felt that something was wrong with latest IJ, forgot to reinstall rainbow brackets πŸ™

remote goblet
#

how homosexual

hot hull
#

Shun the nonbeliever

worthy violet
humble silo
# rotund egret What's wrong with it

It literally just wont evaluate the simplest stuff, like i put in a variable that has been declared and is still in scope yet it throws some wonky backend error

rotund egret
#

Works ok for me, odd

hazy widget
#

Am I able to run 2 Instances of the same project at the same time inside IntellIJ?

rotund egret
#

How do you mean

#

Like two ij instances?

#

Or like running multiple instances of tasks for the same project

hazy widget
cobalt marlin
#

create a task for it

#

using gradle

rotund egret
#

Pretty sure you can configure the task to allow parallel runs

cobalt marlin
#

Exec task is fully capable afaik

#

^ runs from build though

hazy widget
#

I am using maven rn, is it also possible with maven?

cobalt marlin
#

you prolly can do it from here

rotund egret
#

Never used maven, but I imagine so.
Most here use gradle I think

hazy widget
#

Oh I found a plugin on IntellIJ that does the job, its called MultiRun

lofty geode
#

how are people making PLAYTIME LEVELS

rotund egret
#

Tracking play time and adding ranks at certain mile stones?

lofty geode
#

with delexue menu

rotund egret
#

oh, gl

fallen venture
#

would anyone be able to help me with a texture pack? i followed multiple youtube tutorials for custom model data and it still wont work

onyx river
#

I have a website I am trying to access the API of. This website has no documentation, and I dont believe the API is intended for developers, however is just a REST api that the website itself uses. I know someone who previously accessed the API of this website programatically, however no longer has access to their code. Just wondering how I would best go about finding the endpoints, and authentication system.

#

I have tried going to the network inspect tab and looking at the requests, however cannot find anything that seems to be of any interest, j

dense dew
#

and authentication system
is cookie with some type of id (session id) sent on request that needs authentication to proceed successfuly? if yes, you just need to send header "Cookie" w value name=value

worthy violet
#
String[][] types = new String[4][];
types[2][index] = "test";

I'm working with multidimensional array again and was wondering why this causes a NPE that it cannot store the string because types[2] is null when I've initialized the multidimensional array.

potent nest
#

you created an array of type String[] of size 4, how should java know what elements those 4 String[] objects should look like?

worthy violet
#

Soooo I need create another set of String[] and set types[2] to it and then I can do types[2][index] = "test"; right? I am not quite understanding the last part of that sentence.

potent nest
#

basically yes, however there is a shortcut if you want all those arrays to have the same size. In that case, you cam simply write e.g. new String[4][5]

#

that will create 4 arrays of type String[] with each having a length of 5

worthy violet
#

thanks I'll try that!

potent nest
#

yeah in such case there's no way for the language to know what sizes you want

worthy violet
#

Fixed it, thanks πŸ™‚

sturdy zinc
#

was there a change to statistics on how you read it from 1.18 to 1.19?

hot hull
#

No?

#

It's still Player#getStatistic

sturdy zinc
#

they changed the name from minecraft:play_one_minute to minecraft:play_time

hot hull
#

about time

sturdy zinc
#

not sure when it was changed, my migration command I was just told it don't work on 1.19

#

didn't think it would be that simple of a fix

brittle leaf
#

im sure theres a method for getting the server's version

#

its what other people do to get the nms version that they need

ancient moss
#

any dev that can help me without insulting me?? (happend in other server)

hot hull
#

Ask away

ancient moss
#

i need a plugin that is like lifesteal but when you use an ender eye you get a shard and with 9 of those you make an heart, i tried code myself but im not really that good....

#

and im asking around if someone can do that for me

brittle leaf
#

when you say use, do you mean throw?

ancient moss
brittle leaf
#

so you throw it and it breaks it drops this shard or just when you throw them in general?

hot hull
ancient moss
#

its like you throw it and it drops the ender eye and shrd

#

"shard

brittle leaf
#

couldnt people just throw alot of endereyes and farm shards really easily?

ancient moss
#

i'm trying to make an smp but i dont know what extra to do

#

:C

#

and i've been thinking about it

brittle leaf
#

thats the problem with smp's, trying to come up with stuff that wont completely break the experience, but tbh id say the experience gets dull when youve played vanilla for so long

ancient moss
#

the other idea that i had for the catch of the server was like when you get to 20 hearts you could trade them for like an OP item

#

"trade 10

onyx river
#

I have a CSV file that contains text & numbers, when the number is bigger than 999 the CSV file generates it as "935,52,"1,9242",13" which is obviously causing errors πŸ™„
The way I parse the CSV file is by splitting it at , so therefore its splitting at the 1

#

Whats the best workaround for this lmao

brittle leaf
#

cant you save the numbers as 1.9242 instead of 1,9242?

onyx river
#

I dont generate the CSV

#

its from a 3rd party source

obtuse gale
#

tell them they're a dumbass and they should fix their shit

onyx river
#

amen

obtuse gale
#

otherwise, split at , rather than just ,

brittle leaf
#

oh yeah that can work

onyx river
#

i just realised i messed up my example lol

#

theres no space after them

obtuse gale
#

then fallback to plan a)

onyx river
#

unfortunately not an option πŸ˜”

brittle leaf
#

its weird how theres multiple strings in the file

onyx river
#

ikr

#

this whole things been a mindfuck and a half

brittle leaf
#

time to manually space the file :)

hot hull
#

:what:

onyx river
#

might have to resort to a cheeky spot of regex!!!

potent nest
#

oh god

onyx river
#

Regex("(\\\".*?),(.*?\\\")")

pastel imp
#

uhm but numbers that use , are in ""

#

so you could just firstly split by ,

#

and then split each by "

#

or smt like that

#

idk .-.

#

just an idea

#

you could split it at , and then check for example index 0 if it has a ", if it does, it continues checking the next index until it finds another ", then you just put that range together into one single number

#

if that makes sense?

#

@onyx river

#

but regex might also work lol

last nacelle
#

If ur reading this I hope you get patched

hot hull
#

Since when is 1.19 so fast?

distant sun
#

Probably because of the new chunk system

scarlet sand
#

Hello good day!
I would like to ask a question.

#

on my server the player will have a menu of /items, the item will be available if the player has certain permission.
In the item he has the permission, I would like to put it in the lore showing that such a player who has the permission owns it. Does anyone have a solution?

brittle leaf
cobalt marlin
#

also make sure to open different inventories for multiple users

#

otherwise updates might update on other people's gui's too

civic sigil
#

can i add oraxen plugin to the deluxe menu?

obtuse gale
#

I don't know

prisma wave
#

Me neither

#

Maybe

obtuse gale
#

hello, i am looking for some help

obtuse gale
#

my original discord has been hacked and I just need some guidance / help

queen saffron
#

@obtuse gale

#

?not-discord

compact perchBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

lavish notch
#

Looking for opinions here- working on a new modern and minimalist design for my website (so that it can appeal to people outside the Minecraft space better) and I can't decide if I want the social icons to be black or their characteristic colours.

Thoughts?

#

fyi, that guy isn't me- purely a placeholder

lavish notch
static zealot
#

what?

lavish notch
#

Anyway, do you think the icons would be better in their known colours?