#dev-general

1 messages ยท Page 100 of 1

topaz bay
#

if its a new instance

obtuse gale
#

lol

heady birch
#

Laughs in static

hot hull
#

@topaz bay you mentioned modules, got any usefull threads which would be relevant to my case?

topaz bay
#

@heady birch no.

#

@hot hull not really

heady birch
#

Frosty what you trying to do

hot hull
#

Scroll up

heady birch
#

Oh i see

hot hull
#

So, can ya help me?

topaz bay
#

I dont understand what you need help with

hot hull
#

You can't expect me to know how to properly make modules, without ever reading/messing around with them..

obtuse gale
#

wtf my code actually works

hot hull
heady birch
#

I dont liek the 'core' idea

obtuse gale
#

what is this magic

hot hull
#

Elaborate Niall

heady birch
#

All plugins in one

#

If it was extensions to a plugin I can see that

hot hull
#

What would be so wrong with having it all in one?

topaz bay
#

Literally nothing

#

If its spaghetti code, thats an issue

#

Heavy modularization and proper design fixes that though

#

And no

#

Not at all

#

That is not what I mean when I say modules

hot hull
#

Can you explain it to me then :p

hot hull
#

Do you mean

main:
  MainClass
  tokens-module
  tools-module
#

Or what?

topaz bay
#

module
each of a set of standardized parts or independent units that can be used to construct a more complex structure, such as an item of furniture or a building.

#

Yes, but maybe even deeper than that

hot hull
#

Deeper how?

topaz bay
#

I dont know exactly what youre combining, so I can't answer that

#

You would want to take apart these plugins, and define common logic

#

Encapsulate those into modules, and compose them into the implementation of those plugins

obtuse gale
#

What's the replacement for this engine

jovial warren
#

GraalVM was suggested as a replacement

#

what does Nashorn do though?

topaz bay
#

its a javascript engine

jovial warren
#

doesn't Kotlin do a good job of that?

topaz bay
#

?

jovial warren
#

or is Kotlin/JS a completely different thing to Nashorn

topaz bay
#

Not even close

jovial warren
#

anyway, oracle suggested GraalVM as a replacement

topaz bay
#

No

#

There are open source alternatives to the nashorn engine

#

Like Rhino

#

maintained my mozilla

jovial warren
#

yeah true

heady birch
#

Whenever I post a commision no one want to do it ๐Ÿ˜ฆ

jovial warren
#

what?

topaz bay
#

@heady birch cause you like swing

jovial warren
#

commission?

#

what kind of commission?

heady birch
#

some graphics2d

jovial warren
#

tf is that?

obtuse gale
jovial warren
heady birch
#

yeah

jovial warren
#

AWT?

#

from what I've heard AWT is obsolete by now

#

yeah it's been replaced with Swing

heady birch
#

or I just need a way to shrink a rectangle at origin OX, OY, by scale S

jovial warren
#

so you want to shrink a rectangle while maintaining its aspect ratio

#

basically shrink it by a scale factor rather than by making the points smaller manually

#

it's a custom method

#
public static Rectangle scaleRectangle(Rectangle rect, float scaleFactor) {
    return new Rectangle(Math.round(rect.x * scaleFactor),
            Math.round(rect.y * scaleFactor), Math.round(rect.width
                    * scaleFactor), Math.round(rect.height
                    * scaleFactor));
}

is the actual code there

#
fun Rectangle.scale(scaleFactor: Double) = Rectangle(math.round(this.x * scaleFactor), math.round(this.y * scaleFactor), math.round(this.width * scaleFactor), math.round(this.height * scaleFactor));

or something similar to that in Kotlin

#

though obviously you could definitely make that look better than that

#

I'm sure sx could definitely make that method better

old wyvern
jovial warren
#

not sure that's what he's after Yugi

old wyvern
#

wdym?

#

Thats generally how you scale whats rendered

#

you could scale back to 1 after drawing the rectangle if thats what you mean

jovial warren
#

ยฏ_(ใƒ„)_/ยฏ

heady birch
#

well

#

I abstracted it down.. alot

old wyvern
#

thats fine

#

scale down before drawing the rectancle

heady birch
#

the problem

old wyvern
#

then scale it back to normal

heady birch
#

Im not drawing

hot hull
old wyvern
#

Explain?

heady birch
#

Im passing a "Viewport" to a external renderer that renders a map

#

I need to scale that viewport to zoom in/out

jovial warren
#

@hot hull you have any context for that?

heady birch
#

And move it when panning

old wyvern
#

Am I on the right track?
@hot hull
Shouldnt the core be a module?

hot hull
#

I've legit no idea

old wyvern
#

Let me confirm

hot hull
#

I'm trying to follow Sx's instructions but it's hard since noone actually wants to link me to a thread which would explain it, and everything I've found on YT is just a yikes

jovial warren
#

what you trying to create?

#

multiple modules within one project?

hot hull
#

A "core" plugin, which has multiple plugins inside it

jovial warren
#

okay

hot hull
#

I have 5 custom plugins, which I'd like to combine into 1

jovial warren
#

so create different modules

old wyvern
#

I think core should be module at the same level as the others. Not completely sure tho. Go through a few random repos

jovial warren
#

name the modules either modulename or parentname-modulename

#

in lower case

#

each module has its own pom.xml with its own dependencies

old wyvern
hot hull
#

I'll deal with the naming later, I'm asking about the structure firstl

#

y

jovial warren
#

each child depends on the parent

hot hull
#

So the parent being Core?

jovial warren
#

the parent is the project

#

the children are the modules

hot hull
#

yea so the current structure is correct

old wyvern
#

parent should be used for the pom

jovial warren
#

each child has its own pom yugi

old wyvern
#

yes

#

but

#

the common ones

#

go in the parent

jovial warren
#

only common dependencies across multiple modules should be in the parent

old wyvern
#

What i mean is

#

Hes trying to make the core in the parent

jovial warren
#

you shouldn't actually need any code in the parent module tbh

hot hull
#

Yea which would have the spigot repo, etc right?

old wyvern
#

Yes

jovial warren
#

take a look at the structure there

#

that might give you an idea

old wyvern
#

Also watchout for cyclic dependencies

jovial warren
#

isn't that where say 1 depends on 2, and then 2 also depends on 1 Yugi?

old wyvern
#

yes

hot hull
#

wait, meaning I can just import the projects as the modules, and it should be correct right? (after fixing up the poms ofc)

jovial warren
#

which creates a circle

old wyvern
#

Yes

jovial warren
#

might work yeah

hot hull
#

sec lemme import all the plugins, and I'll let you know when I've done that

old wyvern
#

You would need a central JavaPlugin class tho

jovial warren
#

all of your project and module names should be lower case by the way

old wyvern
#

as in your main class

jovial warren
#

no?

old wyvern
#

wdym?

jovial warren
#

your artifact ids should all be lower case

old wyvern
#

No

jovial warren
#

yes

old wyvern
#

thats nto what I mean

jovial warren
#

that's what I mean

old wyvern
#

read my previous message ffs

#

I wasnt continueing you?

jovial warren
#

You would need a central JavaPlugin class tho
this one?

old wyvern
#

Yes

jovial warren
#

ah okay

old wyvern
#

obviously

jovial warren
#

got a bit confused lol

old wyvern
#

lol

#

welp

#

anyway cya later. I have to submit a phaser project in a bit ๐Ÿ’€

jovial warren
#

I'd suggest having them as separate projects and then depending on them in the main project if you want them as one

frigid badge
#

pls put <> around the link

hot hull
#

Don't bully lemmo

jovial warren
#

I'd suggest having them as separate projects and then depending on them in the main project if you want them as one
^^^^

frigid badge
#

but yes there can be code in the common module

#

it's better to make it abstract

#

have the least amount of code platform dependent

jovial warren
#

modules are for separating different aspects of the same project

old wyvern
#

Hes combining 5 different plugins so im not sure if he'll have anything common

hot hull
#

^

frigid badge
#

surely he will

old wyvern
#

Why are you doing this btw?

hot hull
#

Some plugins depend on each other btw, so idk if that's something to consider

obtuse gale
hot hull
#

Yugi, better to have it combined than having a shit ton of jars

topaz bay
#

hot

old wyvern
#

lol ok

hot hull
#

no u Sx

frigid badge
#

that's not really true @hot hull

hot hull
#

In the end it doesn't really matter if they're together does it

#

So let's say for neatness sake

topaz bay
#

I mean...

frigid badge
#

for neatness I'd seperate them in all honesty

topaz bay
#

Its kinda hot

frigid badge
#

but doesn't matter much

hot hull
#

Lemmo, I was instructed to combine them, so that's not an option :p

frigid badge
#

weird people

hot hull
#

I mean considering all the plugins will be custom, it kinda makes sense that they're all combined in a core, atleast for me GWcmeisterPeepoShrug

onyx loom
#

well i mean its a core for a reason

jovial warren
#

for neatness I'd seperate them in all honesty
I second

hot hull
#

You second a lot of things Bardy

jovial warren
#

I second things that make sense

frigid badge
#

I mean the whole 'core' thing is absolute bullshit anyway

#

it only makes it a lot harder

jovial warren
#

in this instance, for what you are creating, it makes sense to do it that way

frigid badge
#

if you can seperate things it's so much more organised

jovial warren
#

if you can seperate things it's so much more organised
^^^^

topaz bay
#

Thats not entirely true

hot hull
#

That's why I'm here asking how I should properly seperate them

topaz bay
#

It highly depends on how you structure your code

frigid badge
#

not talking purely code though

hot hull
#

To still have them organised, but have them in a single jar file

onyx loom
#

if ur only combining a few plugins then i dont see the fuss

frigid badge
#

for the end server owner it's still so much easier

#

imo

jovial warren
#

just have the core depend on all the other plugins?

old wyvern
#

Are css rotations supposed to be in the first 2 quadrants only?

hot hull
#

Okay so let's start from scratch, and you're gonna tell me what approach you'd take (not combining them isn't an option)

I have 5 plugins (rn)

- Tokens
- Tools
- Ceggs
- Upgradables
- Elixirs
frigid badge
#

I wouldn't take a commission ๐Ÿ˜‰

#

xD

hot hull
#

You're a 4head

frigid badge
#

nah but I mean it's a commission who cares you are getting underpaid anyway

jovial warren
#

okay, if I wanted them to be all as one, I'd put them all in the same project

onyx loom
frigid badge
#

that's what they want that's what they get

#

let em find out themselves what they prefer

hot hull
#

I'm actually choosing myself to get underpaid here btw

jovial warren
#

I'd just combine them in to the same project, unless it's something like a plugin with both bukkit and bungee support there really isn't a need to separate them in to separate modules

hot hull
#

Bardy I mean yea, but how would I seperate the different plugins within it?

#

surely not with packages since that would get messy

jovial warren
#

simple answer is: you don't need to

#

just use packages

#

it means you can have all the commands in one place, all the listeners in one place, you get one main class, and you just put everything else in separate packages

hot hull
#

That's messy if it's combined like that tho

#

I still wan't to have the different aspects seperated

jovial warren
#

you can't have 5 main classes in one JAR

hot hull
#

I get that..

#

The main class would just call each plugins enable shit

old wyvern
#

phaser is drunk, im getting -180 after 180. Im taking a break

hot hull
#

You get what I mean Bardy?

jovial warren
#

yeah ik what you mean

#

I'd suggest just having one configuration, one messages, etc. and one main class for the whole project

#

one plugin.yml

#

and different packages for where you have different things

heady birch
#
DirectPosition2D newPos = new DirectPosition2D(baseImageOrigin.getX(), baseImageOrigin.getY());
        this.mapContent.getViewport().getScreenToWorld().transform(newPos, newPos);
ReferencedEnvelope env = new ReferencedEnvelope(this.mapContent.getViewport().getBounds());
env.translate(env.getMinimum(0) - newPos.x, env.getMaximum(1) - newPos.y);

viewport.setBounds(env);
``` ๐Ÿ˜•
jovial warren
#

it's hard to explain what exactly I mean the way I mean it

hot hull
#

That'd be messy af tho, wouldn't it make more sense to seperate them into folders and have seperate configs?

onyx loom
#

^

jovial warren
#

you could always do it the way essentials does it

hot hull
#

As in

Core-folder:
  Tokens-folder
    - config.yml
    - tokens.yml
  Tools-folder
    - config.yml
jovial warren
#

just structure your config to separate modules plugins

heady birch
#

or seperate plugins

#

and ServicesManager

hot hull
#

So back to the way I had it at the start? ๐Ÿ˜„

jovial warren
#

idk how you had it at the start

frigid badge
#

I mean you want everything organised

#

and the best way to do so is to have them be actual seperate plugins

#

so tell them

#

that it should be seperated

#

to be a lot more organised etc

#

or just say fuck it

#

and just do it

#

like don't care about it

jovial warren
#
com.mydomain.projectname
โ”” commands -> has commands in it
  โ”œ MyCommand
  โ”” MyOtherCommand
โ”” listeners -> has listeners in it
  โ”œ MyListener
  โ”” MyOtherListener
โ”” tokens or whatever
  โ”” TokenStuff
โ”” MainClass

?

hot hull
#

You know what, I'll experiment for a couple of hours with a test plugin, and just see what I like

#

Probs the best solution

jovial warren
#

does my tree make it any easier?

hot hull
#

I'd still want to keep the command etc plugin seperated, but yea sorta

jovial warren
#

yeah I think that's gonna be your best option tbh

heady birch
#
Rectangle paneArea = ((JComponent)this.getMapPane()).getVisibleRect();
        DirectPosition2D mapPos = ev.getWorldPos();
        double scale = this.getMapPane().getWorldToScreenTransform().getScaleX();
        double newScale = scale / this.zoom;
        DirectPosition2D corner = new DirectPosition2D(mapPos.getX() - 0.5D * paneArea.getWidth() / newScale, mapPos.getY() + 0.5D * paneArea.getHeight() / newScale);
        Envelope2D newMapArea = new Envelope2D();
        newMapArea.setFrameFromCenter(mapPos, corner);
        this.getMapPane().setDisplayArea(newMapArea);
#

Odd way to scale

old wyvern
#

You could make it run as separate plugins running from the same jar, but its probably not the solution you need xD @hot hull

topaz bay
#

There is like...

#

0 reason to use the D asserter on those

#

Without an assertion there, it defaults to double

jovial warren
#

^^^^

heady birch
#

0 reason to use the D asserter on those
@topaz bay Its decompiled

jovial warren
#

why are you using decompiled code?

topaz bay
#

gross

heady birch
#

Figuring out how they scale the viewport

hot hull
#

@old wyvern Could be

#

Since that would allow me easy access to plugin specific configs

#

Without adding custom shit

jovial warren
#

@heady birch if it ain't open-source, you ain't supposed to use the code

heady birch
#

Im basically converting a Zoom in/out button to a scroll wheel, that scales a buffered image, then re-renders the map

#

It is open sourced

jovial warren
#

well then Download Sources and Documentation?

heady birch
#

Meh I just control-b for these few classes

jovial warren
#

you should always Download Sources and Documentation

#

or at least, Download Documentation

heady birch
#
Rectangle paneArea = getMapPane().getVisibleRect();

            double scale = getMapPane().getWorldToScreenTransform().getScaleX();
            double newScale = scale * zoom;

            DirectPosition2D corner =
                    new DirectPosition2D(
                            startDragPos.getX() - 0.5d * paneArea.width / newScale,
                            startDragPos.getY() + 0.5d * paneArea.height / newScale);

            Envelope2D newMapArea = new Envelope2D();
            newMapArea.setFrameFromCenter(startDragPos, corner);
            getMapPane().setDisplayArea(newMapArea);
hot hull
#

What's that supposed to indicate Yugi?

jovial warren
#

he thinks you should just have the core load all the plugins separately

#

I think

hot hull
#

So I should make an abstract class, which has an onEnable and onDisable methods, and extend that within my plugin classes, or am I missunderstading this?

jovial warren
#

that JavaPluginLoader just loads other plugins' main classes I think, so I think he wants you to just make the core's main class load all of the other plugins

#

@old wyvern please confirm

heady birch
#

I give up for now lol

#

Ill use my own system

topaz bay
#

ez

heady birch
#

jackson

#

is really good for json operations

old wyvern
#

@hot hull
You can probably create an instance of your main class that extends JavaPlugin and use JavaPlugin#init (its package private so youll need reflection) and then call enablePlugin with that instance. Havent really tried this so you might need to do some testing, I think should work.

hot hull
#

I've played around a tad and I've got this, but I don't think this is what I want since it'll build them into seperate jars

topaz bay
#

jackson sucks

#

fuck jackson

obtuse gale
#

wtf is that aspect ratio tho

topaz bay
#

@hot hull dont use maven

hot hull
#

Sx, I'll switch to gradle once I figure out how the fuck I'm supposed to make this, does legit noone else do this since there's no docs on this like anywhere?

heady birch
#

do not be mean, thank you

old wyvern
#

Whats wrong frost?

prisma wave
#

Jackson sucks

hot hull
#

Still completelly lost lmao

old wyvern
#

What exactly are you havign an issue with rn?

heady birch
#

Why

jovial warren
#

I find jackson works quite well with retrofit

prisma wave
#

Slow

heady birch
#

Jackson extremely fast..

#

For me..

old wyvern
#

Jackson is faster than gson right?

heady birch
#

YES

prisma wave
#

Jackson is the slowest JSON library by a lot last I checked

heady birch
#

If you use the streaming api I assume

#

Jackson is the slowest JSON library by a lot last I checked
@prisma wave Hmm

old wyvern
#

huh

heady birch
#

It was the fastest for me (streaming api)

jovial warren
#

Gson is the slowest at deserializing JSONs by the first google result

#

just from that image you can see that Gson is by far the slowest

prisma wave
#

This is in an Android context but still

jovial warren
#

that's probably serialization

heady birch
#

Lol

topaz bay
#

ahhhhh

prisma wave
#

It's deserialization

topaz bay
#

source?

heady birch
#

Thats probably Deserializations a second or something

prisma wave
heady birch
#

So- jackson wins ๐Ÿ˜„

prisma wave
#

It's a microbenchmark so not entirely reliable

#

But still

heady birch
#

Poor

#

I stil think jacksons streaming api beats all the others

jovial warren
#

you'd've thought as Gson is maintained by google that it would actually be really good at what it does

old wyvern
#

It is good

#

Its simple

topaz bay
#

maintained by google is not something you want to be known for

#

Google creates and destroys projects all the fucking time

jovial warren
#

Angular is maintained by google and that's a very well-designed and high-performance frontend web framework

topaz bay
#

and?

jovial warren
#

you would've thought a massive company like Google would keep up the same standards in most of their projects at least

#

like I heard Go was made by Google as well, and apparently that's a decent language as well

remote goblet
#

that's where you'd be wrong

jovial warren
#

guess you learn something new every day then

topaz bay
#

The quality of the products is not in question

#

Its the longevity

#

Like I said

Google creates and destroys projects all the fucking time

prisma wave
#

Go is a good language

#

But not everything Google makes is spectacular

#

With that said I think gson is pretty good overall

jovial warren
#

I saw from that test that kotlinx.serialization is actually the fastest out of those

#

is it just me or does Kotlin seem to do just about everything right

hot hull
#

Ah well, I guess I'm just gonna use packages for this

jovial warren
#

๐Ÿ‘

hot hull
#

Gonna try and make it as clean as possible, but I've got a slight feeling it might get messy

heady birch
#

Ok guys this is hard

#

I built my own kind of hacky map viewer

#

It's alright but I re-invent the wheel

#

GeoTools exists and it does alot of stuff I already do

#

Shapefile's, map rendering e.g

hot hull
#

@old wyvern Could I just make my main class abstract, and then just extend it within my plugin main classes?

heady birch
#

Only thing is the UI is early 2000s pretty wack

prisma wave
#

kotlinx.serialization is the fastest because it doesn't use reflection

#

Which has positives and negatives

heady birch
#

It has tool bar style Zoom in/out via click

prisma wave
#

it's much more explicit than gson is

heady birch
#

I want to convert it to mouse wheel nicely

#

But its proving pretty difficult and Im sad

old wyvern
#

@Yugi Could I just make my main class abstract, and then just extend it within my plugin main classes?Why?

hot hull
#

I'm gonna try and go with seperating them into packages

#

Since I'm to dumb to understand what y'all mean

old wyvern
#

Did you try loading each of the plugins separately ?

hot hull
#

No, I've no idea what you mean by that, I've tried looking at the thing you sent me, but I don't get it

old wyvern
#

Well what I mean is that JavaPlugin has a init(args...) function

#

It takes in the plugin description...ect

#

init(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader)

#

You can create each instance of your 5 plugins and call init on them to setup the properties and then just pass it to the enablePlugin

topaz bay
#

NO.

#

Absolutely fucking not.

old wyvern
#

oh?

topaz bay
#

Do not do that

old wyvern
#

Anything wrong?

topaz bay
#

bukkit's plugin management system is already a fucking mess.

#

Do not play around with it

old wyvern
#

I mean that would be the easiest way to go about

topaz bay
#

You also literally cannot do that

old wyvern
#

Wdym?

topaz bay
#

bukkit doesn't allow you to create new instances of plugins on your plugin's classpath

heady birch
#

๐Ÿฅบ

old wyvern
#

I see

jovial warren
#

yeah playing around with Bukkit's plugin management system is probably definitely a bad idea

hot hull
ocean quartz
#

What are you trying to do Frosty?

hot hull
#

Ayy third time explaining this :p,

Combining 5 custom plugins into a single jar

ocean quartz
#

sorry just woke up
That should technically work I think
Don't forget the onLoad

hot hull
#

Not sure which methods I should even have in onLoad

obtuse gale
#

hi guys

#

how do i send photos herE?

ocean quartz
#

?imgur

compact perchBOT
#
FAQ Answer:

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

obtuse gale
#

alright

#

so is it possible to make a thing that allows users to type in PSC code and let me accept or deny it?

#

i can pay

hot hull
#

Isn't there an expansion for that?

#

It worked Matt :oshit:

obtuse gale
#

idk

#

they allow for js

onyx loom
#

NIALL

#

swing time

#

@heady birch

heady birch
#

You wanna use swing?

onyx loom
#

LETS GO

old wyvern
jovial warren
#

lol

onyx loom
#

๐Ÿ˜„

heady birch
#

๐Ÿ˜ฆ

jovial warren
#

gtk

#

free and open-source

#

also cross-platform

#

GTK was what GIMP was built in

old wyvern
jovial warren
#

get out

onyx loom
#

๐Ÿ˜„

#

good meme

old wyvern
heady birch
#

Jtk looks good but its not java

jovial warren
#

why would you write a desktop application in Java

onyx loom
#

who said i was making a massive app thats gonna make me millions shrug_animated

jovial warren
#

okay

#

but Java applications generally aren't exactly the fastest loading or most responsive

heady birch
#

๐Ÿฅบ

#

Because they are built badly

jovial warren
#

true

old wyvern
#

Well JVM needs to warm up before its fast welp

jovial warren
#

also true

topaz bay
#

The fact that I have to do this pisses me off

heady birch
#

Probably a design flaw somewhere

#

Maybe you should rewrite the whole thing?

#

Or think about it for 3 months

topaz bay
#

@heady birch thats already happening

#

just not in java

errant geyser
topaz bay
#

very

heady birch
#

I had a look at a couple

#

Not too shabby

#

Just keep up on naming conventions

#

And keep brackets/spacing consistent

errant geyser
#

Thanks Niall

onyx loom
heady birch
#

Nice

onyx loom
#

why is it so slow

#

with the black shit

heady birch
#

idk

onyx loom
#

lol swing bad

#

or java thonking

topaz bay
#

why are you using swing

#

in 2020

onyx loom
#

SHUT UP

#

niall and bm recommended it

topaz bay
#

Its a fucking stupid decision to make

#

Yeah, and theyre both idiots

onyx loom
#

THANKS ๐Ÿ˜

#

did u recommend javafx instead

topaz bay
#

Java recommends Javafx instead

#

Thats why they replaced swing with it

onyx loom
#

@heady birch @prisma wave fuckin idiots

#

๐Ÿ˜ 

heady birch
#

๐Ÿ™

prisma wave
#

whoops

#

i always get the 2 confused

#

i knew 1 was good and 1 was bad

heady birch
#

JavaFx is good as well

#

Just know you cant have the Motif theme

topaz bay
#

You can have literally whatever tf you want with javafx

#

You can style with css

onyx loom
#

๐Ÿ˜ฎ

#

im switchin

#

f u niall

heady birch
#

๐Ÿ˜•

onyx loom
#

im never trusting u again

heady birch
#

Have fun

#

Shading in Javafx

onyx loom
#

๐Ÿ˜„

heady birch
#

have fun making a seperate app for each individual operating system and processor architecture

#

jokes

#

multi platform

topaz bay
#

Imagine attempting to defend legacy software

heady birch
#

I just like the swing metal feel and snappyness

topaz bay
#

What in the hell are you talking about

heady birch
#

Metal look and feel?

onyx loom
#

SNAPPYNESS?

heady birch
#

Uh

onyx loom
#

thats a real good smooth feeling

heady birch
#

you have to put

topaz bay
#

....

#

Why would you willingly use that ugly shit!?!?!?

#

What is going on in your brain?

heady birch
#

Swing.setProperty(KEY_SMOOTH_WINDOW_RESIZING, VALUE_SMOOTH_WINDOW_RESIZING_ENABLED);

onyx loom
#

๐Ÿคข

heady birch
#

Lmao im joking

onyx loom
#

NO TY

heady birch
#

I use swing for its faster graphics2d rendering

topaz bay
#

That doesnt make sense

heady birch
#

๐Ÿ˜•

#

Just stop bullying me okay?

topaz bay
#

No

#

This is how you grow

#

You get bullied into submission

floral basin
#

Correct

onyx loom
#

uSe JaVaFx

hot hull
topaz bay
#

no

hot hull
#

;c

floral basin
#

Wat

ocean quartz
#

Lmao

hot hull
#

If you say it's not clean imma be mad

topaz bay
#

its not

#

make the class final

heady birch
#

Poor

onyx loom
#

๐Ÿ˜†

heady birch
#

Store them all in a list

#

and for each onEnable

topaz bay
#

And at least have some sort of logic to the ordering of your fields

frigid badge
#

I skipped barry

hot hull
#

fucking bullies

heady birch
#

I could create an example

heady birch
onyx loom
#

is this how kiteboard looks

heady birch
#

no

#

name one kiteboard class source you wanna see

#

and ill show it

distant sun
#

Main.class

heady birch
#

uh

#

KiteBoardPlugin.class that would be

#

Eh its too big

#

You can have CriteriaRegistryImpl.class instead

#
public class CriteriaRegistryImpl implements CriteriaRegistry {
    private final KiteBoardPlugin kiteBoardPlugin;
    private final Map<String, Criteria.Factory<?>> factoryMap = new HashMap<>();

    public CriteriaRegistryImpl(final KiteBoardPlugin kiteBoardPlugin) {
        this.kiteBoardPlugin = kiteBoardPlugin;

        registerCriteria("PERMISSION", PermissionCriteria::new);
        registerCriteria("WORLD", WorldCriteria::new);
        registerCriteria("EVENT", (config) -> new EventCriteria(config, kiteBoardPlugin.getEventTriggerManager()));
    }

    @Override
    public void registerCriteria(final String identifier, final Criteria.Factory<?> factory) {
        factoryMap.put(identifier.toUpperCase(), factory);
        kiteBoardPlugin.getLogger().info("Registered criteria '" + identifier.toUpperCase() + "'");
    }

    @Override
    public void unregisterCriteria(final String identifier) {
        factoryMap.remove(identifier.toUpperCase());
    }

    @Override
    public Criteria.Factory<?> getCriteriaFactory(final String identifier) {
        return factoryMap.get(identifier.toUpperCase());
    }
}
onyx loom
#

name one kiteboard class source you wanna see

#

wHeReS kOtLiN

topaz bay
#

How tf

#

Do you people resist ordering

heady birch
#

Before my kotlin days

topaz bay
#

Like why

#

Why is permission first

heady birch
#

you wanna see ordering

#

i dont want to hear a SINGLE comment

onyx loom
#

๐Ÿ˜†

hot hull
#

wdym ordering?

#

Longest to shortest or what?

errant geyser
#

its.. sniff beautiful Niall ๐Ÿ˜ข

heady birch
#

height to width

hot hull
#

ah go away if you complain about that

#

That white theme tho

onyx loom
#

^

heady birch
#

This part I just got bored and made it static

#

Lol

old wyvern
#

Now time to find out how audio works for this piece of shit

heady birch
#

Damn that looks nice

old wyvern
#

They have the WORST documentation ever

#

latest everywhere is v3

#

but every example is v2

#

I quit on adding a button and just added a interactive sprite instead

#

2 hours to submit ๐Ÿ’€

jovial warren
#

how did you make that?

hot hull
#

magic

jovial warren
#

js canvas?

#

or html canvas?

#

what I'm on about though is that surely that was actually made in like Photoshop or something, afaik js canvas can only manipulate images to a certain degree

#

I'm wondering how tf you design images that good

topaz bay
#

its literally just shapes

old wyvern
#

phaser

jovial warren
#

bit of shadow in there as well

rotund egret
#

A circle you mean?

old wyvern
#

its litrally sprites

#

images

topaz bay
#

the shadow is just a ring

#

could literally just be black with low opacity

jovial warren
#

ah okay

#

what do you create that in?

old wyvern
#

phaser

jovial warren
old wyvern
#

yes

jovial warren
#

that's for making games in HTML5 though isn't it?

old wyvern
#

and?

#

I dont understand your question?

jovial warren
#

you didn't make a game

#

actually that techincally is a game I suppose

#

ยฏ_(ใƒ„)_/ยฏ

old wyvern
#

Im so confused with what you are asking

jovial warren
#

nothing

old wyvern
#

Its a simple spin game

#

Side project from uni

#

We are taught unity mainly

topaz bay
#

Did you have to use phaser?

old wyvern
#

Yes

topaz bay
#

gross

old wyvern
#

Forcibly

#

xD

heady birch
#

@topaz bay Any library you actually like?

old wyvern
#

@heady birch Phaser actually sucks to use tho

heady birch
#

Ive never used it

topaz bay
#

a bit low level, but I do enjoy working with processing

heady birch
#

That looks interesting actually

#

Was looking at it as a replacement of Java2d

topaz bay
#

processing is really fun

#

used it to make this

old wyvern
#

and that is?

#

minesweeper?

topaz bay
#

.....

#

Its pathfinding

#

what the fuck

#

LOL

old wyvern
#

xD

#

That litrally looks like minesweeper

rotund egret
#

Did you find it?

old wyvern
#

a*?

#

@topaz bay

topaz bay
#

That one was, yes

#

It can switch between modes

#

This is Dijkstra

old wyvern
#

Yes ik tbh what exactly is the use case of dijikstra?

floral basin
#

||1||||5||||๐Ÿ’ฃ||||1||||2||

topaz bay
#

astar is 1 to 1

#

dijkstra is 1 to many

heady birch
#

a*

#

nice

old wyvern
#

ah

topaz bay
old wyvern
#

I have these in next semester

topaz bay
#

The path finding algorithms are abstracted and steppable

#

The app has 2 modes, one where it runs it fully until it finds the end or nothing

#

And the other allows me to press the right arrow to step through

ocean quartz
#

Soo, trying to setup dialogflow on a docker now, i would need to set the GOOGLE_APPLICATION_CREDENTIALS path on the docker and not on the VPS right? >.<

ocean quartz
#

ugh giving up for now

sour spade
#

can someone help me with recource packs

normal talon
#

On the server?

#

or making one ?

obtuse gale
#

The examples provided in Python tutorial is rigged on SoloLearn

#

They are very confusing for beginners

#

Had to use the Comment section once to see how users explain it

rotund egret
#

Class:
1 + 1 = x
Homework:
1x + 2y^5 = 18, find z

obtuse gale
#

It always goes wrong in test just like that ^

sour spade
#

@normal talon making one

eternal mica
#

Just created my own Command JDA framework ๐Ÿ˜„

#

Iโ€™m really happy with it tbh

#

I donโ€™t think this is the right channel

rotund egret
#

Blurry

old wyvern
#
1 + 1 = x
Homework:
1x + 2y^5 = 18, find z

z = 0.

#

โ˜ ๏ธ

rotund egret
#

Throws NPE

old wyvern
#

what throws npe?

rotund egret
#

z

old wyvern
#

that makes no sense

rotund egret
#

Z has no value
Z is null
Calling z throws NPE

old wyvern
#

I assume that was maths (y^5)
But since you consider it this way. z is not even declared

rotund egret
#

Yes

old wyvern
#

There is no NPE still

rotund egret
#

It would be declared to some extent

#

"Find z"
int z; //answer

frigid badge
#

@ocean quartz you can set the environment

#

either using compose or using the -e flag

#

can also use an env file

#

--env-file

obtuse gale
#

Feels like I already asked this question but...

#

Should I be recommending Python for anything nowadays

heady birch
#

Yeah

#

Its not like its going anywhere anytime soon

frigid badge
#

what

#

why would you recommend python

onyx loom
#

i recommend kotlin kapp

heady birch
#

Well it depends what for?

remote goblet
#

python stinky

onyx loom
#

u stinky PES2_Shrug

remote goblet
#

y u meanEmiCry

obtuse gale
#

Now that im having to work in java I appreciate kotlin alot more

obtuse gale
#

Hello, i'm learning to code anyone got any plugins to start off with/

hot hull
#

Learn java first

#

Then dive into plugins

heady birch
#

Learn java first
@hot hull ๐Ÿ‘Ž

onyx loom
#

no

#

learn kotlin first

hot hull
#

@heady birch Why ๐Ÿ‘Ž

heady birch
#

Why ๐Ÿ‘

prisma wave
#

real devs learn clojure and Scala first

ocean quartz
#

Real devs learn C first

hot hull
#

KM, I'd claw my eyes out if I had to use Clojure ngl

topaz bay
#

Real devs learn brainfuck first

heady birch
#

niall

obtuse gale
#

aj3douglas

heady birch
#

what is the quickest way to affine transform a shape ๐Ÿ˜ฆ

#

AffineTransform.setFast(true)?

#

org.hibernate.exception.ConstraintViolationException: could not execute batch

#

๐Ÿ™„

#

Idk why I get this running the system locally

#

probably some kind of transaction issue

#

considering im using repos for one dao and a session for another

prisma wave
#

@topaz bay can you think of any drawbacks of language level function result caching? For example ```
@SISO
addHello = value::String -> String {
yield("Hello" + value)
}

addHello(" there") //function called ordinarily, result and params are added to a Map
addHello(" there") //result is obtained from the Map

I think for expensive functions this could be pretty cool, but perhaps things like thread safety would need to be considered. Thoughts?
heady birch
#

Whats your opinion on papi expansion made in kotlin? is it worth it

topaz bay
#

Absolutely not.

prisma wave
#

an expansion? Not worth it imo

topaz bay
#

@prisma wave eh

#

It sounds nice for smaller things, but that just increases runtime memory usage, and will pile up over time

#

Depends on how you actually have the compiler converting instructions

prisma wave
#

Yeah good point

topaz bay
#

Do subsequent calls short circuit?

prisma wave
#

But for something like a Factorial function it could be nice

#

How do you mean?

topaz bay
#

Like for example, in Java, strings get cached

#

I would imagine the instruction created by the compiler doesnt attempt to recreate that string, it would just retrieve the value

#

same for int

prisma wave
#

Yeah it probably would

#

although since it's interpreted at the moment it would probably just be in some sort of Map

#

so yeah retrieving the value

topaz bay
#

Damn... I forgot about this

heady birch
#

....

#

make something like java that compiles to C and I will be happ

topaz bay
#

Absolutely not.

#

Why not just AOT compile your Java code?

#

Thats a lot of imports

#

lol

heady birch
#

Thats stupid!

topaz bay
#

Whats stupid?

heady birch
#

wildcard import

topaz bay
#

Thats... no.

heady birch
#

...

#

lol

topaz bay
#

I have intelliJ specifically set to not wildcard import

onyx loom
#

!!!

heady birch
#

why!?!?!

topaz bay
#

lol

heady birch
#

laughs in java.min

topaz bay
#

There are a couple of reasons actually

heady birch
#

Im interested..

topaz bay
#
  1. When you're working on something as generally complicated as this, a polluted namespace is both annoying and unmaintainable
#
  1. The imports section can be collapsed out of the way, it does not interfere
heady birch
#

true true

topaz bay
#

I hate my life

heady birch
#

Placeholder api..

#

I need bukkit as well?

#

Thought papi would have bukkit as dependency?

heady birch
#

@prisma wave @topaz bay am I bad for doing this:

private static final String KEY_SYMBOL = "symbol";

//somewhere else
setDefaultOption(KEY_SYMBOL,  "โ™ฅ");
//another place
options.getString(KEY_SYMBOL);
#

Makes it easily changable

prisma wave
#

Uh

#

No?

#

It's a constant

heady birch
#

๐Ÿคฆโ€โ™‚๏ธ

#

Better way

#

Easily maintanable and slightly neater

#

If in the future I want to change it, I can

#

Not during runtime ๐Ÿ˜„

#

@prisma wave @topaz bay Do you guys recommend using final exceissvley

#

As in in method declarations as well?

prisma wave
#

I recommend not using java personally

#

but yes, everything should be final unless there's a reason for it not to be

onyx loom
#

why can i not react in this channel ๐Ÿ˜ฆ

#

@pallid gale ๐Ÿ˜ 

#

I recommend not using java personally
๐Ÿ˜†

topaz bay
#

Yes.

#

Final all the things.

distant sun
onyx loom
#

๐Ÿ˜†

#

u wouldnt do such

distant sun
#

we'll see

onyx loom
#

i know too much ๐Ÿ‘€

#

secrets ๐Ÿ‘€

distant sun
#

fu

hot hull
#

Gaby

onyx loom
#

love u too

hot hull
#

FJ no longer uses your actions lib

#

Press :F:

onyx loom
distant sun
#

idc

onyx loom
#

ugh now ur gonna ask me to test it

#

fuck

signal tinsel
#

FJ?

onyx loom
#

FROZENJOIN

hot hull
#

Kali nah

old wyvern
#

Actions?

signal tinsel
#

Oh

#

lol

old wyvern
#

god I slept through a whole day

distant sun
#

yup

compact perchBOT
#
FrozenJoin
Information:

A Custom Join/Quit Message Plugin
โ€ข Spigot

onyx loom
#

๐Ÿ˜„

hot hull
#

Someone should update that

onyx loom
#

agreed

hot hull
#

Go do it Kali

old wyvern
#

FrozenJoin is Frosty's?

onyx loom
#

yes

hot hull
#

Who elses

old wyvern
#

cant open that

onyx loom
#

wait whats wrong with the links frosty?

old wyvern
#

wrong link?

onyx loom
#

i thought u were talkign about =pl

#

oh right i see

hot hull
#
  vanish:
    priority: 3
    type: 'VANISH'
    # Special modifier only available to the vanish format!
    # Indicates whether or not the check should be inverted
    # true = sends a message when vanished, vice versa
    inverted: true
    join:
      - '[BROADCAST] &8[&a+&8] &b%player_name%'
    quit: []
    permission: 'frozenjoin.vanish'

๐Ÿ‘€

onyx loom
#

my bad, didnt click link

#

ill go update PES_ThumbsUp

hot hull
#

Struggling a bit with the inverting of messages for the vanish

onyx loom
#

@hot hull is this good? "Description": "The Best Custom Join/Quit Message Plugin",

hot hull
#

Nah, just keep it as a fully customisable join/quit messages plugin

onyx loom
hot hull
#

Don't wanna be arrogant :p

onyx loom
#

deluxejoin is no match, u know it urself ๐Ÿ‘€

hot hull
#

Well so far it was, cause messages in FJ were cucked on 1.8

topaz bay
#

cucked...

onyx loom
#

1.8 in 2020

hot hull
#

Jesus fuck I'm dumb

#

I was trynna figure out why it was always using false, would be nice to actually apply the boolean to the format..

heady birch
#

apparently NiallString has a security vulnerability ๐Ÿ™„

onyx loom
#

@hot hull is the github updated?

#

for fj

hot hull
#

Yea

#

Well I gotta push, but it will be

onyx loom
#

i might aswell add that too then

heady birch
#

๐Ÿ˜ฆ

#

niallLib

onyx loom
#

๐Ÿ˜ฆ

#

anything else need updating on barry github while im here?

hot hull
#

All the plugins :p

onyx loom
#

๐Ÿ™„

#

i went through most of them a few days ago

#

by most i mean the main plugins

hot hull
#

oh okay

signal tinsel
#

@onyx loom wheres barry github

#

send link lol

onyx loom
signal tinsel
#

Might add my own

#

Lmao

hot hull
#

Gucci, all works

heady birch
#

damn my animations should be a service

hot hull
#

Do I add in unlimited motds while I'm at it @onyx loom ?

heady birch
#

then instead of plugins hooking into kiteboard, papi and others, it just looks for the first service!

onyx loom
#

might aswell

heady birch
#

then

hot hull
#

k

heady birch
#

if papi expansions loaded the service first, Kiteboard would use that service

old wyvern
#

what is kiteboard?

onyx loom
#

=pl kiteboard

heady birch
#

scoreboard plugin

compact perchBOT
#

v3.0.8 by Niall7459
The enterprise scoreboard and tablist solution, hook into any event!

Downloads:

518

Likes:

134

Reviews:

71

onyx loom
#

disgraceful that uve never heard of it

old wyvern
#

A premium API?

#

oh nvm

heady birch
#

Now do I delegate all the functionaility into AnimationsService

onyx loom
#

u dont

heady birch
#

oh

#

ok

#

what happens if animationmanager changes ๐Ÿ˜ฆ

onyx loom
#

it wont

heady birch
#

ur right

#

but still

#

AnimationService interface is beautiful

#

Also

#

This feels like my very own feat of human engineering..

#

But its basically what bstats does

hot hull
onyx loom
#

omg

#

๐Ÿ˜ฎ

#

imagine gabys action lib not having this lulw

heady birch
#

Sigh

#

@prisma wave I came up with an intersting idea.

prisma wave
#

let's hear it

heady birch
#

I register a AnimationsService, then any one of my plugins can use the service with highest priority...

#

I would have to do some hackything like bstats

#

because classes can't have the same package name e.g

#

this AnimationService.class would have to be the same across plugins.

#

but two classes in seperate plugins cant have the same fully qualified class name.

hot hull
#

@onyx loom cough Go Check Spigot cough

onyx loom
#

๐Ÿ˜ฎ

hot hull
#

Hopefully I didn't miss anything (I suggest reading the update log)

onyx loom
#

@hot hull whats the inverted?

hot hull
#

Did you not read update log smh

#

The meaning of "inverted: false" is thoroughly explained within the default config!

onyx loom
#

smh its in small text

#

also

#
# โ€ข [JSONMESSAGE] <JSON message>
# โ€ข [JSONMESSAGE] <JSON message>```
distant sun
#

imagine gabys action lib not having this :lulw:
@onyx loom Are you talking about this?

    actions:
      - '[message] 100% Chance messge'
      - '[message] 20% Chance message{chance:20}'```
onyx loom
#

thats in default config, one should be jsonbroadcast then jsonmessage should be put in the player section right frosty?

hot hull
#

smh Kali

#

one is JSON broadcast

onyx loom
#

ik, ur mistake :p

#

poopoo head

#

gaby, does it have chances and delays?

distant sun
#

ofc

#

๐Ÿ˜‰

onyx loom
#

last time i checked it never thonk

#

MY BAD

#

i apologise

hot hull
#

says that as I fully update to Gian's lib

distant sun
#

too late

hot hull
#

Anyhow Gaby, your lib has wonky messages on 1.8

distant sun
#

๐Ÿ˜‰

#

1.8 just suck

onyx loom
hot hull
#

Tell that to Gian

onyx loom
#

new holographic display update
The plugin now requires Spigot (not just CraftBukkit) at startup.

#

i say new, its 1 week old

heady birch
#

@topaz bay sxtanna got an idea?

#

Or else it will be the bstats method of looking for a field or method within every service.

#

which still wouldn't work anyway

old wyvern
#

check if its already registered?

heady birch
#

yes but

#

it needs to be a common interface between plugins

#

but..

#

if plugin 1 has org.example.Interface and plugin 2 has org.example.Interface then the ClassLoader wont load it

old wyvern
#

I mean both are the same right?

heady birch
#

yeah

old wyvern
#

You would still be able to access it

heady birch
#

Really?

#

Best way to find out is to try really

old wyvern
#

I guess yea

heady birch
#

this is kind of more appropriate for a string key

hot hull
#

Gonna ask here, since development is ded :p

Is having a file with an objects uuid, and then data inside that file an efficient enough way of having that object persist reloads?

heady birch
#

yes

#

or a single file?

hot hull
#

k, what would be the most efficient way of keeping trach of those objects? (Being a placeable block)

No it'd be a seperate file for each object, as it'll store a decent amount of data

heady birch
#

keep them all in memory

#

then save when you need to

#

on disable

#

maybe auto save if you really want

hot hull
#

Yea that's the idea, gotta make them persistant through reload

#

It's gonna be a placeable block, so I'm still finding the best way of storing it's actual data

old wyvern
#

My API is almost ready which does that for you xD

hot hull
#

The persistent thingy?

old wyvern
#

yes

hot hull
#

How long till it's finished? ๐Ÿ˜

heady birch
#

sql would work as well

old wyvern
#

Hopefully by this week welp

#

have to test it

hot hull
#

Too late

prisma wave
#

What does this API do exactly?

hot hull
#

KM, I need some advice

onyx loom
#

dont we all

#

especially from such an intellect like km himself

hot hull
#

So I've got a block (beacon), which you will be able to place and interract with. Only 1 of these blocks will be able to be placed in a single chunk.

What approach would you take when it comes to storing, and managing these blocks?

onyx loom
#

put all the data in memory

hot hull
#

No shit sherlock

onyx loom
old wyvern
#

Pretty much just handles loading, saving and caching.

#

welp

hot hull
#

||caching*||

onyx loom
#

|| sErVeR wOrLd FiLeS ||

heady birch
#

PersistantBlockWrapper

#

holds the Block

#

save and load the PersistantBlockWrapper your style

#

I'm assuming this is pretty impossible

hot hull
#
    public void load(final DistrictCore core) {
        /*
        for (File file : manager.getFiles()) {
            Collector = manager.deserialize(file);
        }
         */

    }

    public void save(final DistrictCore core) {
        for (UUID uuid : collectorMap.keySet()) {
            /*
            manager.createNewFile(uuid, manager.serialize(Collector);
            */
        }
    }

Now to make this :c

old wyvern
#

What is the core argument for?

prisma wave
#

@hot hull you could store the Chunks with a Beacon in a Set or something

old wyvern
#

maybe a Pairing function on the x and z coordinates

#

but then the world welp

distant sun
#

Pair<World, Pair<Integer, Integer>> xd

old wyvern
#

No thats not what I mean xD

distant sun
#

shush

old wyvern
#

Pairing function

distant sun
#

problem solved

old wyvern
#

ok dad xD

distant sun
#

wtf is that

old wyvern
#

cantor pairing

#

Gives you a unique value for any ordered pair (a,b)

distant sun
#

hm

#

why not use an array?

old wyvern
#

wdym?

distant sun
#

just wondering, idk

#

int[]{a, b}