#dev-general

1 messages · Page 101 of 1

old wyvern
#

would the order matter in that?

#

if so then yes I guess the array is the better option

#

xD

#

rip

distant sun
#

orrrr, use Pair<Integer, Integer> xd

heady birch
#

or Friendship<A, B> from niallLib

distant sun
#

niallLib
The three L's of death

heady birch
#

what happened to /papi parse me?

old wyvern
#

nvm

#

yea array way works

#

But I guess you cant get the 2 numbers back? xD

hot hull
#

I was thinking of having a custom chunk object which would be stored in a set, (containing the collector object)

distant sun
#

array[0] / array[1]

old wyvern
#

what if you have just the hashcode after saving

distant sun
#

saving to file?

old wyvern
#

💀

#

yea buy just with 1 key

#

xD idek

hot hull
#

Btw, I assume saving the data as json would be cleaner right?

old wyvern
#

I just thought cantor was the way to go since its a reversible function

hot hull
#

Instead of yaml

#

And all is silent again ;(

old wyvern
#

I mean what all are you saving?

hot hull
#

Itemstacks

#

A shit ton of them

old wyvern
#

sqllite maybe?

hot hull
#

Is a db really worth it since it's only to persist restarts?

old wyvern
#

How many itemstacks are we talking about?

hot hull
#

Can't say exactly

#

Couple hundred?

old wyvern
#

Do you need all of them loaded at the same time always?

hot hull
#

Wait nvm, it'll be like 10

#

Ish

#

I was overcomplicating shit

old wyvern
#

oh that should be fine with just json

#

xD

heady birch
#

I will seriosuly make NiallLib

#

i am scared of no man

#

but that thing NiallLib it scares me

old wyvern
#

Nia666ib

heady birch
#

☠️

hot hull
#

You've got 3 L's in it, so you should be scared

old wyvern
heady birch
#

hehe

prisma wave
#

NiallLib should never see the light of day

#

@heady birch i don't really get what your idea is supposed to achieve

old wyvern
#

What is the idea?

prisma wave
old wyvern
#

What does the lib do

#

oh

prisma wave
#

Hopefully nothing

heady birch
#

!!!

#

@prisma wave Let me explain

#

so KiteBoard would have its AnimationService

#

my placeholder api expansion would have its own as well

#

but

#

If two are running on the same server, they should share one

#

so external plugins interacting the AnimationService that is shared between both plugins

frigid badge
#

why can your expansion not use kiteboard's?

heady birch
#

Its a concept, but not possible

#

Because the expansion is free

frigid badge
#

it's a seperate expansion from the plugin

#

like not revolving around placeholders for kiteboard?

heady birch
#

yeah

frigid badge
#

ah alright

heady birch
#

it always has been

#

do you get what im saying though with the services?

frigid badge
#

but why do you want them to share the same animation service

#

like what would matter

#

it's animations

heady birch
#

third party plugins registering an animation

#

it would work in everything using the animation service

frigid badge
#

just have a plugin for it then I guess.

hot hull
#

^ Would make more sense

heady birch
#

hehe

frigid badge
#

just like papi

heady birch
#

I could make a plugin within papi

frigid badge
#

or vault

heady birch
#

it would be a vault kind of thing

frigid badge
#

I could make a plugin within papi
don't

heady birch
#

😂

heady birch
#

Also no one wants an extra plugin, for whatever reason

#

Yep that

old wyvern
#

I still dont understand what you are tryin to solve

heady birch
#

nevermind

#

my goals are beyond your understanding

#

I will make a diagram

#

But yeah, their is absolutley no way it would work without a seperate plugin

#

Well

#

Im not going to share that idea...

ocean quartz
#

@frigid badge Thank you, I'll look into it
docker scares me, i need to actually learn this stuff xD

remote goblet
#

i'm back to doing data managers ASevil

frigid badge
#

docker isn't that hard to be fair

#

just requires a bit of reading

#

and understanding the concept

old wyvern
#

@heady birch cant you just

public static void tryRegister(Plugin pl) {
        ServicesManager servicesManager = Bukkit.getServicesManager();
        if(!servicesManager.isProvidedFor(TestService.class)) {
            servicesManager.register(TestService.class,new TestService(), pl, ServicePriority.High);
        }
}```
frigid badge
#

nah

#

since the class wouldn't be the same

old wyvern
#

I think he mentioned its supposed to be the same

frigid badge
#

how will he make it exactly the same if it's different plugins

old wyvern
#

He just has the same class with the same package in there

frigid badge
#

he could make a library

old wyvern
#

Yea

frigid badge
#

which registers itself

old wyvern
#

Yea and shade it

frigid badge
#

yea

#

@heady birch

heady birch
#

Yeah I was thinking that

#

But if the library is shaded into two plugins wouldn't it crash?

#

Since they have the same fully qualified class name

#

Nial you can just have it shaded into all your plugins, only one of them with the same fully-qualified class name is loaded

#

@old wyvern Do you know how it determines which one? probably based on the plugin load order

old wyvern
#

I guess yea, updating that service is going to be insanely weird and you may find situations where different plugins use difference versions of the service

#

You should probably have a separate plugin to handle that, that would be the cleanest possible way I guess

#

or hmm

frigid badge
#

I mean you can just check if the registered version is lower than yours

#

then unregister it and register yourself

#

but I'd still recommend a seperate plugin lol

heady birch
#

yeah it was just an idea

#

doubt many would use the api either

frigid badge
#

I mean you could try fiddling with it

heady birch
#

but then.. I wonder what happens if you made two interfaces (same qualified name) but with different methods?

frigid badge
#

just for the fun of it

#

then you have a collission

heady birch
#

would it be a no such method?

#

or just.. die

frigid badge
#

no such method

heady birch
#
[22:29:10 INFO]: [PluginTwo] Enabling PluginTwo v1.1
[22:29:10 INFO]: AnimationsService provided by: PluginTwo

[22:29:10 INFO]: [PluginOne] Enabling PluginOne v1.0
[22:29:10 INFO]: AnimationsService provided by: PluginTwo
onyx loom
#

👀

heady birch
#

Well.. it worked 😄

grizzled crest
#

is there a plugin that makes an npc, and when click on it, it redirects you to another server ip, without bungeecord?

prisma wave
#

Without bungee no

#

It's impossible

grizzled crest
#

why is it impossible?\

onyx loom
#

connecting to a different server is handled by the client, not the server

prisma wave
#

Well kind of

#

The Minecraft client has no support for changing server without an explicit disconnect

#

Bungee acts as a proxy so it can send and receive packets from the server they are currently connected to

#

Without bungee, it's a direct connection to the server. You can't change that without explicitly terminating the connection and making a new one

grizzled crest
#

can someone make me a bungeecord server? i have the lobby server, the kitpvp server, and the survival server. i just need help putting it all together

grizzled crest
#

how do you do it with bukkit?

onyx loom
#

BUKKIT??????

grizzled crest
#

ye

onyx loom
#

lol.

grizzled crest
#

what

onyx loom
#

i dont see why ur using bukkit

#

use spigot/paperspigot

grizzled crest
#

ok

prisma wave
#

Bukkit in 2020

#

Damn

onyx loom
#

big yikes

grizzled crest
#

:/

eternal mica
grizzled crest
#

guys, i need a couple more ports to open, but they wont

#

i have 25565

#

25566

#

open

#

i need 15567

#

i mean 25567

eternal mica
#

ok?

grizzled crest
#

and 25568

#

and on my router

#

it says there both port forwarded

#

but when i check

#

there noti

eternal mica
#

Okay 1. You don’t need to port forward ten

#

Them

grizzled crest
#

why?

eternal mica
#
  1. Why would you host this on your computer
grizzled crest
#

its on my other one

eternal mica
#

Because you just need to port forward the main proxy’s ip (25565)

grizzled crest
#

i have another computer

#

i did

eternal mica
#

Okay why don’t you use a host?

grizzled crest
#

cause it costs money

#

and i spent 1k on a new computer

eternal mica
#

Mhm

#

They’re aren’t expensive

#

They*

grizzled crest
#

what do you reccomend?

eternal mica
#

I don’t own a server

grizzled crest
#

oof

eternal mica
#

I just program

grizzled crest
#

ok

lunar cypress
#

I just got a vps from contabo, they seem to be pretty good

eternal mica
#

Don’t use vps’s for Minecraft hosting 🤦

lunar cypress
#

You get 8gb ram and ssd storage for 5€/mo

#

Why not?

prisma wave
#

damn that's really cheap

#

website looks kinda dodgy

grizzled crest
#

yeah

lunar cypress
#

They're very professional

#

They got their own servers and stuff

grizzled crest
#

they're from 2008

#

xd

eternal mica
#

they're*

prisma wave
#

might switch to them

#

I'm paying $8/month for 2 cores and like 4 GB rn

lunar cypress
#

But yeah I didn't really read what this was about, any particular reason why you shouldn't use a vps for a minecraft server?

eternal mica
#

Yeah

lunar cypress
#

...mind elaborating on it?

#

Serious question, I'm not very knowledgable in that area

prisma wave
#

I would imagine just because you're sharing resources

#

so could potentially have lag

#

hosting a big network on a VPS would be dumb

#

a small server, fine imo

lunar cypress
#

Yeah that's for sure, for a small network your budget wouldn't be as low anyway I suppose

#

Big*

#

Damn it's late

eternal mica
#

You might run in IO read and write bottlenecks

#

(if you have multiple servers all writing data to the disk. yoou might notice a slight delay)

onyx loom
eternal mica
#

Idk if that’s a troll

onyx loom
#

😑

#

what makes u think its a troll?

topaz bay
#

@ocean quartz ayudame

ocean quartz
#

What's up?

topaz bay
#

Why does reflection have to be so fucking slow

ocean quartz
#

Ikr
What are you doing?

topaz bay
#

The jvm interop for odin

#

You wanna guess what takes THAT fucking long?

quiet depot
#

reflective lookups

topaz bay
quiet depot
#

o

topaz bay
#

I can either have the type resolve the functions, or the evaluator resolve it

#

Simply adding that single line clazz.kotlin.members

#

takes 5 fucking. hundred. milliseconds.

onyx loom
#

hey pig

#

invite me to the pigs

topaz bay
#

@ocean quartz @quiet depot nailed it

#

fuck kotlin reflection

ocean quartz
#

Oh wow, why is it Kotlin's so much slower?

topaz bay
#

Its probably all of the mapping

#

all functions have to be mapped to kcallable, all the types have to be resolved and converted

#

kinda poop, wish it were lazy

worthy minnow
#

How much would it cost to pay someone to make a full basic text adventure game?

obtuse gale
#

Text adventure?

worthy minnow
#

Text adventure

obtuse gale
#

I mean, what is that

worthy minnow
#

Like imagine old school DnD on a computer

#

Where people just played through text on brick computers

#

Basically just a game where there's only text

obtuse gale
#

Oh i get it

#

A game made out of texts right?

worthy minnow
#

Yeah

obtuse gale
#

Depends on the complexity of that game though

#

What game are you planning on

worthy minnow
#

Just something simple

#

To get me through a year 11 IT class

obtuse gale
#

And your desired programming language is?

worthy minnow
#

Python

obtuse gale
#

Lucky you

#

Mine is barely Pascal while at grade 11

onyx loom
#

i swear pascal is so old now

quiet depot
#

@obtuse gale pascal > python

onyx loom
#

kotlin >>>

worthy minnow
#

So, how much would it cost?

#

I can do 50 cents

#

Fine, make it 75

#

$

#

cents

onyx loom
#

😂

worthy minnow
#

i can do up to $100 worth of sexual favours

#

as long as those favours are limited to foot rubs

obtuse gale
#

@quiet depot based on the popularity, Py is the most common used up until now than pascal thonking

quiet depot
#

popularity doesn't mean anything

#

it's popular because it's "easy" to learn (there's easier languages, cough lua, however python is too mainstream now)

#

that's the only thing python has going for it

#

everything else about the language is bad

#

it's slow, and terribly designed

#

on a scale of terrible design choices, I'd say python is on par with javascript

#

hah, javascript is also an extremely popular language

#

what's with all these terrible languages being so popular

#

I should probably say that I've never actually used pascal, I just did a quick google search for some samples (hello world, etc), along with some brief paradigm research, and concluded that pascal is better than python.

obtuse gale
#

Py has bad design of indentation yeah

#

Also this thonking

hot hull
#

Time to start a productive day of jumping out the window

old wyvern
#

lmao

quiet depot
#

that's an interesting way of being productive

obtuse gale
#

Maybe

hot hull
#

Yugi, about that topic, CollectorChunk should be a formidable name ye?

old wyvern
#

which topic?

#

oh the chunk with the beacon?

hot hull
#

Yus

old wyvern
#

hmm what does having the beacon in the chunk represent?

#

as in what is its effect

hot hull
#

Basically a chunk hopper

obtuse gale
#

Just realized that

old wyvern
#

yea that should be fine frost

quiet depot
#

frosty

#

if I converted frozenjoin to gradle

#

would you merge?

hot hull
#

I'll do it myself smh

#

Damn I updated yesterday and it's at 20 downloads already

obtuse gale
#

Only 20?

quiet depot
#

erh frosty

#

can I do it?

hot hull
#

Sure Piggy smh

#

Thien, in 12 hours that's good

#

=pl frozen join

compact perchBOT
#

vv1.2.0 by Frcsty
A Fully Customizable Join/Quit Plugin Which Supports JSON Messages, Alongside Unlimited Formats!

Downloads:

341

Likes:

2

Reviews:

8

obtuse gale
#

Frcsty

hot hull
#

Yes big poopo with a 5 star

obtuse gale
#

smh frcsty, didnt reply to that comment

#

you replied to all the others

hot hull
#

wdym, I did?

obtuse gale
#

oh right

#

i just missed it lol

hot hull
#

:))

obtuse gale
#

didnt thank them tho :/

#

you thanked everyone else

quiet depot
#

omg did I use tabs instead of spaces

pallid gale
#

thats a crime

#

i'll have your admin role for that

hot hull
#

Now all we gotta do is convince Gian to switch from DeluxeJoin to FJ

quiet depot
#

u should let me implement guice into fj @hot hull

heady birch
#

Managed to get this to work.. now is it worth implementing it

#

My animations are used in 3 active projects currently, 1 requires a little modification

#

I mean it makes sense to make it a separate library doesnt it?

quiet depot
#

yes

hot hull
#

Why Piggy

#

Is it really necessary?

quiet depot
#

no

#

nothing is ever really necessary

hot hull
#

Seems eh, just more to maintain I guess

topaz bay
#

@prisma wave You will not believe. What needed to be done. To make that work.

quiet depot
#

ima take a wild guess

#

and say the answer is "not being big dumb"

topaz bay
#

fuck you gaby

#

Dont laugh at him

#

The lexer first has to collapse the individual tokens cur,+,+ into cur,++

#

Then the parser expands that into (, cur, =, cur, +, 1, )

#

Which it then parses normally

#

I had to change the lexer and parser to use multi-pass evaluation

#

They both do 2 passes

quiet depot
#

it just doesn't look that hard tho

print("Lexing took: 41.2ms")
print("Typing took: 20.7ms")

for i = 1,10 do
  print(i)
end

print("Evaluation took: 7.39ms")```
see
#

ez

#

ur just overthinking it sx

topaz bay
#

youre ugly

quiet depot
#

lol

heady birch
#
public interface AnimationService {
    List<String> setAnimations(final List<String> text, final Player player);

    List<String> setAnimations(final String text, final Player player);

    void registerAnimation(final Animation animation);

    boolean isDynamic(final List<String> text);

    boolean isDynamic(final String text);

    Animation getAnimationByName(final String name);

    Collection<Animation> getAnimations();

    static AnimationService getInstance(final Plugin plugin) {
        AnimationService animationService = Bukkit.getServicesManager().load(AnimationService.class);
        if (animationService != null) {
            animationService = Bukkit.getServicesManager().load(AnimationService.class);
        } else {
            animationService = new AnimationManager();
            Bukkit.getServicesManager()
                    .register(AnimationService.class, animationService, plugin, ServicePriority.Low);
        }

        return animationService;
    }
}```
compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

heady birch
#

do you approve my getInstance

obtuse gale
#

smh

old wyvern
#

Our uni sent us a mail to attend coursera for open electives 💀

obtuse gale
#

Null in kotlin sure does is sensitive, isn't it?

heady birch
#

Should I include the papi expansion as a library

#

Or make the library, then papi expansion depends on that

frigid badge
#

you always come with the oddest questions

heady birch
#

☹️

#

Keep your secrets then 😫

prisma wave
#

@topaz bay that sounds painful

obtuse gale
#

whats poppin logangsters

waxen marsh
#

wassup boi

obtuse gale
#

my teacher told me ive gotta make my website work on mobile and its due tommorow so imma just half ass it and if they are on mobile they get redirected to a site that says they cant access it lol

waxen marsh
#

YIKES

#

i wish i knew enough HTML to help you lol

#

Just starting to learn website developnment next year

obtuse gale
#

dont get excited

#

frontend web dev is terrible

waxen marsh
#

it sounds fun tho

#

also it's a group assignment

obtuse gale
#

oh its not fun

waxen marsh
#

Dudeeee but can you imagine gathering with ya homies and making a website

#

lmfao

#

also, im gonna be learning c#, HTML, CSS, JS AND Assembly... yay...

obtuse gale
#

lucky

frigid badge
#

assembly is useful purely for understanding concepts

#

frontend web is hell @waxen marsh

#

you'll regret it

obtuse gale
#

^^

waxen marsh
#

Well it’s part of the program

#

Can’t do much about it

obtuse gale
#

yikes

#

just got told i have to make my entire website in adobe XD as well

errant geyser
#

Frontend is nice imo

#

Ries you're lucky to learn all those languages through your school. They started us off on python and then just kind of left us, so I had to self teach python, java, html, can you call CSS a language?

#

Assembly looks cool but apparently is a pain in the ass to use

signal tinsel
#

Frontend bores me

#

Something that interests me is databases

#

And algorithms

#

Shit u no get in frontend

obtuse gale
#

^

#

fuckn nerd

onyx loom
#

databases?

signal tinsel
#

Yes

obtuse gale
#

base for data

signal tinsel
#

Data storage

onyx loom
#

intrigue me on why they interest u

signal tinsel
#

Idk

#

It just does

#

Nah

#

How yo store billions of records in a scalable and efficient manner

#

Thats what interests me

onyx loom
#

k

errant geyser
#

Don't get me wrong, I prefer backend

#

But I don't get why everyone shits on frontend

signal tinsel
#

Ok so I won a year of free web hosting

#

With redis and mysql databases

#

Gimme suggestions on shitty shit to host on there

frail glade
#

Dayum, gg.

#

Idk

obtuse gale
#

buy a knock off helpchat domain and do something with that

#

theres poptential

signal tinsel
#

Nah

#

Idc bout a helpchat knockoff lmao

#

Idijot

#

Maybe mess around with xenforo again lmao

obtuse gale
#

my teacher wanted to get me in the habit of planning finances so

rotund egret
#

Dude nice

#

My finances are just a little bit higher

hot hull
#

Hey! atleast you aren't in the negatives!

onyx loom
#

!!!

rotund egret
#

$600/month for candles

topaz bay
#

@prisma wave it was

#

But I'm actually quite excited about this addition

#

It means I can collapse and expand any construct into whatever I want

remote goblet
#

@topaz bay Wanna see some beautiful arrow code mmSadSitMilk

prisma wave
#

congrats

topaz bay
#

@remote goblet why do I care

heady birch
#

Wanna talk about performance

remote goblet
#

@topaz bay because you're done being petty about that and i wanna torture you with it :)

topaz bay
#

almost 3k runs in 67ms

#

Kinda hot

heady birch
#

👍 Good work

remote goblet
prisma wave
#

That's not bad considering

topaz bay
#

Now... just need a stdlib

#

which I just realized I could 100% AOT compile

heady birch
#

Uh..

#

Somehow I ust revolutionalized my rendering system

topaz bay
#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

heady birch
#

Whats that?

#

Like a stack sort of thingy

topaz bay
#

Its the ast of odin

#

serialized with korm

heady birch
#

It render in under 500MS on a raspberry pi

#

Like 250ms

#

Not the feat of engineering I wanted

#

The one I needed

solemn monolith
#

I'm getting: Cannot read property 'react' of undefined, but I don't really know why?```js
async function messagePrompt(message, author, time, reactions) {
time *= 1000;

for (const reaction of reactions) {
await message.react(reaction);
}

const filter = (reaction, user) => reactions.includes(reaction.emoji.name) && user.id === author.id;

return message.awaitReactions(filter, { max: 1, time: time }).then(collected => collected.first() && collected.first().emoji.name);
}

remote goblet
#

ah yes

#

also

prisma wave
#

I would guess it's because message is undefined

ocean quartz
#

Blame it on JS

prisma wave
#

imagine not having compile time undefined checking

ocean quartz
#

Imagine not having compile time at all

hot hull
prisma wave
#

unless you use typescript

#

then you gotta compile

hot hull
#

How do I loop through a directory?

prisma wave
#

File#listFiles

ocean quartz
#

for (files in directory) ez

hot hull
#

smh Matt

#

File being what in this case KM?

prisma wave
#

A file?

#

whatever directory you want to loop over

hot hull
#

eh what? I'm already checking if the dir exists, and if it's length is 0

prisma wave
#

listFiles can return null

hot hull
#

ah okay

ocean quartz
#

which is dumb imo

#

why not make it empty

topaz bay
#

empty would imply its an empty directory

#

it returns null when its not a directory

#

Would be great if it was a result, cause ya know...

#

BETTER

ocean quartz
#

Well then dir should be null, not the listFiles

topaz bay
#

?

#

That doesn't make much sense

#

Java doesn't have specific file and directory types

ocean quartz
#

That's fair yeah, though it'd make more sense to have a directory type

topaz bay
#

That would be kinda messy though

hot hull
#

file.getName().split(".")[0].split(";");
The [0] is throwing an NPE, the file name being -16;27.yml

prisma wave
#

you'd need an abstraction either way

topaz bay
#

its regex right?

prisma wave
#

what would listFiles() return for example? File? Directory? or an abstraction of the 2

ocean quartz
#

That is a pretty bad name for a file Frosty xD

hot hull
#

It's chunk coords Matt

topaz bay
#

@prisma wave well it would only be defined on directory?

hot hull
ocean quartz
#

And good point yeah, it'd be quite messy

topaz bay
#

@hot hull use kotlin

hot hull
#

No

prisma wave
#

wdym @topaz bay

topaz bay
#

file.nameWithoutExtension.split(';')

#

lol

onyx loom
#

@hot hull use kotlin

prisma wave
#

@hot hull use kotlin

topaz bay
#

@prisma wave list files wouldnt be abstract

prisma wave
#

peer pressure

#

flawless

#

oh I see what you mean

#

but I mean

#

what would it return

#

given that a directory can contain both files and directories

hot hull
#

So anyone got any clue as to why it's throwing an NPE?

topaz bay
#

If file and directory were implementations of some type, you would have file specific things on file, and directory specific things on directory

#

It would contain the abstract type?

ocean quartz
#

Frosty use common's getNameWithoutExtension

prisma wave
#

so you'd still need an abstraction which was my point

topaz bay
#

Well yeah?

#

I never denied that?

prisma wave
#

making a specific Directory class wouldn't achieve much as most of the time you'd just use the abstraction

#

I was mainly saying that to Matt

hot hull
#

uh what Matt

topaz bay
#

You could also just like name.substring(0, name.lastIndexOf(".")).split(";")

prisma wave
#

ew

topaz bay
#

Or in kotlin, name.substringBeforeLast(".")

prisma wave
#

😍

onyx loom
#

this is why kotlin is the greatest @hot hull

ocean quartz
#

The lib com.google.common.io.Files hsa the getNameWithoutExtension to remove the extension, then you can split by ; but Sx's solution is better

#

kotlin would be even better though

prisma wave
#

haskell is best

topaz bay
#

Its kind of crazy how our brains just file away literally hundreds of thousands of things

hot hull
onyx loom
#

y not

prisma wave
#

you are aware you can mix and match

#

right?

ocean quartz
#

You don't need to convert anything

hot hull
#

:what:

prisma wave
#

I did that back in the day to annoy Odin

#

1 class in Kotlin, everything else in java

ocean quartz
#

You can have Java classes mixed with Kotlin

hot hull
#

And like 1.5mb higher jar size ye? :p

prisma wave
#

well that's why you convert everything

ocean quartz
#

1.3 ;p

prisma wave
#

but you have the option

topaz bay
#

youre complaining about jar size when youre merging 7 plugins?

hot hull
#

:kek:

topaz bay
#

pea. brain.

prisma wave
#

aka java developers

#

:))

hot hull
#

I mean rn the size is only 600kb

#

so jokes on you

onyx loom
#

what goes on in that pea brain of yours?

prisma wave
#

+1.3mb won't hurt

onyx loom
#

imagine caring about file size

hot hull
#

Anyone got any suggestions as to how I could increase performance on this? (Well if there's anything that should be done differently)

    public void run() {
        final CollectorStorage storage = plugin.getCollectorStorage();
        new BukkitRunnable() {
            @Override
            public void run() {
                for (Chunk chunk : storage.getCollectorChunks().keySet()) {
                    final CollectorChunk collectorChunk = storage.getCollectorChunk(chunk);

                    for (Entity entity : chunk.getEntities()) {
                        if (entity instanceof Item) {
                            final ItemStack item = ((Item) entity).getItemStack();

                            if (!collectorChunk.getValidMaterials().contains(item.getType())) {
                                continue;
                            }

                            collectorChunk.addMaterial(item.getType(), item.getAmount());
                            entity.remove();
                        }
                    }
                    storage.updateCollectorChunk(chunk, collectorChunk);
                }
            }
        }.runTaskTimer(core, 1, 5);
    }
topaz bay
#

Why in gods name would you iterate over the keyset and do a lookup, instead of iterating over the entryset

hot hull
#

Anything else?

ocean quartz
onyx loom
#

very true

topaz bay
#

extremely true

hot hull
#

Sx, anything else, or is that all?

#

(also changed it to forEach, since that made more sense)

topaz bay
#

@hot hull theres nothing else I see from that single snippet

hot hull
#

Only that snippet that I need to know for :p

topaz bay
#

does chunk not have a method for getting specific entity types?

#

like world does?

#

If not, I would say to invert that instanceof check

#

because gross

hot hull
#
    public void run() {
        final CollectorStorage storage = plugin.getCollectorStorage();
        new BukkitRunnable() {
            @Override
            public void run() {
                storage.getCollectorChunks().forEach((chunk, collectorChunk) -> {
                    for (Entity entity : chunk.getEntities()) {
                        if (!(entity instanceof Item)) {
                            continue;
                        }

                        final ItemStack item = ((Item) entity).getItemStack();

                        if (!collectorChunk.getValidMaterials().contains(item.getType())) {
                            continue;
                        }

                        collectorChunk.addMaterial(item.getType(), item.getAmount());
                        entity.remove();
                    }

                    storage.updateCollectorChunk(chunk, collectorChunk);
                });
            }
        }.runTaskTimer(core, 1, 5);
    }
#

This is the refurbished one

topaz bay
#

does collectorchunk not hold a reference to it's chunk?

hot hull
#

No since that'd be meh, cause I can just get the collector from the player's chunk

topaz bay
#

@hot hull weak shit

hot hull
#

No u

errant geyser
#

What Git clients do yall use

#

Has to have a dark theme

hot hull
#

With the dark theme extension :p

onyx loom
#

DarkReader

hot hull
#

ew no

onyx loom
#

???????

errant geyser
#

I already use the Stylish dark theme for GH

topaz bay
#

gross

topaz bay
#

@prisma wave what should I add to odin?

prisma wave
#

hmm

hot hull
#

a terminate system method

topaz bay
#

ooooooooo

#

I just realized

prisma wave
#

what's the paradigms of it?

topaz bay
#

with my new collapse and expand

hot hull
#

Which wipes everything :))

topaz bay
#

I can do string interpolation

prisma wave
#

oo

#

that's good

#

make first class functions if you haven't already

topaz bay
#

is expand the antonym of collapse?

#

I feel like theres a better word for that

prisma wave
#

I don't think it's a direct antonym

#

erect perhaps

topaz bay
#

absolutely fucking not

prisma wave
#

¯_(ツ)_/¯

#

i think that's more accurate than expand though

topaz bay
#

The thing is, these words directly define whats happening

#

collapse is transforming many tokens into one

#

and expand is transforming maybe 1 or 2, into many tokens

prisma wave
#

hm

#

separate perhaps?

topaz bay
#

No

#

That implies the output is made up of the input

old wyvern
#

tokenize

#

💀

topaz bay
#

shut up yugi

tall yacht
#

Not sure where to actually ask but this will do.
I'm editing the "online members" XenForo template to change the check to see if a user is marked as a staff member to see if they inherit a secondary group instead. Purely doing this so I don't have to go and mark every staff member as a staff member and just have their ranks automatically sync. I just have no clue about the XF syntax.

The following statement checks to see if a member is a staff member. I want to change this to check if a member inherits one of the staff groups as a secondary group.

<xf:if is="$user.is_staff">```
Not sure how many XenForo users there are in here, but worth a shot. Any help would be massively appreciated!
obtuse gale
#

Hey guys i have a question, i try to block all bungeecord related commands on a specific server. And it works for everything to block commands except bungeecord commands like server command is not getting blocked. anyone know a fix

prisma wave
#

You need to process those on the bungee side

#

Spigot doesn't even know bungeecord commands exist

topaz bay
#

here we go

prisma wave
#

😬

topaz bay
#

regex is so crazy

#

simply collapsing those two groups into one

#

reduces the matcher steps, from 100+ to 36

old wyvern
topaz bay
#

@prisma wave just realized

#

I'm going to have to lex

#

each interpolation

#

individually

prisma wave
#

oh dear

#

You can just reuse the lexer though right?

topaz bay
#

The lexer and typer dont hold state

#

theyre objects

#

fucking

#

I hate this bot

#

well that was easy

#

And since its an expression in {}, stuff like that works

#

frigga could honestly fucking never

#

be real

#

come onnnnn dude

#

thats fucking HOT

onyx loom
#

👏

topaz bay
#

the expander for this is kinda

#

👀

obtuse gale
#

If anyones bored and up for a quick code review, some ways I can improve this unfinished project would be appreciated (My coding sucks lol there probably is loads) 🙂
https://github.com/Aj3douglas/AJ-Bedwars

obtuse gale
#

how?

quiet depot
#

you're creating files, registering commands, printing shit to console, in your program's entry point

#

that's a whole lot of irrelevant

obtuse gale
#

should I have like a file manager class?

quiet depot
#

yes

obtuse gale
#

How about for the commands?

quiet depot
#

gson can also be constant so keep that in mind

#

yes for commands

#

LocationUtils.from(int, int, int)

#

that pattern might not apply in kotlin, not sure, but I highly doubt a data class is the best option for what you're doing there

obtuse gale
#

Its so gson can understand it

quiet depot
#

oh

#

GsonBuilder#setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)

obtuse gale
#

lol its just temp

#

That being said I think its quite descriptive

#

Really gets your point accross

patent spoke
#

Gson 🤢

quiet depot
#

what's wrong with gson?

patent spoke
#

Well

#

it's way less understandable than Json.simple for me

#

I mean

#

Json.simple is efficient

#

By the way PiggyPiglet, are you the dev of @compact perch ?

quiet depot
#

no

#

gson is so much more than simple json parsing (which is what json-simple provides)

patent spoke
#

Hmm

quiet depot
#

gson isn't limited to just json, albeit that's it's main purpose

#

it's a fully functional object mapper, an extremely configurable one at that

patent spoke
#

I'll try it in a different way next time

#

I really would like to know what Library they used to write informations on an image

#

for the =rank command

quiet depot
#

barry is written in nodejs, he uses canvas for the images

patent spoke
#

I see, thanks for the information :o

obtuse gale
#

hows that?

patent spoke
#

I literally have the same registerListener() and setupCommands() methods

heady birch
#

4.86 ms 😮

obtuse gale
#

Main class looks neat now lol

#

😮

#

just realised I named my gson object gsonBuilder as well but shush

quiet depot
prisma wave
#

Until you fix the spacing it's trash

obtuse gale
#

I was doing plugin.fileManager.wahtever.stuff, i should probably do that stuff in my file manager class now right?

prisma wave
#

DI

obtuse gale
#

im using DI to pass my plugin instnace round

quiet depot
#

that should be the last thing you need to pass around

prisma wave
#

^

hot hull
#

Are you happy Piggy?

    private final Map<String, ConfigurationSection> sections = new HashMap<>();

    public void load(final DistrictCore core) {
        final FileConfiguration config = core.getConfig();

        for (String sectionString : config.getDefaultSection().getKeys(false)) {
            if (sectionString.equalsIgnoreCase("messages")) continue;

            sections.put(sectionString, config.getConfigurationSection(sectionString));
        }
    }

    public ConfigurationSection getSection(final String key) {
        return sections.get(key);
    }
prisma wave
#

Pass whatever you need around, rather than coupling with the plugin

obtuse gale
#

why?

prisma wave
#

Injecting your plugin creates tight coupling

quiet depot
#

the only time you ever need an instance of your main, is for bukkit functions that specifically ask for it. That's basically just the scheduler

obtuse gale
#

ah

#

alright

#

I was doing plugin.fileManager.wahtever.stuff, i should probably do that stuff in my file manager class now right?

quiet depot
#

if you're using your main for anything else, there's a 99% chance you're violating srp

#

yes aj

#

there should be no plugin prefix

#

fileManager.whatever.stuff

#

not plugin.fileManager.whatever.stuff

obtuse gale
#

yeah but like

hot hull
#

So Piggy, good enough or?

obtuse gale
#

I was doing this in my generators class, i should probably move this method to the file manager

quiet depot
#

@hot hull no, I think you've completely missed the point

hot hull
#

Why?

prisma wave
#

I would have that function take a JSON string

#

Rather than caring where the JSON is coming from

quiet depot
#

and consider making that type a constant, so it doesn't have to use reflection every time

prisma wave
#

And fix the ugly spacing

#

It's ugly

quiet depot
#

are you referring to the () {}?

#

@hot hull what are you trying to achieve here?

prisma wave
#

Mostly the lack of a space after a :

quiet depot
#

there is a space after it

prisma wave
#

In the function signature I mean

quiet depot
#

oh we're looking at different colons

prisma wave
#

Yeah

trim hare
#

couple of proctologists here?

hot hull
#

Piggy, remove all accessing of config during runtime

obtuse gale
#

So if i wanna use like saveResource() in my manager class I would still pass through the main class right??

prisma wave
#

Yes and no

#

Iirc saveResource is protected

#

So you'll either have to do it in your main class, or copy it manually (it's a 1 liner in kotlin)

obtuse gale
#

wait what?

prisma wave
#

Nvm

obtuse gale
#

just pass my main through?

prisma wave
#

have your file manager take a JavaPlugin I'd say

#

Sounds a bit petty but you never know

obtuse gale
#

why javaplugin specifically

prisma wave
#

Reusability

quiet depot
#

lsp

prisma wave
#

^

hot hull
#

Internet service provider?

quiet depot
#

liskov subtitution principle

#

Piggy, remove all accessing of config during runtime
@hot hull ah ok

hot hull
#

ew why you use lower capital L then

quiet depot
#

consider doing object mapping instead

prisma wave
#

Was Liskov a person?

quiet depot
#

yes

prisma wave
#

Huh

quiet depot
#

"robert" comes to my mind, but that's the guy who compiled the principles, not necessarily authored LSP in particular

prisma wave
#

the first person to get annoyed at public HashMap<Player, Int> myMap = ew HashMap<>();

quiet depot
prisma wave
#

Huh

hot hull
#

1987 kek

quiet depot
prisma wave
#

Older than I imagined

quiet depot
#

older than java

#

2 years after c++, perhaps there's a correlation there

prisma wave
#

Probably

#

I'm completely guessing but I imagine that's when higher level typed coding really started to kick off

quiet depot
#

perhaps

trim hare
#

I think pascal predated that

#

C was early 80s too, wasn't it?

quiet depot
#

neither of those are oo languages

#

unless you're referring to brister's statement

trim hare
#

That's true, since we're talking about subtypes

hot hull
#

Piggy, that's effort

quiet depot
#

it's actually not

prisma wave
#

Yeah things like inheritance would probably not come up much in C or Pascal

#

Idk

hot hull
#

Would there be a benefit?

quiet depot
#

only superficially

#

ie cleanliness

hot hull
#

I mean this is fairly clean

quiet depot
#

not imo

heady birch
#

I wanna know why the Enginehub repo has the whole of JideSoft on it

#

I dont think the license permits that..

hot hull
quiet depot
#

jidesoft?

heady birch
#

I aint complaining

hot hull
#

Reloading the plugin should be done async ye?

quiet depot
#

as async as possible

hot hull
#

reloading a config?

quiet depot
#

async

hot hull
#

remapping a map?

quiet depot
#

async

#

just make sure to think it through so you don't get concurrent exceptions

hot hull
#

In theory there shouldn't be any

prisma wave
#

Better safe than sorry

hot hull
#

true true

prisma wave
#

The synchronization overhead is pretty small

heady birch
#

How do you setup a simple maven repo?

quiet depot
#

no such thing

prisma wave
#

I use Nexus

quiet depot
#

maven repos are generally complicated

#

but yeah I use nexus too

heady birch
#

Kind of just looks like a web server

quiet depot
#

it uses tomcat iirc

trim hare
#

I got tired of bothering with nexus, so I'm trying something called CloudRepo.io

#

It's free if you're hosting open source projects

quiet depot
#

avoid jitpack at all costs

#

ah ok

#

@heady birch it uses jetty

prisma wave
#

Jitpack isn't that bad

quiet depot
#

it's aweful

prisma wave
#

Just the dependency declarations are ugly

quiet depot
#

for my sanity, just don't use it

#

don't use github packages either, it's flawed

trim hare
#

yeah I tried that, it's pretty convoluted

quiet depot
#

it's actually hilarious

prisma wave
#

Yeah I don't like actions or packages

#

It seems really overcomplicated

heady birch
#

😫

quiet depot
#

how a company completed devoted to open source, could mess up something like that so badly

prisma wave
#

I guess they were trying to make it language agnostic

#

and ended up overcomplicating everything

quiet depot
#

idk about that

#

my problem with it is that it requires authentication

#

you can't access a github package publicly

#

which is a terrible idea

trim hare
#

hrm?

#

you just need an account to access a public package

quiet depot
#

exactly

#

no other repository requires that

prisma wave
#

Oh yeah that's stupid too

heady birch
#

Now lets see if this works

quiet depot
#

account's make sense for private projects

#

for public though? it's not just a hassle, it's literally not worth it

trim hare
#

Strange that you don't need an account to clone a repo, but they didn't do something similar with packages

prisma wave
#

Blame Microsoft

quiet depot
#

microsoft has no influence on that

#

I believe it was just a major oversight on their behalf, perhaps their team is a bit out touch with how things work

prisma wave
#

Idk... Actions come about shortly after Microsoft purchase GitHub. Coincidence?

quiet depot
#

no, it was most certainly funded by microsoft, suggested by microsoft, but the final implementation was entirely up to the github team

trim hare
#

Probably just based off their own integrations and tools they were already using?

quiet depot
#

perhaps

prisma wave
#

The conspiracy theorist in me says that they intentionally made it bad to sell more Azure machines

heady birch
#

🙁

prisma wave
#

2002 lookin logo

quiet depot
#

is there an alternative to jide niall?

heady birch
#

InfoNode

#

They have GPL version

#

So do JIDE but you have to email them

hot hull
#

I'm confused, for some reason my messages keyword got replaced with configurations

#

:what:

heady birch
#

I never did cos I assumed their company died like 10 years ago

#

But they are still posting updates

#

But yeah- each product is about 200$

hot hull
heady birch
#

Good

#

But I dont like plural package names

quiet depot
#

i'd give it an eh out of meh

heady birch
#

commands and config maybe in a common module

hot hull
#

Niall, it's the plugins name

heady birch
#

Oh I see

#

but command and patch

hot hull
#

Otherwise it wouldn't be plural

quiet depot
#

I believe plural is better there

hot hull
#

This is the package naming inside the actual plugin

heady birch
#

Ok

#

Oh yeah Piggy did you see what I made?

hot hull
#

Now I wanna make a system which allows me to register the command within it's own class

#

But not sure how I'd approach that

heady birch
#

why should a command register itself

hot hull
#

Maybe it shouldn't

errant geyser
#

Remember when I tried to do that for Events and got shat on for SOLID

#

Probably shouldn't try it

heady birch
#

NiallLIB

errant geyser
#

How long have you been working on that?

heady birch
#

I havnt started yet

hot hull
#

:kek:

quiet depot
#

@hot hull it's super ez

hot hull
#

See but is it smart tho?

quiet depot
#

yes

#

well

#

registering itself, no

#

but automatic registering, yes

errant geyser
#

👀

hot hull
#

Can I get a verbal example of how I should approach it?

quiet depot
#

most people use classpath scanning, which involves molesting the classloader to see what classes it has cached, iterating through them, and finding ones that smell nice

#

however that's quite yucky

#

I use a more legal way

hot hull
quiet depot
#

which is essentially just recursing through the jar (look into a jarinputstream/zipinputstream), getting all the files in a particular package, and loading them through the classloader

prisma wave
#

"molesting the classloader" 👀

hot hull
#

Okay yea not trynna use classpathscanning

quiet depot
#

cool, so use my method

#

it's actually really simple

hot hull
#

seems like effort

quiet depot
#

it's not lol

hot hull
#

Any benefits, or just "easier" registration

quiet depot
#

idk inflated ego ig

hot hull
#

kek

heady birch
#
N<String> string = new N<>("Hello");

        Friends<String, String> friends = string.friend(new N<>("Friend"));

        System.out.println(friends.getone());     System.out.println(friends.getSecond());
#

NiallLib

#

Replacement for Pair<>

quiet depot
#

uh

#

why not just use Either

#

it's bundled in spigot

#

just add the datafixerupper dep

heady birch
#

You dont think im serious 😄 ?

#

Might upload it to spigot just to see who uses it

prisma wave
#

Add kotlin support and I'll use it

heady birch
#

Can you guys help me make a decision

prisma wave
#

Absolutely

obtuse gale
#

not

heady birch
#

So I got my animations stuff

prisma wave
#

D:

heady birch
#

Used in kiteboard, papi expansion, and holographic extension

#

It would make sense to make it a seperate project and import it into maven on all three right?

quiet depot
#

you already asked this

#

and I said yes

heady birch
#

Oh.

#

Did you hear my other idea as well?

quiet depot
#

no

#

regarding the plugintwo, pluginone thing

heady birch
#

Yeah

quiet depot
#

I don't know what's so special about it

heady birch
#

Each plugin has the animations shaded in

quiet depot
#

oh and it automatically detects that another plugin has it?

heady birch
#

Yeah

#

So they can all integrate if you kind of see what I mean

hot hull
#

Piggy btw, currently I've got this which I implement in every plugin, how can I make it so that both methods aren't required since some plugins don't use a onDisable

public interface CorePlugin {

    void onEnable();
    void onDisable();
}
heady birch
#

abstract

quiet depot
#

default void onDisable() {}

heady birch
#

🙄

hot hull
#

Danke

quiet depot
#

@heady birch interface, abstract, they're not really a replacement for each other

#

very different uses

heady birch
#

I guess

#

Who knows how I can quickly query thousands of shapes in a geospatial context within a certain area

#

Spatial index?

dusky drum
#

anyone here ever worked with jfrog?

heady birch
#

...funny you mention that

dusky drum
#

why,

heady birch
#

I was just looking at Artifactory, but no I havnt worked with it

dusky drum
#

eh i just always get: Bad credentials

#

for no reason.

hot hull
#

Then change them to the right ones <o/

dusky drum
#

i did.

obtuse gale
#

Hows this lol?

topaz bay
#

@obtuse gale not good

#

There needs to be spaces around this

#

This has 0 ordering logic

#

You usually want to separate public and non public declarations

#

And then sort the order by at least something

#

maybe lexicographic, maybe name length

#

This entire class has no use

#

And in a general sense, util classes should not hold state

obtuse gale
#

wdym

topaz bay
#

This is kotlin

obtuse gale
#

great observation

topaz bay
#

?

obtuse gale
#

this is kotlin

topaz bay
#

So whyd you ask "wdym"?

obtuse gale
#

And in a general sense, util classes should not hold state

#

no clue what that means

topaz bay
#

:/

#

You have a pubic, mutable value holograms

hot hull
#

oi, fancy message

obtuse gale
#

o

#

well I wanna check if holograms is enabled lol

topaz bay
#

You dont do that by holding state in a util class

#

A util class that shouldnt even exist

obtuse gale
#

where should i put said variable hten lol

topaz bay
#

Why do you need a variable for this?

obtuse gale
#

That....

#

IS a great question

topaz bay
#

noooooooo

#

dataFolder.resolve("teams.json")

#

etc.. etc..

#

Not only that though, when youre working with parent files, you can use the file constructor that takes the parent

#

File(dataFolder, "teams.json")