#dev-general

1 messages ยท Page 99 of 1

onyx loom
#

just saw the image ๐Ÿ™ƒ

versed ridge
#

oh lol

unreal briar
#

anybody here good with math?

#

I need to map some coordinates on a rectangle

steel heart
#

@static zealot how is it going with your advanced cooke clicker game?

static zealot
#

well its the same as it has been last time I've sent it

#

xD

#

I've tried adding a max upgrade for the auto clicker but gave up

steel heart
#

oh why

static zealot
#

my math is the worst

steel heart
#

lmao

#

well I started coding js now

static zealot
#

I couldn't figure out a math formula for it so after 2 days just gave up

steel heart
#

lol

#

Why don't you start with java?

#

and mc coding?

old wyvern
#

What exactly do you need @unreal briar

hot hull
#

Conclure is a booly

old wyvern
#

xD

steel heart
#

Well Frosty it's all karma

hot hull
#

Anyhow it's 11pm, and the fact that I drank a redbull like an hour ago doesn't help..

steel heart
#
return isBeacon && isCorner1 && isCorner2 && isCorner3 && isCorner4 && isBookshelf1 && isBookshelf2 && isBookshelf3 && isBookshelf4 && isBookshelf5 && isBookshelf6 && isBookshelf7 && isBookshelf8 && isBookshelf9 && isBookshelf10 && isBookshelf11 && isBookshelf12;

Perhaps if you wouldn't have sent me this jeb_shrug

lunar cypress
#

jfc

hot hull
#

(I've surprisingly not fucked my sleep schedule within these 3 months)

#

And that sounds wrong..

old wyvern
#

My sleep schedule is fucked for a long time now

#

I waske up at like 2pm

#

and sleep at 4-5 am

steel heart
#

What's the point of sleeping anyways

old wyvern
#

true

steel heart
#

Where did blitzie go

onyx loom
#

died

steel heart
#

I c you're using intellij idea community version thonk

static zealot
#

I have some DM menus to do

#

Why don't you start with java?

#

because I have no time

#

if it was for me

#

the question

steel heart
#

Well it's like javascript

static zealot
#

I will. I rly want to start to learn it

#

well some of it

#

but its a lot more complex

#

and hard to learn and I don't rly have time this next 3-4 weeks

steel heart
#

I mean wouldn't mind to waste my time trying to teach you some

onyx loom
#

blitz, i dont have time and im still learning <o/

steel heart
#

ok ok but spam me whenever you're going to

static zealot
#

@onyx loom good for you xD

onyx loom
#

thanks

#

but theres no excuse for u not to ๐Ÿ˜ 

steel heart
#

literally take the time that you waste into dm menus and put it into java learning

static zealot
#

I mean if I would just try a bit I would have enough time but I am a bit lazy

onyx loom
#

literally take the time that you waste into dm menus and put it into java learning
this

static zealot
#

I am making 2 menus for Gianluca they are not for me

steel heart
#

bruh how do you not die of those menus

#

aha

static zealot
#

haven't made a menu for myself in like 2-3 weeks

steel heart
#

Do you have intellij idea?

onyx loom
#

no, hes an eclipse user 3djoy

steel heart
#

ah yes ofc

static zealot
#

I have that and eclipse but never used any of them

onyx loom
#

delete eclipse

steel heart
#

okay let's say that you should probably open intellij now

lunar cypress
#

let the circlejerk begin

steel heart
#

lmao true

onyx loom
#

๐Ÿ˜„

steel heart
#

innit like some cyber attack event today

onyx loom
#

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

steel heart
#

pridefall?

lunar cypress
#

wasn't that supposed to be on june 1st

old wyvern
#

Ooo

onyx loom
#

๐Ÿ˜ฎ

onyx loom
#

๐Ÿ‘ code ๐Ÿ‘ review thonk

prisma wave
#

pretty good

#

make things like number1 and input val instead of var, and possibly extract the random number making to a separate function (eg createRandomNumber).
Might be reading this wrong, but couldn't you just get 1 random number between 0 and 100 instead of 2?

Also, you can use repeat(n) instead of for(i in 0..n)

onyx loom
#

does val work? as its being reassigned in the for loop each time? or am i misunderstanding how val works

i need 2 random numbers as theyre being multiplied together as a sort of times table quiz challenge

prisma wave
#

val for number1, number2 and input will work fine

onyx loom
#

ok so im guessing val cannot be reassigned within the same function procedure. but it can be reassigned if the function is being repeated?

prisma wave
#

wdym?

#

for input?

onyx loom
#

its hard to explain my logic behind what i mean ๐Ÿ˜…

#

ill try out val tomorrow. i just didnt think it would work

#

also with creating a seperate function for the random numbers. is that really an improvement as its only 1 line currently. or is it just for more tidiness

prisma wave
#

tidiness mostly

onyx loom
#

๐Ÿ‘

#

i enjoyed this code review

#

there was little to say. which is a good sign ๐Ÿ˜

#

not that the stuff im doing is hard anyway ๐Ÿ™ƒ

prisma wave
#

Indeed it is

#

Nah it's pretty simple but clean enough

onyx loom
#

do it as a reaction bardy

jovial warren
#

how do you do polls

#

ah okay

#

can't react

onyx loom
#

u cant do it here ๐Ÿ˜•

jovial warren
#

where can I do it?

onyx loom
#

go offtopic

jovial warren
prisma wave
#

Looks fine I guess

#

Rest APIs in spring are ridiculously easy so just a small tutorial will probably do just enough

jovial warren
#

I ain't watching no low-budget eclipse youtube tutorial

#

lol

#

anyway, probably gonna be going off for the night now

#

see you lot tomorrow

onyx loom
#

me too

#

good night sleep tight dont let the bed bugs bite

jovial warren
#

haha

#

you too

verbal relic
#

how do u add a library to an Eclipse project

ocean quartz
#

You first start by downloading IntelliJ ;p

verbal relic
#

no

#

I REFUSE

ocean quartz
#

Pft, your loss

verbal relic
#

lol

topaz bay
#

@verbal relic No but seriously though, do yourself a favour, and download IntelliJ

ocean quartz
#

Download IJ, then use gradle and you'll never need to ask about how to add a lib to your project

topaz bay
#

^

#

While you're at it, switch to Kotlin.

#

smile

verbal relic
#

yea, nah

obtuse gale
#

boutta re attempt making a massive bedwars plugin

hot hull
errant geyser
#

Frosty the framerate on that gif hurts me

hot hull
#

It's perfectly fine for me?

errant geyser
#

Its like 30

#

When you jump its so juddery

#

Might just be me, but eh

#

I demand 4k 1m fps gifs (โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

hot hull
#

It might look like that due to the bedrock background

heady birch
#

Uh oh

obtuse gale
#

ofo

#

oof

#

intellij gets my macro keys confused

topaz bay
#

@heady birch get outta my shit kid

heady birch
#

Mildly simmering now

topaz bay
#

idek why I made it that

signal tinsel
#

Lol

obtuse gale
#

Is there a way I can make intellijs console support chat colours or naa

heady birch
#

no

prisma wave
#

ANSI colours are a thing but I'm not sure if Intellij registers them properly

#

The IJ terminal will, not sure about anything else

lunar cypress
#

you can link a custom terminal with intellij

#

I don't think the intellij default one supports those things

obtuse gale
#

so cani like set it to git bash?

prisma wave
#

Yes

#

although cmd should also support ANSI colours

obtuse gale
#

hm

#

well I set it to git-cmd.exe

#

Does that just change the terminal thing in intellij, or will it change the the "build" terminal

topaz bay
#

the build terminal isnt a terminal

#

Its a log

obtuse gale
#

yeah

#

is there a way I can make that do chat colours?

topaz bay
#

Why would there be chat colors there?

obtuse gale
#

cos why not lol

topaz bay
#

because its not a terminal

#

Its... a log...

#

Which does support ansi colors

#

Also, I'm pretty sure using paper from IJ the colors work

obtuse gale
#

im not using the paper api, i am using a paper jar tho

topaz bay
#

That has literally nothing to do with what I said

#

lol

obtuse gale
#

lol what

jovial warren
#

it's a log, not a terminal, sx is right

#

you won't get any colours in there

#

but why do you need colours in there anyway?

distant sun
#

Some plugins have colors on their prefix though, idk how the log works

heady birch
#

they send a message instead of using the logger

#

Bukkit.getConsoleServer().sendMessage(

hot hull
#

The logger has info, warning and error

#

Which are colored (on later versions)

prisma wave
#

ew console sender

distant sun
heady birch
#

idk

hardy wolf
#

looking for a plugin with which i can edit every drops from the game, such as dropedit2 (but this one has really bad looting / fortune support and lacks a lot of support for some blocks)

hot hull
onyx loom
#

oshit

obtuse gale
#

github has a dark theme?

onyx loom
#

yes?

obtuse gale
#

oo

onyx loom
#

oh god uve been using light theme all this time?

hot hull
#

It's a chrome addon

obtuse gale
#

o

hot hull
#

Been buggy as hell lately tho

obtuse gale
#

is it not a github thing?>

hot hull
#

I don't think they have a dark theme no

obtuse gale
#

speaking of github

#

what the hells a github package?

signal tinsel
#

Like maven or npm registry @obtuse gale

#

You can upload a maven package to there

#

Or npm or fuck knows what it supports

rotund egret
#

Who's fuck

ocean quartz
#

A cool guy

rotund egret
#

Neat

signal tinsel
#

Yes

obsidian dragon
#

can anyone help? people cannot place creepers ontop of spawners without getting a msg saying they cant change the spawner with an egg
so its impossible to cegg spawners

hot hull
#

I'm assuming you're using SS, I think you're gonna have to fork it and change that yourself

#

@prisma wave Got any threads which I could reference to when making an API for my plugin?

jovial warren
#

API?

#

good luck with that one

prisma wave
#

I don't know of any

#

it's probably too vague to be able to say anything clear anyway

hot hull
#

I'm afraid that searching through spigot forums I'm gonna get misslead, and turn out like all the other idiots who make apis

jovial warren
#

for an API, I'd suggest just putting in what you need to, and then refining it later

#

you'll never, ever get it right the first time

hot hull
#

Bardy, not the issue, I've no clue how to make it

prisma wave
#

imo the best way to go is just an interface as the main endpoint (possibly service manager)

#

as long as you're properly encapsulating the implementation you can't really go wrong

jovial warren
#

@hot hull try to get a vague idea of what information people might want to get from your API

hot hull
#

It's a private API

jovial warren
#

why you making an API if it's private?

hot hull
#

Making it so I have an easier time hooking up plugins together

jovial warren
#

ah okay

hot hull
#

(So I don't have to copy certain classes etc, cleaner)

jovial warren
#

why you making it private?

hot hull
#

Because it's for private plugins?

jovial warren
#

as long as it's very generic and doesn't depend on any plugins, you shouldn't need to make it private, but if you want to make it private, guess that's your choice

prisma wave
#

???

jovial warren
#

also, if it's for use in other plugins, I'd call it a framework or a library

hot hull
#

Why would I make it public?

prisma wave
#

there's no point in making a public api for a private plugin

jovial warren
#

there's no point in making a public api for a private plugin
fair point

prisma wave
#

you're thinking api to mean "library"

#

rather than a literal API

hot hull
#

And no, it's not a lib/framework, since it only contains events from the plugin, etc

jovial warren
#

so you're using this api to have one plugin hook in to another

hot hull
#

Sort of yes

jovial warren
#

what is the plugin that you're trying to make an API to be able to hook in to?

hot hull
#

I'm guessing you don't fully understand what I mean

jovial warren
#

not quite, no

#

APIs are for one thing hooking in to another, usually so others can hook in to your creation

hot hull
#

Exactly what I said yes..

jovial warren
#

why don't you just have the plugin hook in directly?

rotund egret
#

Future proof

jovial warren
#

no point spending time making an API if you're gonna be the only one using it...?

onyx loom
#

not exactly

#

(So I don't have to copy certain classes etc, cleaner)

jovial warren
#

okay

#

well, as I said, if you're making an API, just think about what you want to hook in to

#

if you want to future proof it, think about what others might want to hook in to as well

prisma wave
#

Future proof
^^^

making an abstraction makes it a lot easier to change the implementation in the future without breaking things

#

an API can be as simple as 1 interface

jovial warren
#

an API can be literally anything

#

APIs are designed around ease of use and functionality

#

neither of which you really have to worry about for a private API

hot hull
#

Why not, why would I make my life harder, when I can give it like 30min more of thinking and making it clean beforehand?

prisma wave
#

^

#

future proof everything

#

within reason

jovial warren
#

as I said, you probably won't get it right the first time, nobody really does, just try and make something that works and refine it later

#

within reason ofc, yeah

#

for an API I'd suggest modelling how you want each thing to interact with each other, if you really want to make sure it's going to work well

signal tinsel
#

Imma look into Spring to learn that

jovial warren
#

Spring is a framework

#

not an API

signal tinsel
#

I never said that

#

it was a completely random message not related to anything anyone here ever said

#

xD

jovial warren
#

ah okay

#

yeah I would only suggest using Spring for larger projects since it's such a large framework

signal tinsel
#

What else do you use in java lol

hot hull
#

Making a tik tac toe game

jovial warren
#

I don't really use any frameworks, never used one before

hot hull
jovial warren
#

obviously I use a plethora of libraries and a few APIs here and there

signal tinsel
#

Lol

#

I really only use spigot-related libraries right now

#

Though I'm considering making a Discord bot in java again

#

Been a few years since I done so

onyx loom
#

just make sure its not barry kapp

jovial warren
#

discord bot in Java? ew

#

discord bot in Kotlin ๐Ÿ˜Ž

onyx loom
#

Kotlin ๐Ÿ˜Ž

jovial warren
#

no where near as advanced as JDA from what I've seen but it looks like it'll do

signal tinsel
#

Fuck kotlin

jovial warren
#

Kotlin says fuck you too

signal tinsel
#

Lmao

#

I never used kotlin

#

Nor looked at it

jovial warren
#

Kotlin (> * โˆž) Java

signal tinsel
#

Ite time to make a test commit to see if I configured everything properly

#

Which tbf I prolly didn't

jovial warren
#

well, what can I say, you're working with Java, what do you expect

signal tinsel
#

Lol

#

Yeah right

heady birch
#

spring is worth it

jovial warren
#

spring is worth it for larger projects

hot hull
heady birch
#

for every

jovial warren
#

@SuppressWarnings("ResultOfMethodIgnored") I think

#

something like that

#

or just Alt+Enter

#

I believe there's an option for it

#

"Suppress warning for whole class" or something like that

hot hull
#

ResultOfMethodCallIgnored :))

jovial warren
#

that's the one

#

almost had it

signal tinsel
#

Aight

#

Great

hot hull
#

Am I safe to ignore this NPE warning, since I am creating the section above if it doesn't exist?

prisma wave
#

no

#

because the value of section will still be null

hot hull
#

So should I reassign it aswell?

jovial warren
#

yeah it will still be null

#

you need to reassign it yeah

#

section = manager.createFileSection() probably

hot hull
#

Nah

jovial warren
#

depending on what that returns

#

if not, just use a load method or something

hot hull
#

Still gives me the warning, but I can safely ignore it now, correct?

jovial warren
#

have you checked all the cases for section?

#

so if it's null you need to reassign it if you're creating it, if it's not null then you can just use it

hot hull
#

I mean yea, that's what the check is for

jovial warren
#

if you make sure that there is absolutely no way that it can be null then the error will go away

hot hull
topaz bay
#

pitfall of your filemanager

#

create should return what it created

hot hull
#

Mc

#

;C*

topaz bay
#

Is it not your code?

hot hull
#

It is yes

topaz bay
#

So change it...

hot hull
#

aye aye sir

jovial warren
#

yeah he's right

#

took me a bit of time to process that wow

#

also I think I know the issue with that other code: you're using the same method for the second time, which I imagine can return null, so IntelliJ sees that as it can be null for the second time

#

if you understand any of what I just said lol

hot hull
#

I don't, no

topaz bay
#

get is nullable

jovial warren
#

^^^^

topaz bay
#

You are never actually resolving the nullability

jovial warren
#

^^^^^^^^

topaz bay
#

Why in gods name do you have an async option for saving a config file...

jovial warren
#

that as well

hot hull
#

Someone said I should do it async

jovial warren
#

async file transfer is dangerous as it can lead to data loss from what I remember

#

it's why we don't transfer packets async

#

because it can cause corruption

#

idk

topaz bay
#

Thats not true

jovial warren
#

it's true for packets, maybe not so true for files though

topaz bay
#

theres no reason to save these files async, theyre absolutely tiny

#

It is also not true for packets

jovial warren
#

I heard you should never transfer packets async

topaz bay
#

The entire minecraft protocol is asynchronous

hot hull
#

hmm okay then

topaz bay
#

That doesnt even make sense

#

netty uses several threads

#

You can even customize how many threads it uses

jovial warren
#

isn't splitting packets between threads a bad idea though?

#

other than that, yeah I agree

topaz bay
#

What makes you think you need to split packets over threads?

#

packets are tiny pieces of data

jovial warren
#

ik

#

just heard once that this guy said you can't transfer packets asynchronously

#

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

topaz bay
#

transfer packets asynchronously

#

This statement doesn't even make sense

jovial warren
#

suppose this is the same guy who told me I should support plain text, YAML and JSON in my Punishments plugin

#

"You can't send packets on an async thread because spigot handles it"

#

that's the message he sent me

#

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

#

maybe I just understood what he said wrong

#

also this is the same guy that said futures cause blocking

topaz bay
#

@hallow crane

#

?

hallow crane
#

Futures block

jovial warren
#

wrong

topaz bay
#

futures can block

jovial warren
#

they only block if you make them block

#

.get() and .join() are blocking methods

hallow crane
#

CompletableFutures in their default state which are not completed block if you try to get the value

#

using .get

jovial warren
#

that's why you wait

#

actually that wouldn't work

topaz bay
#

I'm more concerned about this packet nonsense

hallow crane
#

You never specified, so I used what you gave me... .get() XD

#

@topaz bay Irrelavent

#

Different conversation

topaz bay
#

That.... is literally the entire conversation

hallow crane
#

Packets are not related

topaz bay
#

He only just now mentioned what you said about futures

hallow crane
#

The future thing is not relavent to the packets thing in this context

topaz bay
#

I dont give a shit about the futures

old wyvern
#

The conversation was about packets not futures @hallow crane

topaz bay
#

I pinged you because of what you said about packets

old wyvern
#

^

hallow crane
#

??

jovial warren
#

look at the picture yako

old wyvern
#

You said packets cant be sent async?

hallow crane
#

The argument is not "you can't send packets over async" it's the specific context

old wyvern
#

What was the "specific context"?

jovial warren
#

the context here is he was trying to update a holographic scoreboard with data every so often

#

and it was causing about a 5-10 second freeze on the main thread because he was transferring ~5MB of data

old wyvern
#

๐Ÿ˜‚

hallow crane
#

@jovial warren suggested something to do with tranferring large data over packets and I said you couldn't do that because of lag implications

old wyvern
#

large data over packets?

#

as in?

#

lag implications Explain?

hallow crane
#

Anyways, I don't really care, this was a long time ago and I've solved the issue

jovial warren
#

I suggested you use futures to update the data

hallow crane
#

No idea why you dragged me int othis @jovial warren

jovial warren
#

I didn't intentionally drag you in

old wyvern
#

What "lag implications" were there tho?

jovial warren
#

I just said where my source of information about packets not being able to be transferred asynchronously came from

topaz bay
#

I mean... the conversation had nothing to do with your issue...

#

but ok

hallow crane
#

I don't really remember anything about the argument or my specific arguments because it was a while ago

#

Ping RickyB98, i'm pretty sure he told me something related

jovial warren
#

discord has a search feature

hallow crane
#

I have a life, I don't have time to search for this information right now.

jovial warren
#

you can literally search for async and it's the latest result

hallow crane
#

I honestly do not care, I am really busy right now ๐Ÿ˜‚

jovial warren
#

okay let me explain it to the crowd then

#

basically, this was on the Skycade KitPvP server, and we had a few holographic leaderboards that would display information about top kills, deaths, etc.
the problem was that updating the scoreboard would cause the server to freeze for a few seconds whilst the data was being transferred to the leaderboards
I spoke to yako about it because I thought it was an easy fix, and he told me that 1. Futures block, and 2. that you can't multithread packet sending

#

that's basically it summarised

prisma wave
#

both of those statements are false

jovial warren
hallow crane
#

Actually, I remember now. I just said "packets are handled by spigot on the main thread" because I needed a filler argument so you'd stop asking about the details, because we have some private stuff with the data that relies on non-asynchronous calculations.

#

Packets actually do not relate at all to the argument because packets are handled elsewhere completely

jovial warren
#

okay, so maybe it would've been a better idea if you had told me that in the first place ๐Ÿค”

hallow crane
#

I was in a pinch, in some calls, etc.

jovial warren
#

Packets actually do not relate at all to the argument because packets are handled elsewhere completely
if they were handled completely separate, then why did they block the main server thread?

#

๐Ÿค”

hallow crane
#

Packets didn't block the main server thread, other operations did

jovial warren
#

okay

#

the only operations I can think of that would block the main thread for a few seconds are database operations

#

there's probably a lot more operations than that though that if not done right will cause issues

hallow crane
#

Again we are going full circle here- doesn't matter what the operations are; they block the main thread

jovial warren
#

so how did you fix it then?

#

you never actually told me

hallow crane
#

It doesn't have to do with packets so it doesn't matter

old wyvern
hallow crane
#

NDA, my dude

jovial warren
#

so basically what you're telling me here is that what you told me is complete and utter bullshit?

hallow crane
#

Nah, the Futures blocking the main thread was legit. Packets are irrelavent.

prisma wave
#

That's not true though

#

Futures don't block

#

That's the point

#

Unless you do ConpletableFuture#get or something

jovial warren
#

you told me you can't transfer packets async, so that was complete bullshit then?

hallow crane
#

in our situation they block because we need the data on the main thread

jovial warren
#

Unless you do ConpletableFuture#get or something
which defeats the whole purpose of using futures may I add

prisma wave
#

Callbacks are a thing

hallow crane
jovial warren
#

you sent me that a while ago

old wyvern
#

yako

hallow crane
#

in our situation

jovial warren
#

but with completablefutures you can wait until they are completed

hallow crane
#

doesn't matter what it was or how it worked, it would've blocked the main thread

jovial warren
#

not wait I mean check

hallow crane
#

Yeah sure you can check

prisma wave
#

Why would you not use a callback

old wyvern
#

^

prisma wave
#

That operation could still theoretically block for a long time

hallow crane
#

Because of continuous operations happening at the same time

#

We ended up not even using futures and looking at it from a different angle

#

That's just how the system was designed before i got there

topaz bay
#

in our situation they block because we need the data on the main thread

prisma wave
#

Ew

topaz bay
#

I...

prisma wave
#

Enslaved race conditions

topaz bay
#

I can't breathe

hallow crane
#

I don't get to change 250k+ lines of code to just fix one issue

jovial warren
#

also how exactly do you expect to run code async and have it return to the main thread without blocking it?

hallow crane
#

We ended up not even using futures and looking at it from a different angle
you don't

prisma wave
#

any chance of you elaborating?

hallow crane
#

No chance, NDA

jovial warren
#

so you either didn't run any code async, or you ran some code async and didn't return sync

#

those are the two options I can think of

hallow crane
#

I know you are smart, so I think you can figure out the solution to your problem

jovial warren
#

you can't figure out a solution with only half of the problem

hallow crane
#

What was the original issue? I never even saw it

#

Message link?

jovial warren
#

it was that the KitPvP server was freezing up due to the updating of the leaderboards

#

basically

hallow crane
#

that was your issue?

jovial warren
#

that was the issue you had

hallow crane
#

hmm

#

well I can think of a different way than how we did it

prisma wave
#

Does an NDA really extend to not revealing what concurrency model you use? It's hardly a state secret

hallow crane
#

There's that and I really don't remember

#

It was a while ago

prisma wave
#

Fair enough

hallow crane
#

You can use a middle man like PlaceholderAPI

#

and provide updated data in a callback

#

run everything async

#

Or just callback and modify some static instance somewhere and use your own framework to get it

prisma wave
#

modify some static instance

ew

hallow crane
#

Your turn to suggest something @prisma wave

prisma wave
#

Why not just cache the data so you don't need to query every time

#

That's my suggestion

hallow crane
#

that's pretty much the model I was going after

prisma wave
#

Ngl I don't really know what you're talking about

hallow crane
#

In my problem we also had something different to take into account- hooks in 25 different plugins that had to be called each time there needed to be an update

jovial warren
#

a leaderboard that hooks in to 25 different plugins?

#

sounds like a mess

hallow crane
#

reverse

#

Not a mess

prisma wave
#

PlaceholderAPI seems like the way to go here

jovial warren
#

a leaderboard that has 25 different plugins hook in to it

hallow crane
#

Kotlin

jovial warren
#

what about it

prisma wave
#

KOTLIN

hallow crane
#

That's literally what it is

prisma wave
#

COROUTINES

hallow crane
#

Leaderboards acts as Papi

#

Exactly why a bunch of plugins like LP hook into it

prisma wave
#

KOTLIN

hallow crane
#

I was just @ ing you but I didn't want to type it all out

old wyvern
#

xD

hallow crane
#

But we used our own system for hooks because Papi doesn't have support for maps of sorted data

jovial warren
#

I'm pretty sure the way you get PAPI data is that you only get it one at a time

#

like one placeholder returns one thing

hallow crane
#

Anytime there is a placeholder request it calls the method nested inside the external plugin

#

that's what we do, but it is called to retrieve data

jovial warren
#

I'm guessing you were updating every single leaderboard at once

hallow crane
#

Nope

#

That's a dumb thing to do

jovial warren
#

also, those leaderboards only had like 30 entries max from what I saw

hallow crane
#

I believe I said it in the argument we had, but we post each operation to new threads and stuff

#

The leaderboards had 30 entries, but all of the data that needed to be sorted had 200-300k+ entries from all the players who've joined

jovial warren
#

so you take the data from the players database, sort it by a certain field, then send that over to the leaderboard and hay presto, no?

hallow crane
#

Sort of yeah

#

that's one way of doing it

#

Im not going to say exactly how we did it but it's similar

jovial warren
#

"how we did it" is that before or after?

hallow crane
#

before and after but with changes to the sorting process

jovial warren
#

how were you sorting the data originally?

heady birch
#

Me after violating the whole Us navy contract after posting my question on stackoverflow

jovial warren
#

surely stuff that isn't used any more isn't covered by an NDA

heady birch
#

They usually terminate after a certain time

jovial warren
#

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

hallow crane
#

we sorted with a sorting algorithm

jovial warren
#

you know that's not what I'm asking

hallow crane
#

No I don't

jovial warren
#

what about concurrency

hallow crane
#

what about

jovial warren
#

was the data sorted sync or async?

hallow crane
#

async

jovial warren
#

then how did the data get to the leaderboard?

hallow crane
#

well we cached

#

and then the data was just retrieved from the leaderboards plugin beacuse it manages holograms

jovial warren
#

so what part of that was causing the freeze?

hallow crane
#

before the freeze was happening when we were sorting on all of the hook plugins direct from sql

#

we moved it to the leaderboards plugin using an algorithm

jovial warren
#

you were sorting on all the other hook plugins via SQL? was that done async?

hallow crane
#
  • direct from sql
#

i don't remember the details but it was freezing for some reason relating to the amount of data idk

#

wherever bottlenecks occurred it probably happened there

jovial warren
#

can you update holograms asynchronously?

#

couldn't you have filtered the data down to what was absolutely necessary asynchronously?

hallow crane
#

well you can update them with packets which can be async (not hypocritical because I didn't mean it)

jovial warren
#

so you wouldn't even need to touch the main thread in that process then

#

async get data from db -> async sort data -> async update hologram

hallow crane
#

well if you were updating states inside the world

#

it would have to be sync

#

We filtered the data to be put into leaderboards but we still have to sort every entry because what if the person at the very bottom of the list got 100 kills? it might offset everything

jovial warren
#

but don't you sort the list first and then filter it down?

hallow crane
#

sort then filter

jovial warren
#

sort and filter async, then push the minimum amount of data required via packets to the holograms

#

the only issue then is sending that updated data to clients

#

I imagine Minecraft does that itself, but I don't imagine it does it very well

hallow crane
#

You aren't really....using packets to send data

#

You just intercept the player's packets when they view the hologram and replace theoretical placeholders with the correct text

jovial warren
#

wouldn't you just be able to do the replacement after the filtering and then push that data?

#

then the hologram won't have placeholders on it, which means you won't have to intercept player packets

hallow crane
#

Sort -> filter -> cache

then sometime elsewhere

Packet to see hologram sent by player -> intercept -> replace text -> continue

jovial warren
#

which the interception of all online player's packets at the same time seems like the reason it would cause lag

hallow crane
#

two separate problems

#

nah it's not hard on the machine /memory at all

#

No lag

jovial warren
#

what about for the main thread?

hallow crane
#

Still would be fine

jovial warren
#

updating every single player's packets all at the same time has got to cause some lag no?

hallow crane
#

Lots of anticheats are lag-free but they intercept every type of packet- not just view ones

jovial warren
#

ah okay

#

so what was causing the lag then?

hallow crane
#

The view packet only comes in once when they join I think

#

the lag was caused by the way we did sorting in relation to the plugins that hooked in (as I said before, I think)

jovial warren
#

how were the plugins sorting data? async?

hallow crane
#

I don't remember

#

Well this is about your issue. How are you doing it right now?

jovial warren
#

how am I doing what?

hallow crane
#

Well your problem was update the holos, right?

jovial warren
#

I never had an issue in the first place, I just took your word for it about packets not being able to be transferred async and brought that up here

#

Well your problem was update the holos, right?
that was your issue wasn't it?

#

actually we've been over this now, it wasn't really

hallow crane
#

No, my issue was lag from sorting

jovial warren
#

also, why were the plugins doing their own sorting?

hallow crane
#

Because the data was in relation to those specific plugins, not the leaderboards plugin. a matter of structure and consistency. We changed it anyway

jovial warren
#

so the leaderboard plugin is the one that does all the sorting, then pushes it to the plugins

hallow crane
#

No

#

The plugins that hook into are called when needed which send the data to the leaderboards plugin to be sorted and holos are handled there

#

data doesn't go from leaderboards to external plugins

jovial warren
#

ah okay

#

also, why did you have that many different plugins doing that many simple tasks?

#

the only tasks I can think of are: log when a player kills another, log when a player dies, calculate a player's K/D ratio, and there were some other things you had on those leaderboards like most coins

hallow crane
#

custom stats

#

kill, death, killstreak, kit usages, coins, gang points, gang coins, etc

#

hundreds including other gamemodes

#

it provides a framework to be used in any situation we can think of

#

It's used on SB, factions, kitpvp, prisons, and all others I think

jovial warren
#

gang points and gang coins should be in the same plugin
kills, deaths, and kill streaks should be in the same plugin
coins and kit usages should probably be on the same plugin

hallow crane
#

Yes they are

#

They are in KitPvP

prisma wave
#

you guys should wait for a multi

hot hull
#

lol

prisma wave
#

You would get to like #10 easily

hallow crane
#

?

#

Lol

jovial warren
#

so you had the same leaderboard plugin for all the servers? okay that makes sense why there is so many plugins hooking in to it

hallow crane
#

Yes

#

Leaderboards doesn't depend on anything

#

Others depend on it

#

Just like papi

jovial warren
#

doesn't depend on anything? how does it update spigot then?

topaz bay
#

papi

hallow crane
#

you know what I mean

hot hull
#

Did someone say daddy ๐Ÿ‘€

topaz bay
#

I love papi

hallow crane
#

The leaderboards plugin is an abstract framework that provides infastructure for creating holographic leaderboards by the plugins using it- it doesn't manage any statistics itself

#

...just like papi

jovial warren
#

okay

hallow crane
#

End of conversation?

#

I need more xp

jovial warren
#

I think you've answered most of it so yeah I guess so

hallow crane
#

also technically I own skycade now because dwayne/space are gone ๐Ÿ‘€

#

Server owner role ๐Ÿ˜‰ ?

jovial warren
#

you don't own it, you just run it

hallow crane
#

my name is on documents

#

๐Ÿ˜‰

jovial warren
#

no wonder it's all gone to shit then

hallow crane
#
  1. only in the past day they left
  2. why so toxic lol
jovial warren
#

I'm messing with you

hot hull
#

Go argue in DMs :))

hallow crane
#

@hot hull how do I get xp fast

topaz bay
#

shut up frosty

hallow crane
#

and free

topaz bay
#

I love this song

jovial warren
#

@hallow crane you talk

#

simples

hot hull
#

You should've waited for a multiplier yako, then had the above convo :p

jovial warren
#

lol

old wyvern
#

do multipliers just get randomly applied? xD

jovial warren
#

no

hot hull
#

No, when someone boosts there's a multi

hallow crane
hot hull
#

And if any of the admins are feeling generous

old wyvern
#

oh

jovial warren
hallow yew
#

anyone know where the API is for ezblocks?

old wyvern
#

go through that I guess

jovial warren
#

copy of clip's EZBlocks perhaps?

#

or at least, very similar

old wyvern
#

that is clip's EZBlocks

jovial warren
#

why's it on Maxim Van de Wynckel's GitHub then?

old wyvern
#

god knows

heady birch
#

Probably fork

jovial warren
#

also what is that project structure?

old wyvern
#

its not a fork

jovial warren
#

if it was a fork it would say it was a fork

old wyvern
#

I got that from someone who forked it

prisma wave
#

since when was EZBlocks open source?

jovial warren
#

you know that project doesn't even use build automation

#

it isn't BM

#

well, it kinda is and it kinda isn't

#

this isn't the latest

heady birch
#

I didnt use build automation until a few years ago

prisma wave
#

ok?

heady birch
#

And even then I only used it on some projects I intended to distribute

jovial warren
#

this must've been back in Maxim's eclipse days lol

#

pushing .settings, .classpath and .project

prisma wave
#

disgraceful

old wyvern
#

6 years

jovial warren
#

yeah clip has committed to this though so it's definitely his

#

at least somewhat

heady birch
#

At least its not application-prod.properties

jovial warren
#

lol

#

why are none of clip's plugins open-source by the way? does anyone actually know?

#

also is it just me or do none of the people who post in #716864121043419167 have any idea about how much something should cost

#

I mean, $7 for a plugin that modifies 1.12 knockback values to be more like 1.8

#

now that's stupid money

#

and the one above is maximum $100

#

now I understand why I went in to programming

#

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

forest monolith
#

wtf player spoofing for 40$

jovial warren
#

yeah ikr

#

literally all you have to do is change the current player count

forest monolith
#

10 minutes = 40$

#

ez

jovial warren
#

yep

#

that's what I mean

#

okay you have to modify it via the proxypingevent I think

#

I should really start doing some of these

#

I mean, I've got plenty of time for it lol

#

lol

onyx loom
#

recommendations for UI framework?

jovial warren
#

UI? what kinda UI?

onyx loom
#

idk just a gui application that i can make n shit

prisma wave
#

Swing?

jovial warren
#

gtk?

#

use gtk for linux applications

prisma wave
#

depends what you're targeting

#

Swing is cross platform

jovial warren
#

yeah good point

old wyvern
#

JavaFX ?

jovial warren
#

u stupid

#

JavaFX

#

get yo ass outta here

old wyvern
#

ok?

jovial warren
#

I'm messing with you lol

onyx loom
#

i dont need it for anything complex, just more for getting the hang of events and hooking into a framework etc etc

#

im moving up into the big leagues ๐Ÿ˜Ž

old wyvern
#

IntelliJ comes with a Swing UI designer

#

but I feel its weird to work with

distant sun
#

why did you started with the worse league, kotlin?

old wyvern
#

NetBeans does well to make good GUIs

jovial warren
#

NetBeans

distant sun
#

:)

jovial warren
old wyvern
#

Have you tried the IntelliJ designer bardy?

#

@jovial warren

jovial warren
#

not personally

old wyvern
#

exactly

#

try it

narrow swift
#

Hello guys, i was wondering... does EzBlocks has an API to take the amount of mined blocks for a specific pickaxe ?

old wyvern
normal talon
#

%ezblocks_broken%

onyx loom
#

thats outdated yugi

old wyvern
#

oh

onyx loom
#

idk if anythings changed drastically but

#

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

old wyvern
#

No idea

narrow swift
#

Yeah i already have that, but i can't find the method, do you have any examples ?

old wyvern
#

Not sure man. I dont think its supposed to store per pickaxe/item.

narrow swift
#

That's strange

jovial warren
#

alright, cya lot tommorow

#

off time now

heady birch
#

@onyx loom Swing

#

U got unlimited support from me

#

Except making ui's, i'm bad at that

onyx loom
#

thanks ๐Ÿ‘

amber widget
#

anyone use autosell plugin and able to help me fix mutlipliers? they broken

topaz bay
#

@onyx loom please dont use swing

#

use javafx

sour spade
#

How can a server recource pack only change certain items and keep the players default texture pack on certain items

#

Like if i make a crackshot pack I only want to change guns not anything else

topaz bay
#

A resource pack only changes the textures you provide

sour spade
#

so if i just make a mcpatcher folder, it will only change those items?

topaz bay
#

You do have the ability to test this

ocean quartz
#

@topaz bay Are Coroutine schedulers done only with delay(time)?

onyx loom
#

difference between swing and javafx sx?

obtuse gale
#

setup some keybinds for IJ

onyx loom
#

๐Ÿ‘

eager fern
#

@obtuse gale thats hot

obtuse gale
#

ye

#

except intellij didnt directly accept my macro keys, it said they were all F24

eager fern
#

xD

obtuse gale
#

So I had to bind like P1 to Cntrl Alt Shift ]

eager fern
#

๐Ÿ˜ฎ

obtuse gale
#

Then set shadowjar to CntrlAltShift]

hot hull
#

What's the spigot one? Javadocs?

obtuse gale
#

Fires up my spigot server in IJ

#

So when I wanna restart my server with an updated jar I just do

#

P1 P5 P2

hot hull
#

Damn

obtuse gale
#

Still tryna think of a good generator JSON format, this is the best ive got atm

#

Dont love it tho

hot hull
#

Why not have the tiers be a list as well?

obtuse gale
#

Like that?

hot hull
#

Damn just counted, and I've got a total of 57 spigot plugins made in my IJ folder :oshit:

heady birch
#

@onyx loom please dont use swing
@topaz bay

#

Theres no issue with swing

#

@onyx loom What one did you choose

#

Javafx looks nicer to be fair

topaz bay
#

Javafx is literally the replacement for swing

#

There is an issue with swing

#

Its not modern, its been replaced, and its fucking trash

#

There is no reason to start a new project with swing

heady birch
#

4 blocked messages

obtuse gale
#

lol

topaz bay
#

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

#

I'm right though

heady birch
#

Lol

#

we cannot just leave the past behind

distant sun
#

4 blocked messages
@heady birch :)))

heady birch
#

@topaz bay Java fx doesnt have native L&F

topaz bay
#

and??

#

And wdym?

#

We 100% CAN leave the past behind

#

We do it all the fucking time

heady birch
#

no

topaz bay
#

Do you use Java 1?

#

Or do you use Java 8?

heady birch
#

7

topaz bay
#

Why is it that we update?

#

swing was LITERALLY replaced

#

literally

heady birch
#

Maybe when someone releases a decent docking framework for it

topaz bay
heady birch
#

Haha

#

You dont think I've looked or tried them

topaz bay
#

Considering your brain leads you to believe that swing is a better solution than JFX

#

Yes

#

Yes I do think you didn't

obtuse gale
topaz bay
#

???

#

Did you just link a decade old resource...

heady birch
#

Old, but gold

topaz bay
#

No

heady birch
#

Obvisouly havnt tried the demos

topaz bay
#

I don't need to try demos to know that using software that is a decade old in a new project is fucking stupid

#

especially when there are direct replacements

heady birch
#

Oh, maybe you could link me one as feature packed as that then

topaz bay
#

?????

#

Its docking

#

What features do you even need... besides.... docking?

heady birch
#

Docking

#

Tabbed docking

#

Info & Jide are state of the art in my eyes

#

A feat of human engineering

obtuse gale
#

nerds, i dont even know what that is

topaz bay
#

This literally has both of those

#

There are docks

#

And there are docks with tabs

#

?

heady birch
#

I cant really use java fx anyway

harsh spear
#

i Have a fix for launcher not able to log in PLZ DM me for INfo

topaz bay
#

Thats your fault

#

Dont blame javafx for your decision

#

@harsh spear what?? xD

obtuse gale
#

^

harsh spear
#

The Play button sometimes will not work or ever work no more unless restore your entire comptuer well i found a way to fix in 5 mins

obtuse gale
#

Why dm tho

topaz bay
#

Ive never had that issue

obtuse gale
#

^

#

Try reinstalling your launcher maybe

harsh spear
#

THe Operation to do it is too long

#

nope

#

none of that works i have microsoft REmote my computer they could not fix it unstall install miecraft tons of times did a restore keeping files nothing

topaz bay
#

Seems like user error

heady birch
#

Microsoft still do remote support?

harsh spear
#

yeah it was my error

#

\

#

Yes if u call them on the phone its free

heady birch
#

๐ŸŸฅ ๐ŸŸจ
๐ŸŸฆ ๐ŸŸฉ

harsh spear
#

i clicked a json file to open with something els well my mess up

#

after that everything broke'

hot hull
#

Ah yes when you wonder why shit doesn't work, and you forgot to throw in the plugin ,-,

nocturne dock
#

How would I change someone's nametag? (Above player)

#

I can't seem to figure it out

hot hull
#

nms iirc

nocturne dock
#

What in the world is that?

hot hull
#

net.minecraft.server

nocturne dock
#

How do I use that?

old wyvern
#

set name in GameProfile to needed name via reflection. Then remove-readd the player to playerlist and respawn him with destroy and namedspawn packets

quiet depot
distant sun
#

๐Ÿ˜ฎ

lunar cypress
#

R :omegalul:

#

But the statistics are kind of useless if they aren't relative to their users

hot hull
#

Should I bother making a DB for this? or is it fine if I store it in a file, just so it persists reloads (at load it's loaded into maps, and saved on stop)

heady birch
#

file is probably fine

obtuse gale
#

If it only is that data then file is your bet

#

Also, should I still be learning py now thonking

#

Cause idk anymore

hot hull
#

K, I'll keep it in file for now, but gonna move to a central database after all the plugins are finished (so it's all stored in the same place)

heady birch
#

hmm

hot hull
#

hmm what

obtuse gale
#

Also, is learning a new language by looking at examples then copy from it and tried to understand it times by times a bad practice?

#

I think it might

heady birch
#

probably not

topaz bay
#

Thats pretty much how the brain gathers new information

heady birch
#

what ever works for you

hot hull
#

You'll learn it eventually :p

#

Trial and error

obtuse gale
#

I mean, there're a gang who straight up coding a discord bot with py without even have any tutorials or any understanding on that language

topaz bay
#

All the c family languages are basically the same

#

Its pretty easy to jump between them

obtuse gale
#

I mean, py is easy tho

#

Never learnt it ofc

hot hull
obtuse gale
#

Lol

#

๐Ÿ‡ซ

obtuse gale
hot hull
#

That doesn't seem like an issue

obtuse gale
#

main issue is this bad boys giving null

#
    fun killGenerators():Boolean?{
        val coolTask69 = task ?: return null
        coolTask69?.cancel()
        return true
    }```
hot hull
#

Nice var

topaz bay
#

@obtuse gale fun killGenerators(): Boolean = task?.cancel() != null

obtuse gale
#

nerd

#

that being said I will copy + paste your code

lunar cypress
#

lmfao

topaz bay
#

Why would you even return null in your original code

#

instead of just returning false

#

4head

obtuse gale
#

on an unrelated note

#

is there some way you can do this lol, I keep naturally typing this

#
val x = whatever ?:{
// stuff if its null
}```
topaz bay
#

run

heady birch
#

just dont let it be null

topaz bay
#

Is the code supposed to return after that block? Or keep going?

obtuse gale
#

just return

#

Actually

#

it would make sense to not return wouldnt it?

topaz bay
#

It depends on the context

obtuse gale
#

time to test this lol

#

oof yeah, its still null

#

well returning false

topaz bay
#

Where are you assigning the task?

obtuse gale
#
    fun createGenerators(world:World){
        readGenerators().forEach{generator->
            generator.locations.forEach locationForEach@{location->
                if(!plugin.holoGrams) return@locationForEach
                val holo = HologramsAPI.createHologram(plugin, location.toLocation(world).add(0.0,4.0, 2.0))
                holo.appendTextLine("&aGenerator: &b${generator.name}".colour())
                holo.appendTextLine("&aTier: &b1".colour())
                holo.appendTextLine("&aTime until next tier: &b${generator.secondsToTier1 / 60} minutes".colour())
                task = object : BukkitRunnable() {
                    override fun run() {
                        world.dropItemNaturally(location.toLocation(world).add(0.0, 2.0,0.0), ItemStack(generator.item).setName(generator.displayName))
                    }
                }.runTaskTimer(plugin, 0L, generator.secondsToTier1.toLong())
            }
        }
    }```
#

in here

topaz bay
#

um...

#

youre reassigning the task?

#

for each location?

#

?

obtuse gale
#

OH

#

yeah

heady birch
#

@onyx loomWhat desktop app are you making

obtuse gale
#

er

#

Do I make a list of them? Like what should i do now

#

then cancel all in the list

hot hull
#

If I were to combine multiple plugins into one, how should I seperate them

#

Do I just make packages which represent each plugin, or?

#

(And how would I properly seperate the configs for them)

topaz bay
#

@obtuse gale why are you making 1 task per location

#

You should have 1 task per generator

obtuse gale
#

just thought aobut that

hot hull
#

Sx, I need your wisdom

topaz bay
#

?

hot hull
#

If I were to combine multiple plugins into one, how should I seperate them
Do I just make packages which represent each plugin, or?
(And how would I properly seperate the configs for them)

obtuse gale
#
    fun createGenerators(world:World){
        readGenerators().forEach{generator->
            generator.locations.forEach locationForEach@{location->
                if(!plugin.holoGrams) return@locationForEach
                val holo = HologramsAPI.createHologram(plugin, location.toLocation(world).add(0.0,4.0, 2.0))
                holo.appendTextLine("&aGenerator: &b${generator.name}".colour())
                holo.appendTextLine("&aTier: &b1".colour())
                holo.appendTextLine("&aTime until next tier: &b${generator.secondsToTier1 / 60} minutes".colour())
            }
            tasks.add(object : BukkitRunnable() {
                override fun run() {
                    generator.locations.forEach{
                        world.dropItemNaturally(it.toLocation(world).add(0.0, 2.0,0.0), ItemStack(generator.item).setName(generator.displayName))
                    }
                }
            }.runTaskTimer(plugin, 0L, generator.secondsToTier1.toLong()))
        }
    }```
#

That should fix it right?

topaz bay
#

It depends on what you mean by "combining plugins"

hot hull
#

I've got 5 custom plugins, tokens, tools, etc,
I'd like to combine them all into a core plugin

topaz bay
#

eh

hot hull
#

Would package seperation fine, or is there a cleaner way?

topaz bay
#

probably

hot hull
#

How should I make seperate configs?, should I just make files representing each plugin with <plugin>-config.yml or should I seperate them using directories?

#

(Some plugins have their own files)

topaz bay
#

You would want to redefine them as modules

obtuse gale
topaz bay
#

tasks.forEach(BukkitTask#cancel)

#

But wdym does nothing?

hot hull
#

mk

obtuse gale
#

does nothing lol

#

nothing happens when I call it

topaz bay
#

Is it not cancelling the tasks?

obtuse gale
#

ye

#

adding some debug printlns now

#

these macro keys ive got setup are nice

#

hm

#

It would imply nothings in the list, I added a thingy in the forEach and it didnt print anything out

topaz bay
#

its the same instance right?

obtuse gale
#

should be, its a global/local/idk wtf to call it variable

#

its defined right at the top of the class

topaz bay
#

Send the entire class

obtuse gale
#

Full class

topaz bay
#

oh

#

Are the tasks actually running?

obtuse gale
#

ye, the items are spawning

topaz bay
#

Where are you calling kill from?

obtuse gale
#
    @SubCommand("kill")
    fun kill(player:Player){
        val gm = GeneratorManager(plugin)
        "Calling method".debug()
        gm.killGenerators()
    }```
topaz bay
#

dude

obtuse gale
#

I get that debug message

topaz bay
#

I specifically asked

#

If its the same instance

obtuse gale
#

oh

#

yeah

#

ok

topaz bay
#

How in the hell are you supposed to cancel the tasks

obtuse gale
#

i