#dev-general

1 messages · Page 145 of 1

hot hull
#

NBT

split talon
#

Ah sweet. didn't think of that, thanks!

errant geyser
#

IAL

#

We built it specifically for dis

split talon
#

IAL?

steel heart
#

Kotsu

errant geyser
#

lol

steel heart
#

We should add NBT support

#

For ial

errant geyser
#

oooo

#

We should

split talon
#

this looks really nifty

#

thanks!

errant geyser
#

hold up a sec

#

Before you use it

#

Lemme update the nexus build

split talon
#

gotcha

hot hull
#

@prisma wave Need some guidance fingerguns_reversed
I have a PersistentStorage class which handles the persistancy of spawner objects, (stores the spawner list with the custom object within it as well),
What would be the cleanest was of making the spawners map exposed to static methods so I can cleanly add shit into it (preferably not having all the static methods within the storage class) - end goal is to have it structured as an api so I can use it within another plugin down the line

steel heart
#

Custom spawners oowww

errant geyser
#

@split talon done, use version 1.0.1 rather than 1.0 though now

hot hull
#

Spigot system is doodoo Conclure fingerguns_reversed

split talon
#

Grazi.

steel heart
#

Frosty couldn’t say it better myself

split talon
#

This library saves a ton of time aha.

steel heart
#

Wait what are the custom spawners spawning?

hot hull
#

The current goal isn't custom spawners yet, but to replace the spigot system with a custom one, which will hopefully be less shit

#

(Will also allow for an easy addition of custom spawners ofc)

steel heart
#

So you basically want to track all spawners in some sort?

hot hull
#

Sort of yes

#

Struggling with actually designing it so it's not shit fingerguns_reversed

steel heart
#

If you want to track them through the entire server lifetime you might want to store them in a data file

hot hull
#

I have a PersistentStorage class which handles the persistancy
fingerguns_reversed

steel heart
#

Oh yes ofc

hot hull
#

I was thinking something like this

PersistentStorage.class
  private List<Spawner>

PersistentWrapper.class
  (initializes the persistent storage class and grants access to the spawner list)

  public static addSpawner(...)
  public static getSpawner(...)
  public static removeSpawner(...)
#

But I've no idea on how to make a non shit api so open to suggestions fingerguns_reversed

steel heart
#

Api for?

split talon
#

.txt is the best data format change my mind

#

several people are typing

steel heart
#

Not at all

errant geyser
#

We have TWO cute doggo pfps in a row now

steel heart
errant geyser
hot hull
#

Wdym api for.., What I'm making rn is a base to the entire system wide spawner system, after that there's going to be another which handles silk touch and shit meaning I need an api to access the spawners and manage them

split talon
steel heart
#

I mean frosty do something and then let us look at it. You’re underestimating yourself

hot hull
#

hmm, mk

steel heart
#

You’re pro developer nocap

errant geyser
#

Now I have to write a usage file on the WorldBuilder "module"

#

Kill me

split talon
#

I've been programming for a while but nothing beyond simple things, and being here makes me realize how much I don't know lol

errant geyser
#

I was exactly the same when I joined

#

¯_(ツ)_/¯

#

I mean I'm still not the best don't get me wrong

hot hull
#

I learned java here fingerguns_reversed

errant geyser
#

I learned half of Java and all of Kotlin here fingergunboat

steel heart
#

I learned java from yt tuts, this and some other coding discords

onyx loom
#

helpchat is DEFINITELY the best place for kotlin

steel heart
#

Questionable

#

TSC is also very neat

onyx loom
#

yes very questionable

quiet depot
#

pff helpchat > tsc

errant geyser
#

idek what tsc is so I gotta agree with that

analog crater
#

The Source code

quiet depot
#

coding utube channel

#

they have a discord

onyx loom
#

helpchat coding utube channel when????????????????????????

quiet depot
#

i can’t comment on quality, I’ve never actually watched their shit

steel heart
#

They have some really good devs

analog crater
#

^ their bukkit tutorials aren't very good however they do highlight the api instead of being java good

quiet depot
#

what do you define good by conclure?

steel heart
#

People who know a coding language inside out ?

#

And also computer science really well

obtuse gale
#

their videos are probably good now

#

but their first bukkit tutorials are shitty

steel heart
#

Yeah

errant geyser
#

Conclure how would we go about adding NBT support and why is that useful?

quiet depot
#

Conclure, would you consider me a good developer?

steel heart
#

Nope Better than that

prisma wave
#

Very subjective

quiet depot
#

I have no formal education, none at all especially in computer science

prisma wave
#

In the grand scheme of things I don't think any of us are "good"

#

Compared to the gurus writing textbooks on OOP principles and stuff

steel heart
#

Well piggy you’re good compared to many other devs here not to mention you’re full stack?

quiet depot
#

oh full stack is just a buzz word

steel heart
#

Yeah alex True

quiet depot
#

it’s meaningless these days

prisma wave
#

but many of us are decent

quiet depot
#

languages these days work everywhere, people can call themselves a full stack developer even if they only know js

hot hull
#

Piggy, TSC doodoo, he uses eclipse fingerguns_reversed

split talon
#

I prefer a half stack of pancakes

#

I'll leave 😛

quiet depot
#

anyway, enough rambling, my point is conclure, I think you should change your idea of good. Like brister said

prisma wave
#

it's relative

ocean quartz
#

Piggy StringBuilder cannot be final on my case, it gets reset on line 44

quiet depot
#

oh

#

must have missed that

#

anyway it looks relatively clean to me

#

I’d assume a compiled regex would out perform it though

steel heart
#

Well not really I’d generally say good to someone who knows java decent

#

How old are you btw?

hot hull
#

117

errant geyser
#

Have you even seen his Spigot profile?

#

Most of the comments are just: "how do you live this long" and Piggy goes: "Just don't die"

onyx loom
#

not hard 4Head

quiet depot
#

ez

ocean quartz
#

I wonder, because regex was being pretty complicated to get working, the rules were getting too big

steel heart
#

Kotsu I mean it could be nice to have a built-in NBT support just because it looks more feature rich fingerguns

hot hull
#

This is what I currently have, suggestions?

quiet depot
#

Don’t hardcode the keys matt

errant geyser
#

True but like, why would it be useful Conclure? I've never used NBT don't hurt me

quiet depot
#

assuming they’re all the same format

#

I can’t really read regex, so I’m not sure of the exact semantics

hot hull
#

katsu, cause nbt is easiest when it comes to storing data on items

#

plus, end user can't see nbt shit

steel heart
#

Make unstackable items for instance

#

You could use events yes

quiet depot
#

frosty you asked me if something was a bad idea earlier. Frankly, I’ve got no clue

steel heart
#

Piggy how old are you?

hot hull
#

Yea already figured out it was a bad idea

onyx loom
#

hes 117 smh

hot hull
#

Anyhows, I need guidance on the above thing fingerguns_reversed

steel heart
#

I mean srsly

quiet depot
#

on phone rn sorry

steel heart
#

Since you said you got no official education?

quiet depot
#

Not yet at least

#

it’s on the roadmap

regal gale
#

Someone end this..

    public void onBlockBreak(BlockBreakEvent breakEvent) {
        Player player = breakEvent.getPlayer();
        Block block = breakEvent.getBlock();
        String noBuildReason = GriefPrevention.instance.allowBreak(player, block, block.getLocation(), breakEvent);
        if (noBuildReason != null) {
            GriefPrevention.sendMessage(player, TextMode.Err, noBuildReason);
            breakEvent.setCancelled(true);
        }
    }```
That is a fragment of code of GriefPrevention about handling block break. Instead of making `canBreak()` or smth like a normal person, they did that
hot hull
#

He's 117 seriously smh

steel heart
#

Hmm but like are you above 20+?

#

Or under

onyx loom
#

18 iirc

quiet depot
#

I’ve never said I was 18

#

I’ve never publicly revealed my age

onyx loom
hot hull
#

I know his age >:}

steel heart
#

You done with university?

#

Or even done with college?

quiet depot
#

No such thing as college down under

#

we have high schools, tafes, and universities

hot hull
#

Conclure, mind checking out what I currently have and giving some input

steel heart
#

Yes

#

Okay what country?

#

Or maybe too specific

quiet depot
#

au

steel heart
#

What continent?

errant geyser
#

Oceana

#

or his barn?

#

idk

#

One of the two

steel heart
#

Ah, but like you done with high school?

quiet depot
#

¯_(ツ)_/¯

#

who knows

#

maybe I’ll be a high school teacher one day

prisma wave
#

Mysterious

hot hull
#

KM, I need your guidance fingerguns_reversed

steel heart
#

It would be interesting to know as that would give me more info on how good you are relative to your age

hot hull
#

If you've got time ofc KM

prisma wave
#

Lemme get breakfast and I'll come on pc

errant geyser
#

HOW

#

BM

#

When did you wake up

#

What the fuck is wrong with your sleep schedule

prisma wave
#

then I have time

#

woke up at like 1

#

quite a lot

errant geyser
#

HOW

quiet depot
#

conclure don’t think of people as good or not. Just take their advice, do your own research, and make a decision.

prisma wave
#

^

hot hull
#

katsu, it's 3pm and I just had breakfast

#

I woke up at 7am

onyx loom
#

What the fuck is wrong with your sleep schedule
@errant geyser 2pm is normal time what?

hot hull
#

No it's not jesus

onyx loom
#

if ur not waking up at atleast 12pm everyday ur doing smth wrong

#

or u have a life Kappa

prisma wave
#

if I had school I would be up at 6:30

#

just making the most of covid you know

onyx loom
#

indeed

#

this is a once in a lifetime opportunity

errant geyser
#

I woke up at half 7, and thats late for me

#

What is wrong with you people

onyx loom
#

LATE??????

prisma wave
#

I could say the same to you

onyx loom
#

i literally went to sleep at that time

prisma wave
#

imagine choosing to wake up before 10am

onyx loom
#

couldnt be me

errant geyser
#

meh

#

I like it

onyx loom
#

early bird

steel heart
#

Piggy yeah that’s probably better although I’d probably say good to someone who I feel is formed. Well might not actually good but compared to me atleast I guess.

hot hull
#

I go to sleep at 12am/1am and wake up at 7-8am

quiet depot
#

I’m in a constant state of chronic sleep deprivation

#

even though I get loads of sleep these days

onyx loom
#

me too

prisma wave
#

aren't we all

#

😔

quiet depot
#

like on a week day lol, sleep easily for 12 hours, and I’m still tired

#

what’s up with that

onyx loom
prisma wave
#

bodies are weird

onyx loom
#

very true

obtuse gale
#

I got quite a few scratch files

prisma wave
#

that's a lot of EVIL scratch files

errant geyser
#

the hell are they

prisma wave
#

hard to explain

#

like mini code files that aren't part of your project

#

You can use them for testing stuff

#

Without making a new class normally

onyx loom
#

theyre cool

#

i mainly use them for clash of code

#

speaking of which.... 😳

#

who wanna play

hot hull
#

KM, you available now?

prisma wave
#

Not yet lol

#

Only just got out of bed

hot hull
#

Sheesh

split talon
#

Like man, I've taken 3 years of comp sci classes and I'm still shitty at it

prisma wave
#

Join the club

errant geyser
#

Hey welcome

prisma wave
#

I find most of the actual important stuff just comes from experience and practice

#

I have literally never needed to write a sorting algorithm by hand for example

errant geyser
#

I have for CS, in python

#

Otherwise no

prisma wave
#

I mean for something that isn't school

errant geyser
#

Ok then yeah, no

split talon
#

My last class I took was all data structures/algorithms bleh

prisma wave
#

Data structures are useful

split talon
#

Yeah but I don't find that aspect of CS very enjoyable

prisma wave
#

some algorithms are, in most high level languages they will already be done for you though

errant geyser
#

Networking is super fun imo

prisma wave
#

totally

split talon
#

I've barely dipped my toes into networking so far

prisma wave
#

very interesting stuff

errant geyser
#

I mean I love it and its really interesting & not too hard

quiet depot
#

you guys in uni?

split talon
#

Just started my first year of my CS degree aha

quiet depot
#

what are you majoring in?

prisma wave
#

Going to uni in 2 years for me

split talon
#

Computer science, ironically @quiet depot

quiet depot
#

oh

obtuse gale
#

how would one convert a string like this

"""
One of 
These
Strings
"""``` into a List<String> where each line is a line on that string
quiet depot
#

uni I'm looking at offers a computer science degree, majoring in cyber sec or software engineering

#

assumed other unis would be the same

errant geyser
#

Split at the newline char?

split talon
#

^

obtuse gale
#

does kotlin just chuck a \n in it?

prisma wave
#

Yes

obtuse gale
#

aight

errant geyser
#

yeah

obtuse gale
#

so splitting @ that should be good?

prisma wave
#

That's the point of a Raw string

#

But String.lines is a thing

split talon
#

String[] lines = contents.split("\r?\n");

obtuse gale
#

ew java

prisma wave
#

this is kotlin fingerguns

obtuse gale
#

tryna make a fancy item builder

split talon
#

ah

#

never used kotlin, ew

prisma wave
#

yeah just use String.lines

#

"Ew"?!?!?!

obtuse gale
#

crussade

prisma wave
#

never insult the hive mind like that again

errant geyser
#

never used kotlin, ew
Jax you made a good first impression and you're using IAL so I don't wanna do this but you leave me no choice

#

CRUSADE!

onyx loom
#

ew???????????

prisma wave
#

Kotlin good Java bad

hot hull
#

Java dooodoo kotlin good

split talon
#

Kotlin looks really promising actually

prisma wave
#

Phew

onyx loom
#

thats what i thought

prisma wave
#

Pack it up guys

errant geyser
#

Oke everyone pack it up

prisma wave
#

that was close!

obtuse gale
#

im thinking something like this

        val item = item {
            material = Material.STONE

            lore = """
                Line one,
                Line two,
                Line three
            """
            
        }.build()``` idk if that would work
hot hull
#

Crusade averted

onyx loom
#

too close 😅

prisma wave
#

I've done that

#

It's possible

#

incidentally the correct term is "DSL" not "builder"

split talon
#

Time to fire up notepad and code in some kotlin

prisma wave
#

notepad??

hot hull
#

make sure you use the newline char for line checking cause , is ew

prisma wave
#

Kotlin deserves better

obtuse gale
#
class Item{
    fun build():ItemStack{
        val stack = ItemStack(material)
        val meta = stack.itemMeta

        meta.lore = lore.lines()

        return stack
    }

    var material:Material = Material.STONE

    var lore = ""
}``` this how you would do it?
split talon
#

notepad++ at best

hot hull
#

If it ain't IJ, you don't deserve it fingerguns_reversed

prisma wave
#

Ehh

onyx loom
#

^

prisma wave
#

Pretty much

obtuse gale
#
fun item(initializer: Item.()->Unit):Item{
    return Item().apply{ initializer }
}```
quiet depot
#

sublime

errant geyser
#

^

obtuse gale
#

found that online for the item method

split talon
#

Atom >sublime

prisma wave
#

that will mostly work

quiet depot
#

you're objectively wrong

split talon
#

Lmao

prisma wave
#

you probably want to return the build() call?

errant geyser
#

Jax no. I was there with ya, but I tried sublime and I couldn't go back

obtuse gale
#

oh

split talon
#

I'm just joking around. I use intelliJ and sublime already

obtuse gale
#

yea that makes sense

errant geyser
#

F

#

We've been had

prisma wave
#

Also, apply(initializer)

#

Not curly brackets

hot hull
#

KM, you on pc? fingerguns_reversed

quiet depot
#

katsumag, I'm worried. sublime might not be the top dog for too much longer

prisma wave
#

Just about

quiet depot
#

perhaps it's already not

#

vscode is a really viable contender these days

hot hull
#

vscode is nice

prisma wave
#

In terms of speed it is I think

quiet depot
#

oh no

prisma wave
#

vscode looks nicer

quiet depot
#

it's not lol

#

sublime is still the fastest

#

I honestly doubt that'll ever change

#

but everything else wise, they're comparable

prisma wave
#

Not unless they stop using electron

quiet depot
#

even then

#

it's debatable

#

sublime is c++, and is designed with speed in mind

split talon
#

I absolutely despise vs

steel heart
#

AJ implement a Supplier<ItemStack> perhaps? Could be useful if spigot will accept my pr

quiet depot
#

I mean I do too jax, simply because it's not sublime

#

but I can't ignore the facts

prisma wave
#

ew

#

Supplier

quiet depot
#

most cases they're comparable, some cases vscode is winning

prisma wave
#

In kotlin

#

we don't do that here

obtuse gale
#

can I make it so im forced to give it a thing?

prisma wave
#

wat

#

Oh no

errant geyser
#

sublime might not be the top dog for too much longer
NOOOOOO

steel heart
#

You can’t implement interfaces in kotlin?

prisma wave
#

Your best option is runtime exceptions and/or default values

#

Of course you can

steel heart
#

Thought so

prisma wave
#

but java's functional interfaces are not an idiomatic thing in kotlin

split talon
#

anything with "visual studio" in the name gives me ptsd from my shitty laptop days. So much code lost from VS deciding to stop responding

obtuse gale
#

wdym

prisma wave
#

because first class functions exist

steel heart
#

Yeah ofc

prisma wave
#

Eg in the build() function if they haven't set the material, throw an exception

quiet depot
#

vs != vscode

#

important distinction

prisma wave
#

or use a default value

split talon
#

I'm aware, but og visual studio really tarnished the name for me

obtuse gale
#

hm ok

errant geyser
#

I don't like the whole "visual" family but thats just me

split talon
#

likewise

prisma wave
#

vscode is nice, Vs not so much

split talon
#

vs is a nightmare

obtuse gale
#

whats kotlins onEach?

prisma wave
#

Then again any IDE compared to a jetbrains one feels infinitely more clunky imo

#

onEach?

obtuse gale
#

mm

prisma wave
#

Isn't that from scala?

#

Or groovy

obtuse gale
#

nvm lol

split talon
#

same thing

obtuse gale
#

it is a kotlin thing

#

it just applys something to each thing in a list

prisma wave
#

huh

#

How's it different to forEach?

obtuse gale
#

forEach is just a loop

#

onEach applys something to each thing I tihnk

#

one sec

split talon
#

onEach returns the collection doesn't it?

steel heart
#

like a function?

prisma wave
#

that just sounds like map

errant geyser
#

Big thonkers time here

prisma wave
#

🤔

errant geyser
steel heart
errant geyser
steel heart
obtuse gale
#

wait maybe not lol

errant geyser
steel heart
#

I’m not a nitro

obtuse gale
steel heart
#

So can’t use external stuff

errant geyser
#

Well you do got Nitro

split talon
#

I love this discord already

errant geyser
#

Just not boosting I assume

steel heart
#

I boost 3 other servers :/

errant geyser
#

Yikes you pay for another boost

steel heart
#

No someone paid me to boost them

errant geyser
#

oh

prisma wave
#

isn't that more expensive than just buying nitro?

#

lol

split talon
#

Imagine paying money just for emotes

errant geyser
#

He has Nitro BM

steel heart
#

It’s cheaper to buy another one if you have nitro

prisma wave
#

o

#

the only reason I bought nitro was for the multi fingerguns

errant geyser
#

I still haven't got mine

#

Admins out there slacking

prisma wave
#

😦

quiet depot
#

o wot

#

when did u boost?

errant geyser
#

Almost a week ago now I think

quiet depot
#

=multi

compact perchBOT
#
Your XP Multiplier:
quiet depot
#

=multi spin

compact perchBOT
#
New XP Multiplier...
prisma wave
#

ayy

obtuse gale
#

oooo

errant geyser
#

obtuse gale
#

o

prisma wave
#

not bad

obtuse gale
#

😦

errant geyser
#

I mean

prisma wave
#

could be worse

quiet depot
#

rip

errant geyser
#

Its better than nothing I guess

#

Might boost again at some point for a better one 😎

onyx loom
#

the only reason I bought nitro was for the multi fingerguns
@prisma wave meeee toooo 😎

errant geyser
#

Well

#

Kotlin is very good guys

prisma wave
#

😎

hot hull
#

very good

onyx loom
#

kotlin kotlinkotlin kotlinkotlin kotlinkotlin kotlin

errant geyser
prisma wave
#

ohh onEach returns the original collection

#

here

errant geyser
#

Ok

#

So

#

Java is bad, Kotlin on the other hand is the intellectuals language

prisma wave
#

indeed

#

also

hot hull
#

KM

steel heart
#

so onEach is like peek?

prisma wave
#

FP good OOP bad

errant geyser
#

Very good smart big words

onyx loom
#

kotlin good intellij good gradle good java bad maven bad eclipse bad

prisma wave
#

yes

#

@steel heart

hot hull
#

You know what I'm gonna ask right?

steel heart
#

Noice

prisma wave
#

I do

#

can you ask it again

quiet depot
#

fp, oop

errant geyser
#

kotlin good intellij good gradle good java bad maven bad eclipse bad

Wise words Kali

prisma wave
#

i forgot what you were talking about

hot hull
#

You on PC?

quiet depot
#

anyone tried out data oriented programming?

steel heart
#

Foop

prisma wave
#

nope

#

yes

#

agh

steel heart
#

Fdoop

errant geyser
#

I have not

prisma wave
#

@quiet depot nope @hot hull yes

errant geyser
#

BOOP when

quiet depot
#

functional data object oriented programming

prisma wave
#

😅

#

sounds scary

quiet depot
#

that's something you could achieve in graal

prisma wave
#

well

#

first off, obligatory "ew java"

#

anyway

quiet depot
#

EWWWWW

hot hull
#

Agreed, but I'd rather have it made in something I sort of understand

onyx loom
#

ew

quiet depot
#

i physically shook

prisma wave
#

DI

errant geyser
#

Frosty this is why I need to make that wrapper for you so that you can pretend your advancement API is written in kotlin

#

😎

prisma wave
#

wait what's it called

quiet depot
#

please

#

remove that constructor

prisma wave
#

inversion of control?

quiet depot
#

or make it non static

hot hull
#

Piggy, that's why I need suggestions :((

quiet depot
#

dependency inversion

prisma wave
#

yeah

quiet depot
#

frosty

#

it probably doesn't need to be static

hot hull
#

But I need static so I can use it in the other shit

quiet depot
#

no

#

that's what dependency injection is for

prisma wave
#

this is a bit nitpicky but I think SPAWNERS should be a Set rather than a List

errant geyser
#

Honestly frostiboo

hot hull
#

I'm not about to use DI for the entire api lmao

prisma wave
#

also, why is it static

#

with a non-static getter

#

jesus

quiet depot
#

well if you insist on static

steel heart
#

Also frosty if you want to use it for externally, use ServicesManager

errant geyser
#

inb4 "UsE gUiCe"

quiet depot
#

make the PersistentStorage variable a constant

#

initialize it using a static initializer

#

get the plugin instance via JavaPlugin#getProvidingPlugin

#

there is literally no reason to pass the plugin instance via constructor

steel heart
#

Never used guice almost because I feel like it doesn’t give that much

prisma wave
#

don't bash it until you try it

hot hull
#

See this why I need opinions fingerguns_reversed

#

And yea I will Conclure

prisma wave
#

Guice is very nice in large codebases

steel heart
#

And writing explicit DI doesn’t matter to me

prisma wave
#

for a few classes it's overkill of course

quiet depot
#

conclure you have to know how to use it with proficiency before it's value becomes apparent

steel heart
#

True

prisma wave
#

registerListener(final Listener... listeners) "listener"... "listeners" Thonk

steel heart
#

Essentially from what I understand it just hides the keyword new ?

quiet depot
#

no

prisma wave
#

well

hot hull
#

forgot an s KM fingerguns_reversed

prisma wave
#

not exactly

quiet depot
#

new is still used with guice

#

however exclusively on data objects

#

use it on anything else, and you're probably not understanding guice correctly

prisma wave
#

same with spring autowiring

hot hull
#

Another question, I need to access storage within the class where the player wrapper gets initialized, do I just use a getter or do I make the storage constant public?

prisma wave
#

depends

steel heart
#

Frosty registerListeners(Listener listener, Listener... listeners) {
Lists.asList(listener, listeners).stream()
}

#

Or maybe it’s newArrayList()

#

Can’t remember

prisma wave
#

you might want a getter that wraps it in an immutable collection

steel heart
#

But it takes a single object and then a vararg

prisma wave
#

obligatory "kotlin has mutability in the type system" message

quiet depot
#

that's redundant conclure

prisma wave
#

immutable wrappers bad

steel heart
#

Not rly

quiet depot
#

why not?

hot hull
#

See KM, the storage part should not be modified (apart from the spawner set ofc)

steel heart
#

Avoid calling it empty?

quiet depot
#

nothing will happen if it's empty

#

Arrays.stream will simply terminate prematurely

errant geyser
#

Cos like, this is much cleaner than a sperate getter

    private val _layers = mutableListOf<Int>()
    val layers: List<Int>
        get() = _layers```
prisma wave
#

that's also gross

steel heart
#

True although I like when the compiler tells me not to

quiet depot
#

if anything, you lose more performance doing it your way, as you now have to concatenate two arrays, or two streams

prisma wave
#

mutability in general is gross

steel heart
#

Well you’re only registering onEnable?

quiet sierra
#

Stream.of

steel heart
#

That takes varargs only?

quiet depot
#

illusion I'd recommend reading the context before replying

errant geyser
#

Destroyed

quiet sierra
#

I'm stupid I know

steel heart
#

Yes it’s not as performant true but shouldn’t matter that much if it’s just invoked once in a while

errant geyser
#

Damn I shoulda said rekt

prisma wave
#

can we go back to circlejerking

errant geyser
#

Sure

#

Kotlin good

prisma wave
#

it's more interesting than serious conversation

#

clojure good

#

kotlin bad

errant geyser
#

Clojure meh

quiet depot
#

lisp meh

prisma wave
#

blasphemy

errant geyser
#

I still need to learn that

#

At some point

prisma wave
#

yes

#

you do

#

now is a great opportunity

steel heart
#

Scratch good

prisma wave
#

I can type very long paragraphs

quiet depot
#

skript good

#

clojure bad

errant geyser
#

Remember our deal tho

prisma wave
#

no

#

i forgot

errant geyser
#

PSL welperino = Clojure for me + free xp for you

prisma wave
#

oh

#

fine

steel heart
#

K

quiet sierra
#

a pin would be good

steel heart
#

I

#

K

prisma wave
#

a pin for what?

steel heart
#

O

hot hull
#

So

steel heart
#

T

#

L

#

I

quiet depot
#

pls

steel heart
#

N

#

Ok sry

quiet sierra
#

skript good

steel heart
#

Heh

quiet depot
#

skript is very good

prisma wave
#

kotlin just isn't as extendable as clojure

errant geyser
#

CRSUADE

#

KIll this man

quiet depot
#

dude clojure just isn't as extendable as skript

steel heart
#

Block programming is good

prisma wave
#

although fun fact apparently they are adding support for compile time checking in kotlin 1.4 or something

hot hull
#

What to do with the storage constant now which I need to access within the class where the wrapper get's initialized

static zealot
#

I like how Brister just evolves every day while we just follow him without learning anything just to seem cool xD

steel heart
#

Nothing can ever be as extendable as block programming

prisma wave
#

so you can ensure at compile time that your int input is more than 0 or something

#

idk how it'll work

quiet depot
#

yeah you're onto something conclure

prisma wave
#

but sounds cool

steel heart
quiet depot
onyx loom
static zealot
#

:Guns7:

#

fuck

onyx loom
#

flex

static zealot
#

xD

hot hull
errant geyser
#

I like how Brister just evolves every day while we just follow him without learning anything just to seem cool xD
(removed the quote for xp reasons) but how else do we provide him with the endless stream of xp

static zealot
quiet depot
#

brister you should make an actual mitten

#

with all your names in it

#

brister, kotlin, skript, clojure

#

all the languages you use

onyx loom
#

SKRIPT?

quiet depot
#

and love

errant geyser
#

Sk...

#

Piggy

#

How could you

onyx loom
prisma wave
#

my god

static zealot
#

what?

hot hull
#

Piggy trying real hard over here to start a crusade

prisma wave
#

that's a good idea

hot hull
#

You goddamn sinner GWvertiPeepoChrist

errant geyser
#

Piggy really wants a crusade huh

prisma wave
#

although only people in this server would get it

onyx loom
#

which is like 10 people

prisma wave
#

¯_(ツ)_/¯

static zealot
#

xD

quiet depot
#

that's ok, awkward inside jokes are the best kind

errant geyser
#

Worth it

prisma wave
#

NO

errant geyser
#

Defo

hot hull
#

What to do with the storage constant now which I need to access within the class where the wrapper get's initialized
GWvertiPeepoSadMan

prisma wave
#

WAIT

static zealot
#

yeah

prisma wave
#

wHAT

onyx loom
#

SM????????????????????

static zealot
#

when 10 people laugh and everyone else is looking at you

errant geyser
#

Nononononononon

static zealot
#

then you start laughing at them because they can't laugh with you

errant geyser
#

Whoever did this

#

REVERT IT

prisma wave
#

inside jokes are all well and good but THIS is TOO FAR

#

phew

quiet depot
#

im sorry sad_fingerguns

prisma wave
#

😡

errant geyser
hot hull
#

getter it is

prisma wave
#

lol

#

we got a bit distracted

errant geyser
#

We ignored Frosty into deciding it himself

#

Noice

quiet depot
#

frosty

onyx loom
#

ez

quiet depot
#

instead of making all these methods static

prisma wave
#

we should do that more often fingerguns

quiet depot
#

have a static instance

static zealot
#

xD

errant geyser
#

Frosty are you slowly evolving into Niall?

quiet depot
#

public static final SpawnerWrapper INSTANCE = new SpawnerWrapper();

errant geyser
#

I feel like you are

prisma wave
#

nah

hot hull
#

I am fucking disgusted Piggy

prisma wave
#

niall would have at least 8 layers of abstraction

quiet depot
#

it's better than what you've got frosty

prisma wave
#

and much more enterprise code

errant geyser
#

Ah yes

#

Niall's Enterprise Solutions™️

onyx loom
#

enterprise code at its finest

dusky drum
#

i managed to create images in java yey!

prisma wave
#

nice

#

now do it in clojure fingerguns

quiet sierra
#

8 layers weak

quiet depot
#

no

quiet sierra
#

15 here

quiet depot
#

do it in skript

prisma wave
#

👀

errant geyser
#

NiallGetterSetterBeanFactoryComponentServiceBuilderReciever

#

™️

dusky drum
#

interesting

prisma wave
#

truly the pinnacle of code design

errant geyser
#

Indeed

quiet depot
#

I mean

errant geyser
#

I think he'd be proud of that

onyx loom
#

revolutionary

quiet depot
#

ManagerManager >

errant geyser
#

DAMN how could I forget the Enterprise Manager™️

prisma wave
#

FactoryFactoryManager

dusky drum
#

hm

quiet depot
#

FactoryFactoryManagerManager

#

perfectly legitimate class

prisma wave
#

perfection

errant geyser
#

NiallGetterSetterBeanFactoryComponentServiceBuilderRecieverManagerFactoryBuilderManagerManagerHandlerCallerRecieverBuilder™️

quiet depot
#

I have something similar in rpf

errant geyser
#

™️

prisma wave
#

now THAT is future proofing fingerguns

dusky drum
#

wtf

errant geyser
#

Its our revolution at its finest

static zealot
onyx loom
#

thank u for this niall salute

dusky drum
#

yes

errant geyser
quiet depot
#

what's up with java beans though

dusky drum
#

cant wait till humanity makes Artifical Inteligence that accualy works

quiet depot
#

why are they called beans

prisma wave
#

they're small

#

and edible

errant geyser
#

inb4 frosty yells "Baked BEANS HA Gotem"

prisma wave
#

neither of those things are true

dusky drum
#

Graphics2D g2d = bufferedImage.createGraphics();

errant geyser
prisma wave
#

apparently it's to represent versatility and reusability or something

errant geyser
#

I mean

prisma wave
#

The name "Bean" was given to encompass this standard, which aims to create reusable software components for Java.

quiet depot
#

big enterprise a____ n____ s____

errant geyser
#

Are beans irl reusable

dusky drum
#

guys which Java version do you use?

quiet depot
#

8

errant geyser
#

11

prisma wave
#

8 usually

quiet depot
#

and 11

hot hull
#

1

prisma wave
#

11 if I can help it

quiet sierra
#

5

prisma wave
#

🤮

errant geyser
#

Get out

onyx loom
static zealot
#

7

errant geyser
#

This one can't be saved

hot hull
#

Imagine using Java lmao

prisma wave
#

java 11 is actually kinda good

#

dare I say it

dusky drum
#

okay so i was trying to upgrade to 11 but like 88% of users of my plugin still use 8 ...

errant geyser
#

Not really

hot hull
#

KM, dissapointment intensifies

prisma wave
#

yeah plugins will probably be on 8 forever

quiet depot
#

nah

prisma wave
#

hear me out

quiet depot
#

they won't

errant geyser
#

Sad

static zealot
#

public ones

errant geyser
prisma wave
#

you have var, the standard library gets some nice upgrades similar to what kotlin has, and like

#

it's faster or something idk

#

modules are cool too

errant geyser
#

I mean its better

dusky drum
#

eh i still prefer using int,long,string and that stuff

errant geyser
#

But not Kotlin worthy

prisma wave
#

as opposed to what @dusky drum ?

dusky drum
#

var

prisma wave
#

oh

#

well

#

once you have to type List<List<Map<String, Optional<Player>>> every time you might disagree

onyx loom
dusky drum
#

not realy

quiet sierra
#

crap

prisma wave
#

type inference is, most of the time, better than explicitly declaring the type

onyx loom
#

type inference is great

prisma wave
#

assuming that the actual type can still be obtained from context

hot hull
#

kotlin good, java bad

prisma wave
#
var age = 30;
``` is just as readable as ```java
int age = 30;
dusky drum
prisma wave
#

nice

dusky drum
#

its just em slow obtaining images from net.

#

so i run it in seperate thread

prisma wave
#

good

#

synchronous IO is usually bad

dusky drum
#

yye

#

sadly mc cant have main stuff in async

#

it would make plugins so much "faster"

steel heart
#

some nms stuff can be async iirc

errant geyser
#

Ok so

#

gasper

#

How did u do that

dusky drum
#

G2d

prisma wave
#

yeah afaik NMS can be async a lot of the time

errant geyser
#

yeah ik

#

But how inside of that

dusky drum
#

?

quiet depot
#

you can do anything async

#

it just causes a fuck ton of issues

prisma wave
#

well

quiet depot
#

because nms won't synchronize your shit

hot hull
#

Well you kinda can't Piggy

quiet depot
#

spigot won't sychronize it either

errant geyser
#

I need to replicate almost exactly that, but can't figure out the G2D methods to use Gasper

prisma wave
#

apart from stuff that uses the AsyncChecker

#

but i see your point

dusky drum
#

eh idk how to properly use NMS Xd

#

so i just use them for anvil guis

#

thats all

prisma wave
#

forcing the game onto a single thread seems like such a waste

dusky drum
#

i mean its 2020 we have like insane cpus for multi threading and eh mojang is still mostly on single thread..

#

they could step their game up

onyx loom
#

imagine

errant geyser
#

We need to start HCCCE 2.0 but make it a server impl rather than a plugin

dusky drum
#

my bad they changed name to mojang studios*

onyx loom
#

yeah nah thats just not gonna work katsu kek

prisma wave
#

you're welcome to PR my barely functioning server impl

onyx loom
#

look how far we got with v1 OMEGALUL

errant geyser
#

It's an experiment though Kali

#

It'd be cool to see where we'd get

#

¯_(ツ)_/¯

dusky drum
#

oh and if you want my G2D code i can send you entire code just sec

prisma wave
#

it would be cool if clip merged my PR before hiding the channel 😦

quiet depot
#

katsumag, idk if you've got any idea how much effort that would take

dusky drum
quiet depot
#

not a single fully functional nms alternative exists, even to this day

prisma wave
#

yeah server impls aren't trivial

dusky drum
#

frok

#

wrong code

quiet depot
#

glowstone & cuberite come close

onyx loom
#

just recode mc 4Head

quiet depot
#

but they just aint it

hot hull
#

get good Piggy

prisma wave
#

making it all thread safe is gonna be even harder

dusky drum
hot hull
#

Since y'all don't like BukkitRunnable so much, what alternative should be used instead?

dusky drum
#

java runnable XDDDDDDD

prisma wave
#

personally I don't see a problem with BukkitRunnable

errant geyser
#

I'm aware of the effort it'd take guys, but it'd be funny to sweat our asses off (or in your case, Piggy, Bacon) and then laugh at how disfunctional it is

hot hull
#

Neither do I KM, hence why I'm asking

onyx loom
#

no thanks

prisma wave
#

apart from it being ugly

#

@errant geyser the minecraft protocol is a pain in the ass to implement

dusky drum
#

ye

errant geyser
#

Conclure swears by the scheduler and lambdas for some reason

regal gale
#

@onyx loom i already recoded my entire World expansion 👀

quiet depot
#

the protocol lol

dusky drum
#

mc is wierd

onyx loom
#

i saw

quiet depot
#

I wouldn't worry about the protocol

#

what about all of the algorithms and shit

onyx loom
#

but whyd u comment out the worlds placeholder

quiet depot
#

world generation

prisma wave
#

well yeah it's the least of your problems

hot hull
#

World generation eZ

dusky drum
#

but i cant belive they fixed fps in 1.16 i get 300+ fps, in 1.15 i mostly get 45 fps.

regal gale
#

but whyd u comment out the worlds placeholder
@onyx loom probably for the meme :p

onyx loom
#

uncomment it
it just returns the world names formatted by a ,
e.g world, world_the_end, world_nether etc

steel heart
#

BukkitRunnable is useless

dusky drum
#

no its not

steel heart
#

It is

dusky drum
#

no

steel heart
#

How isn’t it?

dusky drum
#

its good

steel heart
#

No lol

dusky drum
#

yes

steel heart
#

It’s useless

onyx loom
#

whats bad about it

#

why is it useless

#

lets have some points going in here please

prisma wave
#

it's ugly

dusky drum
#

i use it for async data sync with databases XD

hot hull
#

Conclure, elaborate your thoughts weeb

onyx loom
#

not just it bad it good

steel heart
#

BukkitScheduler?

dusky drum
#

oh

#

there are 2 things?

steel heart
#

BukkitScheduler takes a Consumer<BukkitTask>

#

Fixing the cancel problem

#

And you can use lambdas

dusky drum
#

dont both work with lambada?

hot hull
#

cancel problem?

steel heart
#

BukkitRunnable is not an interface

dusky drum
#

just store it to class and then cancel it?

steel heart
#

Runnable is working with lambda but doesn’t have a cancel method

errant geyser
#

It does

hot hull
#

It does tho?

dusky drum
#

store it as variable and cancel it?

errant geyser
#

BukkitRunnable#cancel()

steel heart
#

Runnable

#

Not BukkitRunnable

#

And why would you do that lukman?

errant geyser
#

We're on about BukkitRunnable tho

hot hull
#

We're not talking about Runnable are we tho?

steel heart
#

Consumer<BukkitTask>

dusky drum
#

well if you want to cancel it?

steel heart
#

Then better just use the scheduler ?

dusky drum
#

and as i remember isnt runnable just like task that you later on run scheduled?

steel heart
#

Also initiating BukkitRunnable anonymous is ugly and invoking any method on it returns a BukkitTask anyways

#

If you want to store a BukkitRunnable just store a Consumer<BukkitTask> ?

errant geyser
#

Not with BM's function

#
bukkitRunnable {
  //op BM stuff
}```
steel heart
#

Well I don’t do kotlin so no idea there but in java it’s useless

errant geyser
#

Fairs

dusky drum
#
bukkitTask = new BukkitRunnable(){
            @Override
            public void run() {
                try {
                    syncCrops();
                } catch (SQLException e) {
                    e.printStackTrace();
                }
            }
        }.runTaskTimerAsynchronously(simpleCrops, 0L, updaterTime);
steel heart
#

Then just use the BukkitScheduler and you don’t need to invoke the run method and all that boilerplate

prisma wave
#

//op BM stuff
lmao

dusky drum
#

you can do lambada

errant geyser
#

Much better with BM's function, thank god for kotlin DoggoPray

steel heart
#

Not with BukkitRunnable

dusky drum
#

let me show ya

steel heart
#

Consumers can, Runnables can, BukkitRunnables can’t

hot hull
#

inb4 I use a goddamn Timer smh

steel heart
#

Please show me a lambda of a BukkitRunnable

#

Then you’re a fucking wizard

old wyvern
#

Consumers can, Runnables can, BukkitRunnables can’t
@steel heart
Incorrect

steel heart
#

What’s incorrect?

old wyvern
#

BukkitRunnables can’t

steel heart
#

They’re classes?

#

Afaik it has to be an interface and the interface should only have a single abstract method

#

Prove me wrong

#

Anyways the BukkitRunnable is still in api because so many plugins rely on it although it’s useless now when they added Consumer<BukkitTask> to the scheduler

errant geyser
#

I know its not really a lambda, but IJ used to convert my BukkitRunnables to smth like

() -> BukkitRunnable() {
  //do smth here
}``` can't remember exactly what it was, but I think thats as close as you can get without wrapping it yourself to use a lambda
prisma wave
#

that won't work

steel heart
#

That wouldn’t work

prisma wave
#

And it was just IJ folding it

#

It didn't actually look like that

errant geyser
#

¯_(ツ)_/¯

steel heart
#

If you use older versions sure use BukkitRunnable but you shouldn’t use those versions anyways

errant geyser
#

AJ

hot hull
#

There's many things you shouldn't

errant geyser
#

We need to expand the FuckEmpire™️

hot hull
#

Such as use java, but here we are fingerguns_reversed

prisma wave
#

FuckJava?

errant geyser
#

That'd be interesting

dusky drum
#

ok

steel heart
#

Gasper did you try ?

dusky drum
#

no

#

im coding my discord JDA bot

steel heart
#

Maybe yugi can prove me wrong then

old wyvern
#

They’re classes?
@steel heart
Hmm I assumed they were an interface, nvm

steel heart
#

Ok there you go

dusky drum
#

fast reply

old wyvern
#

as in?

steel heart
#

Useless

dusky drum
#

but you can use Consumer<BukkitTask>

steel heart
#

^

dusky drum
#

that was added later on

#

btw

steel heart
#

Yep

#

Ik that’s why BukkitRunnable is acceptable in older versions

dusky drum
#
There are methods to take Runnable or BukkitRunnable, and recently a Consumer<BukkitTask> was added to those that take BukkitRunnable instances so you can lambda-ify them ;) That being said, sometimes you need a Runnable (if you need not cancel or further manipulate your runnable), others you need a BukkitRunnable. It depends on your use case.

Choco

errant geyser
#

Conclure for IAL do we store a list of ActionItems somewhere that I can loop through for the getByUUID thingy

steel heart
#

Hmm we got maps?

dusky drum
#

hashmap

steel heart
#

I don’t know I can check 1 sec

#

Multi maps

#

Lukman, no md5 said that BukkitRunnable is useless in newer versions where Consumer<BukkitTask> exists

#

And ask choco that as well

dusky drum
#

?

#

i sent text from spigotmc that choco sent

steel heart
#

Only reason to use BukkitRunnable as I said before is if you’re using an older version.

dusky drum
#

idk when bukkittask was added

errant geyser
#

Ok its in the AbstractListener, we store a MultiMap<UUID, Action<T>>

steel heart
#

1.8+

dusky drum
#

so i dont see an issue.

steel heart
#

Maybe it’s 1.7 and lower as well

#

Issue with what?

dusky drum
#

with runnables

steel heart
#

Runnable or BukkitRunnable?

dusky drum
#

each of them is unique

#

but they all work

steel heart
#

No issue with BukkitRunnable but it’s useless

prisma wave
#

@errant geyser doesn't that defeat the point?

errant geyser
#

of?

prisma wave
#

UUIDs are supposed to be unique?

#

Wait I'm dumb

#

Nvm

errant geyser
steel heart
#

BukkitRunnable can’t have lambdas expressed on it which means when you create one you will need to add all lot of redundant stuff where as a consumer of a BukkitTask would allow lambdas, afaik they have pretty much the same methods.

dusky drum
#

i love when youtube plays 20 seconds non skippable add.

prisma wave
#

Imagine not having adblock

errant geyser
#

The only good use case for those macs with a slidey bar

steel heart
#

Kotsu I will into that when I arrive at home

errant geyser
#

Also yeah, AdBlock is kinda 🔥

dusky drum
#

ehj

#

just use raspberry ruter and put all trafic thru it and block ads thru there

#

ez

steel heart
#

But I think you just get all the uuids from the different map, we do have a map in the manager containing all different types

errant geyser
#

We do have a Map<ActionType<?>, AbstractListener<?>> in the manager yeah, so I can do dis

steel heart
#

Yeah loop through values

prisma wave
#

Ew O(n)

steel heart
#

Okay so when do we get another multi?

onyx loom
#

tell fc

steel heart
#

(:

errant geyser
#

OH DAMN

#

Big boi

steel heart
compact perchBOT
#
✳️ Global Multiplier Expired!

The global multiplier has ran out and has been reset!

dusky drum
#

rip

steel heart
#

@pallid gale new multi

errant geyser
#

He spun it woooooooooooooo

steel heart
#

Gg