#dev-general

1 messages ยท Page 81 of 1

remote goblet
#

I'll type something like if (File#exists()) { and then go back and add the !

topaz bay
#

what???

#

=== in kotlin is the equivalent of == in Java, I use it all the time

#

@hot hull yes, I do that

#

often

prisma wave
#

i have literally never had to use ===

topaz bay
#

I also use .not

#

because IJ

#

Is superior

prisma wave
#

Those things are nice

#

Postfix operators are they called?

hot hull
#

.not?

prisma wave
#

adds a ! To the start

hot hull
#

Oh it actually inverts it

topaz bay
#

I dont think theyre called operators, but yes

hot hull
#

Damn

prisma wave
#

.sout is nice too

topaz bay
#

It works for every condition too

prisma wave
#

and soutv

topaz bay
#

I also use .if

hot hull
#

Sysoutprint

obtuse gale
#

wait soutv?

#

๐Ÿ˜ฎ

topaz bay
#

I have not ONCE used soutv

#

not ONCE

#

!!!!

#

soutp on the other hand

#

very useful

prisma wave
#

what's soutp

pale shell
#

@prisma wave he misspelled Soup

prisma wave
#

ah yes

topaz bay
#

lol

#

you use it in something that accepts parameters

prisma wave
#

soutv > soutp probably

#

ah yeah

topaz bay
#

and it generates a sout for those parameters

prisma wave
#

that's quite nice

pale shell
#

Soup ๐Ÿ˜ 

topaz bay
#

HELLA useful

#

You can actually change it to soup if you want to

#

All of those can be modified

pale shell
#

๐Ÿ˜ฎ

#

lit

#

soup

obtuse gale
#

oo

topaz bay
#

I had to manually make a sout for GoLand because it didnt have one

#

Very disappointing

prisma wave
#

very unfortunate

topaz bay
#

@prisma wave live templates

prisma wave
#

Ah yeah

#

that's it

topaz bay
#

WHAT

#

NO

#

That wasnt even the same game

old wyvern
#

wrh

prisma wave
onyx loom
#

o

#

das crazy

prisma wave
#

It's pretty cool

onyx loom
#

does it load itself or u gotta restart?

prisma wave
#

it will also download plugin dependencies

onyx loom
#

oh damn

prisma wave
#

loads itself

#

Tab completion doesn't work you might have noticed though

#

because I think the packet is only sent on startup

onyx loom
#

ye i think clip had that with DM aswell

prisma wave
#

will need to look into some hacky fixes

#

@pale shell happy now

pale shell
#

i was tagged

prisma wave
#

yes you were

pale shell
#

i confused

prisma wave
#

a very astute observation

#

scroll up

ocean quartz
#

Pretty nice bm

pale shell
#

i'm playing mc

prisma wave
#

Ty

#

I plan to make things like /ppm update which will update all plugins on the server

pale shell
#

very cool mr B 'A' M.

prisma wave
#

merci

pale shell
#

Can I make a suggestion

prisma wave
#

sure

old wyvern
#

Whats ppm?

pale shell
#

/papi update will suggest these 2 args:
/papi update <id> / <name>
/papi update *
First one incase you wanna update one plugin
Second to update all at once

prisma wave
#

PluginPackageManager

old wyvern
#

Package manager?

prisma wave
#

that's a good suggestion

#

and yes

pale shell
#

What you think alex?

prisma wave
#

I like

pale shell
#

Also the * one can it be async?

prisma wave
#

need to figure out how to make ACF parse longs properly

#

Yeah async will be possible

old wyvern
#

My internet

pale shell
#

i think async will be best to do

prisma wave
#

it should definitely be async

pale shell
#

Also, can they queue the installs?

prisma wave
#

There was a bit of server lag just from LP

#

Wdym?

pale shell
#

so say i went /ppm install essentials then i went /ppm install vault can it start downloading essentials but queue vault to start after?

prisma wave
#

hm

pale shell
#

small optimization ๐Ÿคทโ€โ™‚๏ธ

prisma wave
#

Yeah I should probably do what most other package managers do and only allow 1 package downloaded at once

pale shell
#

or queue them ๐Ÿ˜‰

prisma wave
#

but if essentials plugin.yml depends on vault it will automatically install vault as well

#

it kind of does already

pale shell
#

hm

#

hm

#

i had another idea but it was stupid so scrap that

prisma wave
#

you sure?

pale shell
#

ye

prisma wave
#

hm ok

#

I mean an idea's an idea

pale shell
#

I can suggest it but it'll probs be bad

prisma wave
#

worth a try

pale shell
#

./ppm info <Plugin>

#

Get the info from spigot's site

prisma wave
#

that's a good idea

#

things like supported versions and stuff

pale shell
#

ye

ocean quartz
#

need to figure out how to make ACF parse longs properly
@prisma wave What do you mean?

pale shell
#

@prisma wave there's also another part i was thinking

prisma wave
#

I've got 1 method that takes a String (the plugin name) and searches. If I make another with a Long (plugin id) ACF calls the string method @ocean quartz

#

@pale shell let's hear it

ocean quartz
#

Oooh okok gotcha

pale shell
#

wait i was thinking something as there what wasnt sad

prisma wave
#

Don't suppose your framework could handle that properly?

pale shell
#

wait

#

it is there !

prisma wave
#

That's why i and si are different rn

#

Wdym Odin?

pale shell
#

can it get that part too

prisma wave
#

it actually already does

pale shell
#

use that as the description

#

o

prisma wave
#

I've just not set it to display at all

#

I'm probably gonna need the conversation API so you can select search results and things

ocean quartz
#

I don't understand exactly 100% what you want, but if it's to have long as a parameter it works yeah

pale shell
#

alex, you missed out on the fun today

#

DeathRealms helped me get the elytra and i flew directly into the void by accident and went straight back up

prisma wave
#

But will it parse long arguments as a String @ocean quartz ? I'll send an example in a sec

#

nice

pale shell
#

someone got a bit scared ๐Ÿ˜‰

prisma wave
#
@Subcommand("i")
fun install(pluginId: Long) {
  //This never gets called
}
@Subcommand("i")
fun install(pluginName: String) {
  //This always gets called even if the args are a number
}``` @ocean quartz this is the problem I'm currently facing
pale shell
#

fix it then

#

๐Ÿ˜‰

prisma wave
#

which is why I had to make the string command si instead of i

#

There are workarounds

#

But effort

pale shell
#

alex

prisma wave
#

yes

pale shell
#

why's the pluginID long.......

#

it's a int no??

prisma wave
#

idk

ocean quartz
#

Ooh, hmm probably wouldn't work, since it only accepts one method with the same subcommand, though that is something i want to add in the future

prisma wave
#

It doesn't make much difference

#

hm alright

#

I guess I could do the number parsing myself

ocean quartz
#

Well you can always take only a string then check if it's a number or a word and handle it accordingly

prisma wave
#

yeah that's probably what I'll end up doing

#

I guess any framework would need some sort of priority system to handle that properly

#

Which could hurt performance

ocean quartz
#

If it's different types it could be pretty simple to add without priority system

prisma wave
#

But you might need to try and parse both

#

For each non-string parameter
If parsing succeeds
Use parsed param
Else treat as string

#

If you had lots of different argument types that could be like 4 different parse ops even if they pass a string

ocean quartz
#

That's true yeah

prisma wave
#

Then again that could be a tiny problem with no performance impact ๐Ÿคทโ€โ™‚๏ธ

ocean quartz
#

When I think about it, i was worried about performance when working on the framework and on my tests the command would take less than 1 miliseconds to execute, so i wonder if adding a few more checks would interfere at all
I'll give it a try today actually

prisma wave
#

Honestly I think even >10ms would still be virtually unnoticeable

#

If you could get support for number + strings that would be great though

hot hull
#

@prisma wave alias

prisma wave
#

Alias?

hot hull
#

Command alias

prisma wave
#

That's kind of what I'm doing right now

#

i takes a Long, si takes a String

#

But I want to avoid it

hot hull
#

Make your own system then

prisma wave
#

Effort lol

#

I'll just parse the string to a long manually

topaz bay
#

as if thats manual

lost edge
#

Hey guys, so I have been developing for a while now and I'm not familiar with versioning standards. I get the basis of MAJOR.MINOR.REVISION like 1.0.10 -SNAPSHOT but what should I do when i'm out of the snapshotting phase? Do I go to 1.0.0-RELEASE or go to 1.1.0-RELEASE

hot hull
#

Depends

#

Does the release bring new features? etc

ocean quartz
#

I normally do it like major.minor.revision-BETA or something similar, though once it gets out of beta i don't see why adding anything else to it, just version number should be fine

lost edge
#

The release would be a recode containing all of my work i've done but in a better way as i've learned a lot since making the plugin.

topaz bay
#

I try not to worry too much about the version numbers, as long as they increment

lost edge
#

That makes sense just removing the -RELEASE or -SNAPSHOT and go from 1.0.10-SNAPSHOT to 1.1.0

topaz bay
#

I pushed a papi expansion from 1.0.1 to 2.0 just cause I felt like it

ocean quartz
#

Yeah it's basically what I do

#

Then there is stuff like Citizens where it's like major.minor.revision.build.somethingelse

topaz bay
#

Citizens is... special

lost edge
#

Thanks for the insight! I get its relativity insignificant as long as it goes up but I just want to do what's best practice!

topaz bay
#

To say the least

lost edge
#

its probably the build number? Like each time a line is changed and complied it goes up by one?

pale shell
#

Citizens is... special
@topaz bay ??????????????

topaz bay
#

?

#

Look at the version...

pale shell
#

whys it special

#

yes?

topaz bay
#

???????

pale shell
#

it's a version #

ocean quartz
#

They definitely are special

topaz bay
#

Then there is stuff like Citizens where it's like major.minor.revision.build.somethingelse

pale shell
#

am i missing out on something..............?

topaz bay
#

Yes

pale shell
#

how

topaz bay
#

Youre missing your brain cells

pale shell
#

i'm missing less than you

#

:)

ocean quartz
pale shell
#

SSpigot

ocean quartz
#

Iffy plugin

pale shell
#

SSSSpigot

#

o.O

#

@topaz bay you hella confusing......

topaz bay
#

@ocean quartz I still prefer your plugin for npc commands

#

Fuck whoever says theres a better way

pale shell
#

what if there is a better way...

ocean quartz
#

I just hate the "never had a valid reason to exist", back in 2016 there was none of that lol
And if anyone says Denizens, wtf, that's a fucking horrible plugin that breaks shit all the time

topaz bay
#

LOL

distant sun
#

lmao

#

who uses denizen lmao

quiet depot
#

i feel like these plugins have a completely different purpose

distant sun
#

they do

#

iirc denizen it's some scripting thing

quiet depot
#

yaml

#

scripting

distant sun
#

yes you smartass

ocean quartz
#

They do but whenever people mentioned my plugin to them they were like "use Denizens if you want to add click to command"

distant sun
#

or

#

add this into the fucking citizens plugin

quiet depot
#

no gaby i wasn't being sarcastic or whatever you wanna call it

#

was just adding more detail

distant sun
#

jk mate

quiet depot
#

k

ocean quartz
#

It has been added to Citizens Gaby

#

Like a few months ago

distant sun
#

any good?

ocean quartz
#

It's alright

#

They still have -o to run commands as OP

distant sun
#

lame

ocean quartz
#

Plus, Denizens still breaks their own system just like it breaks mine lol

distant sun
#

imo they should throw that much hate towards you

#

you created and maintained a simple yet very used add-on for their plugins

#

why didn't they added this to the plugin itself it they consider yours "iffy" lmao

ocean quartz
#

To be fair, Fullwall doesn't, he's a cool dude, but the McMonkey in other hand..

lost edge
#

what did i cause.... lol

ocean quartz
#

You caused nothing, we're just talking xD

distant sun
#

never liked that guy, idk why

#

nor his denizen thingo

ocean quartz
#

He's rude to everyone on their discord
Idk why fullwall made him admin
But hey let's not talk about that much more xD

distant sun
#

agree haha

quiet depot
#

yo gaby, u finished school yet?

#

o wrong channel woops

topaz bay
#

I have expanded it

prisma wave
#

What's the size do? @topaz bay

#

Memory?

distant sun
#

what's that ๐Ÿ˜ฎ

ocean quartz
#

Yeah, what is that? ;o

topaz bay
#

Its a tiny little app that wraps the logic of downloading and running a jar

#

It was originally only supporting specifying whether it was spigot or bungee, and whether it should be a small (2G) or large (8G) instance

#

But I added the ability to specify the URL and the min and max ram

#

So now I guess its a general jar runner?

ocean quartz
#

@topaz bay Do you have any examples of running task async using Coroutines?

topaz bay
#

Like.... in a plugin?

ocean quartz
#

No, JDA

topaz bay
#

Nah

#

You probably wouldnt even need to use coroutines with JDA though?

#

Async programming is heavily built in to it

#

it is in it

#

I love english

ocean quartz
#

Doing database related stuff, and I have a method to insert a bunch of stuff which is holding it back a bit

topaz bay
#

Where?

ocean quartz
#

It's nothing like needed as I'll probably only run it once or twice here and there just curious about coroutines

topaz bay
#

I find it best to not mix and match scheduling patterns

pale shell
#

The singer of imagine dragons is learning to code ๐Ÿค”

lunar cypress
#

Limp

ocean quartz
#

Bust

lunar cypress
#

NoLang

old wyvern
#

Lava

#

BB

prisma wave
#

Ass-embly

#

not sure that counts

old wyvern
#

๐Ÿ˜‚

#

Rotlin

prisma wave
#

LOBOL

onyx loom
#

๐Ÿ˜ฎ

old wyvern
#

Cโ™ญ

#

^ C flat

prisma wave
#

B#

old wyvern
#

D++

prisma wave
#

C--

#

C += 1

old wyvern
#

Malbolde

#

Psython

prisma wave
#

Pulia

old wyvern
#

Luby

prisma wave
#

lmao

old wyvern
#

Must

#

๐Ÿ˜‚

prisma wave
#

I can't beat luby

old wyvern
#

Slowjure

prisma wave
#

You win

old wyvern
#

๐Ÿ˜‚

prisma wave
#

Graavy

old wyvern
#

Scale

prisma wave
#

BHB

old wyvern
#

๐Ÿ˜‚

prisma wave
#

๐Ÿ…ฑ๏ธ

#

SOSS

old wyvern
#

SASS

prisma wave
#

Tilescript

old wyvern
#

Euclip

#

Pase

#

Aanus

pale shell
rotund egret
#

Man, at that point it's time for a new repo

obtuse gale
#

Haha

obtuse gale
#

fancy thing for >=

topaz bay
#

@obtuse gale Wanna help me test something?

obtuse gale
#

mmm?

topaz bay
#

Make a gradle project, and put this in it

plugins {
    id 'java'
}

apply from: "https://www.voxmc.net/paper.gradle"
#

And see if you can make a plugin

#

<3

obtuse gale
#

alright

#
package PLEASE.SEnd.help

import org.bukkit.Bukkit
import org.bukkit.plugin.java.JavaPlugin

class main:JavaPlugin(){
    public var COOL_message = "send help"
    public var cool_SERVER = Bukkit.getServer()
    override fun onEnable() {
        cool_SERVER.broadcastMessage(COOL_message)
    }
}
``` I mean it lets me code in it, do you want me to export it?
topaz bay
#

Nah, thats fine

#

Huge

#

Although.. Kotlin?

obtuse gale
#

I had the kotlin stuff in my build.gradle as well

#

do you want me to remove it?

topaz bay
#

oh ok

#

You didnt have spigot stuff did you?

obtuse gale
#

na

topaz bay
#

Ok cool

#

Glad that works, thanks

obtuse gale
#

i removed everything else and it still works btw

#

except it tells me kotlins not configured ofc

topaz bay
#

Yeah

errant geyser
#

Day two of the campaign to put the staff team through hell looking through my code. I expect to be grilled like Piggy's siblings

remote goblet
hot hull
remote goblet
#

what the fuck is that

hot hull
#

Ctrl + *

remote goblet
hot hull
remote goblet
#

strength is an op potion effect

main nova
#

does anyone know how to make bungeecord show on the server list, the amount set and total members online in the entire server not just hub\

solemn monolith
#

use the bungeecord server ip? not the hub ip

main nova
#

ye its linked to bungeecord i[p

#

yet it shows hub instead for server list

autumn gust
#

Anyone can help me with someone join the voice call please.

prisma wave
#

most people won't help in voice. is it possible to type? also, #development

remote goblet
#

I need to create my own GUI Framework and Command Framework thinkDerp

onyx loom
#

and use gabys action utils

distant sun
#

Or use Matt's ๐Ÿคทโ€โ™‚๏ธ

remote goblet
#

or make my own

onyx loom
#

and why would u do that

#

itll be stinky

remote goblet
#

ur stinky EmiCry

onyx loom
#

hey thats mean dont say that :(

remote goblet
#

i'm sorry :(

#

i have asthma

#

so that's why im mean

onyx loom
#

oh my bad then

steel heart
#

Frosty ever tried to right lick User Settings ?

hot hull
#

Oh damn

pale shell
#

Frosty ever tried to right lick User Settings ?
@steel heart holy shit how long has that been a thing

steel heart
#

Idk very long lol

pale shell
#

I dont like it lmao

#

because i didnt know it was there i dont like it

steel heart
#

I donโ€™t know I mean itโ€™s efficient though

obtuse gale
#

Free html coders? Tagg me its only a front page of a site with 3 clickables which will send u to another site

steel heart
#

I think I know how to do that

topaz bay
#

@prisma wave I have web scripts for gradle dude

#

Its low key fire

prisma wave
#

Very fire

topaz bay
#

the paper script adds the repo and dependency for paper, and the github one adds a function for declaring a github package repository @prisma wave

#

I'm gonna see if I can make one for kotlin

prisma wave
#

That's very hot

#

Like

#

VERY hot

distant sun
#

what's voxmc?

quiet depot
#

sx's server

#

that web thing is a really good idea

#

surprised I've never seen it before

topaz bay
#

The web aspect of it isnt actually a thing

#

You can apply scripts from anywhere

#

Those were originally scripts I had in my gradle home, and I thought... hmm how can I make it possible to collaborate without having to put it in the actual project

prisma wave
#

That seems like it should be used a lot more

#

Kinda like maven archetypes

topaz bay
#

We will be using them a LOT with vox

quiet depot
#

what's with all the xtanna's in your discord

topaz bay
#

Especially since you can have not only private org repos, but private packages in them too

quiet depot
#

so many

topaz bay
#

...

#

Not even close

pale shell
#

Axtanna??

topaz bay
#

LOL

quiet depot
#

jeez

pale shell
#

What on earth is going on there

topaz bay
#

These are my people

#

smile

pale shell
#

Where would I be put in there

topaz bay
#

You wouldnt

pale shell
#

More cool people ofc?

#

I can get in >:)

#

@prisma wave whats the invite

prisma wave
#

Top secret

#

And I can't be bothered to find out

topaz bay
prisma wave
#

very ... Minimalist...

pale shell
#

VoxMc?

quiet depot
#

that capitalization is infuriating

prisma wave
#

not particularly descriptive names I must say

topaz bay
#

caps of what?

quiet depot
#

"Mc"

pale shell
#

Hop on my box pad

#

(:

prisma wave
quiet depot
#

you should finish your java tutorial

pale shell
#

Btw it's like 4am for me and I'm high so idk what I'm saying

#

He hasnt even started ;D

quiet depot
#

oh god

#

he's one of those

#

"sequel"

pale shell
#

He's made his tutorial in PowerPoint

quiet depot
#

google slides*

pale shell
#

PowerPoint

prisma wave
#

It's pronounced sequel

quiet depot
#

no

#

it's pronounced SQL

prisma wave
#

I have actually done some more of the course

pale shell
#

No it's pronounced skript

prisma wave
#

I'm currently describing the difference between primitives and objects

topaz bay
#

@quiet depot meh

#

I like it

pale shell
#

@prisma wave will it be completed before I die

prisma wave
#

Hard to say

#

probably

#

But don't count on it

quiet depot
#

will it be completed before dyescape?

prisma wave
#

My side project list contains about 30 different things

pale shell
#

Time to push a commission in to make it more fun for you >:)

prisma wave
#

Money is somewhat of a motivator though

pale shell
#

I mean, I'm only doing them to help you tbh

#

More shit for your portfolio

prisma wave
#

oh lol

#

my portfolio is kinda fine I think

pale shell
#

Also I'll use them on my big project

#

Aka the fat one

prisma wave
#

my GitHub has plenty of unfinished projects

#

ah yes

pale shell
#

You know of it right

#

I don't think you do...

#

I told you about the new bungee system right?

prisma wave
#

Bungee

#

?

pale shell
#

Mhm

#

:)

prisma wave
#

@quiet depot would you say lesson 2 is too early to go into primitives Vs objects in detail?

#

ie null, objects having state and functionality, etc

quiet depot
#

pff

#

lesson 2 is deconstructing the garbage collector, understanding reflection and instrumentation, and creating a mock jvm

prisma wave
#

ah yes

#

I'll get right onto that

#

Should be pretty simple

quiet depot
#

๐Ÿ‘

#

when talking about null

#

I often see tutorials mention shit like the "billion dollar mistake", don't bother with that shit

#

just get right to the point

prisma wave
#

Yeah it doesn't really achieve anything

#

I'm trying to keep everything fairly unopinionated so far

pale shell
#

Alex, I told you tho right

prisma wave
#

what

pale shell
#

I told you about the new bungee system right?

prisma wave
#

no

pale shell
#

How I'm fixing the lag

#

Teams get there own severs :)

prisma wave
#

Wdym

pale shell
#

There's gonna be teams on the server

#

If they reach a certain level or member count they get their own server

#

Less Lag ;)

prisma wave
#

That's quite cool

pale shell
#

Yeah, but the fun part is working out how the fuck I'm gonna do it lmao

prisma wave
#

that should probably not be a plugin

pale shell
#

I'll probably order mehself a dedi or 2

prisma wave
#

Well not exclusively

#

Docker is probably the way to go

pale shell
#

Hard to use?

ocean quartz
prisma wave
#

Docker is fairly simple @pale shell

#

@ocean quartz at least it's not like 10 lines of Java

ocean quartz
#

Exactly

#

Also pretty proud of turning a mention into a passable parameter

prisma wave
#

that's pretty cool

#

User IDs?

ocean quartz
#

Yeah, mention argument returns <!@ID> so simple regex to leave only numeric characters

prisma wave
#

ah yeah

#

Very nice

prisma wave
#

@quiet depot just finished lesson 2, mind checking it out and giving some feedback at some point?

quiet depot
#

link ples

prisma wave
#

It's the Google slides I'll DM you link

#

anyone else wants a look let me know, happy to take any feedback

topaz bay
#

its SO close to working 100%

prisma wave
#

Very nice

#

What's the not working bit?

topaz bay
#

Its finicky with the version, and sometimes gradle can get detached from knowing the plugin is defined

quiet depot
#

@prisma wave done

#

didn't have much to say this time

topaz bay
#

Like this...

#

The library version is implicitly 1.3.72 because it gets it from the plugin

#

But its saying the plugin version is null

#

LOL

ocean quartz
#

@prisma wave Can you link me as well?

prisma wave
#

@quiet depot thanks for the feedback, been through and changed most of it

#

@ocean quartz sure, one sec

topaz bay
#

@obtuse gale You still got that project open?

#

thoughts?

pale shell
#

@prisma wave just a suggestion it'll be cool if in brackets you put the numbers for the types of values..

obtuse gale
#

@topaz bay That gradle one?

topaz bay
#

@obtuse gale ye

obtuse gale
#

yyea I should

topaz bay
#

@obtuse gale can you update it to use this?

obtuse gale
#

kk

#

anyone in specific or?

topaz bay
#

any of them

obtuse gale
#

ye, i chucked the kotlin one on and its working

#

Can I put 2 on?

#

yes i can lol

topaz bay
#

You can use as many as you want xD

dawn island
#

I'm still debating is Kotlin a good language to learn.

obtuse gale
#

Is there a way you can make it so it puts the shadow plugin on?

#

Yes

quiet depot
#

prolly not if you're looking for a job in kotlin

#

great as a hobby though

topaz bay
#

@obtuse gale yes

obtuse gale
#

pls

dawn island
#

well imma download IJ again and start learning Kotlin.

topaz bay
#

@dawn island good.

dawn island
#

u got any good sites Ranald?

quiet depot
topaz bay
#

ew.... thats... not my name...

dawn island
#

Thanks @quiet depot, and fixed.

ocean quartz
#

@prisma wave Looking pretty good so far!
@topaz bay Ooh that's hot

topaz bay
#

@ocean quartz you know what else is hot?

#

the vox link is actually just serving from the master branch of that repo

#

So additions, changes, and improvements are HELLA easy

errant geyser
#

Day three of the campaign to put the staff team through hell looking through my code, it's getting kinda hot in here... I wanna be butchered and smoked like Piggy's relatives

heady birch
#
if (track.screenPoint != null && track.screenCallout != null) {

                //npe below -|
                this.repaint(
---->                   track.screenPoint!!.x.toInt(),
                        track.screenPoint!!.y.toInt(),
                        track.screenCallout!!.width,
                        track.screenCallout!!.height
                )
            }
#

Nevermind me just realised

#

Race conditions ๐Ÿ˜„

topaz bay
#

@heady birch dont use !!

lunar cypress
#

Have to if it's a var

heady birch
#

I can use .let instead apparently

lunar cypress
#

Oh yeah right

#

Because it doesn't depend on the variable anymore

#

But you should fix your race condition

heady birch
#

I don't like having to do !! inside a let

#
track.modea?.let {
  graphics.drawString(track.modea!!, 10, y)
}
lunar cypress
#

That doesn't fix anything lol

#

You now have the exact same problem as before

#

You want to use the argument

#

it

heady birch
#

Aha!

topaz bay
#

You dont have to, you can redefine the value and actually handle your nullability

heady birch
#

no

#

since there is no need to

#

if it's null then it shouldn't do anything

topaz bay
#

Except thats not what doing !! does

#

It literally inserts "if this == null, throw NPE"

#

Thats not doing nothing

heady birch
#

do nothing, npe, either

#

race condition is the main problem and easily fixable

topaz bay
#

Using !! is the antithesis of the kotlin type system

#

It is DEEPLY discouraged by the creators of kotlin, and arguably should not be in the language

#
val screenPoint = track.screenPoint
val screenCallout = track.screenCallout

if (screenPoint != null && screenCallout != null) {
    this.repaint(
        screenPoint.x.toInt(),
        screenPoint.y.toInt(),
        screenCallout.width,
        screenCallout.height
                )
}
#

Its literally a simple change like this

#

And you immediately reap the benefits of not LITERALLY writing an NPE into your code

heady birch
#

I see

#

And why can't you do the same without declaring a new variable?

topaz bay
#

Everytime you do something.somethingElse you are retrieving the value of somethingElse

#

If it is mutable, like it is in this case

#

It could have changed in the time between you do the null check, and the time you actually use it

#

Which would throw an NPE

heady birch
#

Ah yeah

topaz bay
#

So if you assign it, then you can check, and then use what you assigned

heady birch
#

They really thought this out didn't they

topaz bay
#

I would say its more like some people don't think it out

#

You get the warning to prevent the NPE, so instead you just manually throw the NPE yourself

#

BIG LOGIC

#

BIG!!!

heady birch
#

wait

#

you mean you shouldn't do this?

#
if (modea != null) {
    graphics.drawString(modea, 10, y)
} else {
    throw KotlinNullPointerException()
}
#

๐Ÿ˜…

#

equivalent of !!

#

Any cool kotlin alternative to System.currenttimemillis

#

like timeMs() or something

topaz bay
#

Not on the jvm

heady birch
#

And... prefer using .let or using the declare and null check?

topaz bay
#

let isnt composable in the way an if check is

#

There is no hurt in declaring the variable

#

In fact, no matter what you do, a variable is going to be declared there

hot hull
#

How would one check if the item isn't flying anymore? I get that I need to check the velocity, but unsure what exactly to check

topaz bay
#

You could probably just check if its on the ground?

hot hull
#

See I gotta detect when it hits an object, which could be a wall, so that probs wouldn't work

#

(probably explained it a bit oof above)

topaz bay
#

take its current velocity, and get the current location + velocity, check if the block there is air or not

#

Thats what I did for a paintball game I made

prisma wave
#

@heady birch there's measureTimeMillis which measures how long a lambda takes

heady birch
#

Interesting

prisma wave
#

also measureTimedValue that uses destructuring to measure the time taken while still returning a value

prisma wave
#

@pale shell good suggestion but once you get >32 bits the ranges start getting massive which makes it quite difficult to fit the numbers. The long range and the double range probably wouldn't even fit on the line (and most people wouldn't understand the floating point ranges anyway)

remote goblet
hot hull
#

?plsnoarrowcode

compact perchBOT
remote goblet
#

lol

obtuse gale
#

smh

#

import me.SXTaNna.iCAntCoDE.Main; Sx not even naming the main class main with a lowercase

lunar cypress
#

I tend to think this kind of code looks less like an arrow and more like some sort of space ship from an old arcade game

ocean quartz
#

@remote goblet Burn it!

remote goblet
prisma wave
ocean quartz
#

That if

remote goblet
#

blobshrug dont ask me i didnt make it

prisma wave
#

looping over a list of entities in O(n^2) like a boss

hot hull
#

You german Ori?

remote goblet
#

no

#

I'm looking at it for someone else mmHuhThinkMilk

hot hull
#

Why the hell would you write outputs in german..

remote goblet
obtuse gale
#

hey guys just looking for a code review on a project, lmk if theres any redundent/stupid code i should remove

remote goblet
#

Matt, this is in rwd if you magically feel like helping them

hot hull
#

Lmao Aj

remote goblet
#

looks perfectly fine Aj

#

AStaigaClap sx would be proud

prisma wave
#

perfect

old wyvern
#

Delete system32

#

If you are on windows that should fix the code

ocean quartz
#

Can you use instanceof on a switch?

obtuse gale
#

thanks, I reckon I could simplify it tho, instead of

println("Hello world"```
I could make it
```kotlin
var COOL_message:String? = null
COOL_message = "Hello world"
println(COOL_message)```
hot hull
#

Doesn't work Yugi, can you try it for me and make a gif so I know how

obtuse gale
#

just to make life easier

prisma wave
#

don't thiink so matt

old wyvern
#

Can you use instanceof on a switchNo

#

Only constants

ocean quartz
#

Sadness

old wyvern
#

welp

hot hull
#

Doesn't work Yugi, can you try it for me and make a gif so I know how
@hot hull

old wyvern
#

Doesn't work Yugi, can you try it for me and make a gif so I know howSure

hot hull
#

k thanks

prisma wave
#
when(variable) {
  is Player -> blah
}``` mmmm
remote goblet
#

couldn't they of simply done this thinkDerp

        for (World world : world) {
            for (Entity ent : world.getEntities()) {
                if (ent.getPassenger() != null)
                    return;

                if (!(ent instanceof ArmorStand) && !(ent instanceof Tameable) && !(ent instanceof Player))
                    ent.remove();;
            }

        }
#

it's still garbage

#

but its not as bad

prisma wave
#

well yes

#

although you'd probably want to continue rather than return

remote goblet
#

i always forget that

pale shell
steel heart
#

Lol

pliant eagle
#

hello i want make a plugin when i break 5 lapis_ore blocks player received a message

#

who can help me?

onyx loom
#

u dont have a way to tell when the player has broke 5 blocks. u need to add a counter for when they break it

topaz bay
#

player.getStatistic(Statistic.MINE_BLOCK, Material.LAPIS_ORE) % 5 == 0

#

if the amount of lapis ore theyve broken divided by 5 has no remainder ^

#

will be true for multiples of 5. ex 5, 10, 15, etc etc

old wyvern
#

rang

#

RanGgG

hot hull
#

Ah yes, I can see a lot.

old wyvern
#

Zoom in

#

๐Ÿ’€

#

xD

hot hull
#

See that's effort tho

heady birch
#

Give me the rang

old wyvern
#

idk what that kid is smoking

onyx loom
#

ye id have to open that in the web browser to do such thing

old wyvern
#

I need some of that

hot hull
#

Same, lemme read it first tho

#

(chrome still opening up)

old wyvern
#

xD

onyx loom
#

(32bit cpu)

hot hull
#

Kali, :c

ocean quartz
#

But he just wanted the Rang :c

old wyvern
#

Rang

onyx loom
#

c:

hot hull
#

Not sure if only upgrading the cpu to a 64 bit one is worth it Kali

old wyvern
#

Im actually gonna go rang him

#

rang

onyx loom
#

please

#

do not

old wyvern
hot hull
#

I love how you tried hiding the link but failed :p

old wyvern
#

welp

#

xD

#

meh

hot hull
#

DM me an invite to your server

old wyvern
#

hmm

hot hull
#

I'm confused rn

old wyvern
#

confused on what?

hot hull
#

What'd you dm me?

old wyvern
#

an invite

hot hull
#

Not seeing it..

old wyvern
#

Deleted xD

hot hull
#

Why

old wyvern
#

dm

pliant eagle
#

@topaz bay can you send me DM?

topaz bay
#

what the hell

#

LOL

#

its just if (blocks)

pliant eagle
#

i make this xD sorry im very new xD

#

sorry

pliant eagle
#

it's not working I already broke the 5 blocks and it didn't work

violet creek
#

I am probably just really tired, but I don't see anything wrong with that code @pliant eagle

Are you sure the event is fired? Test it by sending a message to the player each time the BlockBreakEvent is fired. If it's not sending the message, you haven't registered your event, but that's another problem. (More info here: https://www.spigotmc.org/threads/how-to-i-register-events.317921/)

If you do get the message, try sending the statistic the player already has to the player. What you do have to keep in mind is that the getStatistic is an int value, so in order to send that to the player you'll have to wrap it in a String#valueOf()

topaz bay
#

probably also worth noting, the statistic wouldnt be updated until after the processing of the event

#

So maybe this isnt the best way to do it

#

check if its lapis ore, and then do (player.getStatistic(Statistic.MINE_BLOCK, Material.LAPIS_ORE) + 1) % 5 == 0

#

notice the + 1

pliant eagle
#

I put a test message and the function is working correctly, I also tested that +1 and it still doesn't work

remote goblet
#

then make it work lOl

high hemlock
#

hey guys im messign around creating a plugin, and how am i to in the editable config file that generates in the plugins folder, make it so that the # text i put in there shows?
because it keeps dissaprearing

prisma wave
#

welcome to spigot

#

saveConfig removes comments

high hemlock
#

oh

#

so how do i keep the comments inside?

#

because one line showed

prisma wave
#

basically

#

don't do saveConfig() at all

#

otherwise it'll get removed

high hemlock
#

but doesnt that mess anything up?

prisma wave
#

depends what you want to do

#

modifying the config will need saveConfig

#

which will remove comments

#

so...

high hemlock
#

hmm

#

so theres no work around?

#

because the config needs to edited to change things in the plugin but i need the notes to help with what each thing is for

#

saveDefaultConfig() works :>

prisma wave
#

oh yeah that'll work at first

high hemlock
#

at first?

prisma wave
#

if your plugin does getConfig().set(blah) you'll need saveConfig()

#

which will remove the comments

high hemlock
#

luckily i dont

#

but thanks for the heads up

prisma wave
#

๐Ÿ‘

high hemlock
#

tysm

formal pilot
#

Wtf is this shit in #705633782811590666 people are expecting fully customizable pets, abilities, lessons, anticheat and a prison core for $5

ocean quartz
#

JDA youtube tutorials are actually decent, this one even uses final
Why isn't spigot ones the same ๐Ÿ˜ข

frail glade
#

No one uses spigot anymore

topaz bay
#

@ocean quartz youre using a yt tut for JDA?

#

How could you.....

frail glade
#

Well, Dr. Sxtanna wasn't available.

ocean quartz
#

Nah, was checking the hastebin stuff, and this one popped in so decided to check it out

topaz bay
#

Why is kotlin so good

ocean quartz
#

Fucking love Kotlin, had to register Int on my command stuff for JDA and was thinking "ugh do I need guava for Ints.tryParse" but remember it's Kotlin and it has "".toIntOrNull()

topaz bay
#

Its simply TOO good

#

what the hell...

#

I just jumped up to an older message

prisma wave
#

It's actually unfair

#

On all the Java devs

#

What they're missing out on

topaz bay
#

And to imagine most of them think Java is superior

prisma wave
#

Delusional

#

poor guys ๐Ÿ˜”

ocean quartz
#

haters

topaz bay
#

I'm not gonna say this is the peak of beauty...

#

But like...

prisma wave
#

you can override unary +?

topaz bay
#

RUDE

#

Yes...

prisma wave
#

woah

#

Never knew that

topaz bay
#

You can override every operator...

prisma wave
#

yeah but unary plus is basically never used

#

barely remembered it existed until now

topaz bay
#

Its so great

pale shell
#

@prisma wave i thought you were the Kotlin Master

errant geyser
pale shell
errant geyser
#

Clearly

pale shell
#

I'm sure the staff will fix it ๐Ÿ‘€

high hemlock
#

hey how to i change player name in chat?

#

p.setDisplayName(name);

#

p is sender

#

player

pale shell
high hemlock
#

ty

prisma wave
#

@pale shell nobody's perfect

pale shell
#

???? @prisma wave

prisma wave
#

@prisma wave i thought you were the Kotlin Master

pale shell
#

Ah yes

#

But I'm perfect in java tho

#

Perfect at breaking everything

#

@prisma wave

prisma wave
#

๐Ÿ‘

pale shell
ocean quartz
#

When contains ๐Ÿ‘Œ๐Ÿป

prisma wave
#

you can also use in

#

when { "pastebin.com" in link}

#

Arguably nicer

ocean quartz
#

Ooh even better

onyx loom
pale shell
#

1 Blocked Message

#

๐Ÿค”

ocean quartz
#

Trying to do a converter like Cube did

onyx loom
#

ah i see

#

so ur converting the trash into the good ๐Ÿ˜Ž

topaz bay
#

@ocean quartz why when?

ocean quartz
#

More websites, though i can only think of 2 so far, so if i can't think of more i'll not use when

topaz bay
#

Wouldnt it make more sense to store them in a map, and compose what to do with a function?

#

infinite extensibility without the need to change logic code

ocean quartz
#

Ooh good idea yeah

ocean quartz
#

Could even take it from the config that way

topaz bay
#

What would the composition even be in this context?

formal pilot
#

HeY I WiLl MAYBE GiVe $5 FoR YoU To TEaCh Me AnD 2 OthErS JaVa

ocean quartz
#

Basically a list of websites it can convert from

formal pilot
#

"[Service] Development Lesson
[Request] Hello! I own a server and all 3 of the owners are learning how to code with IntelliJ. We barely know much and want someone to teach us a little bit of the basics for 30 minutes. After the lesson we MIGHT pay you $5 depending on if it helped us enough. We would like a lesson for 30 minutes to teach us the basics so we can make a Enabled Message, Disabled Message, Config and a Few Basic Commands like /info which will give you the server information.
[Budget] $5

DM me if interested!"

#

like wtf

topaz bay
#

@ocean quartz No, I mean like... what would the functions be?

#

You were checking if it contained pastebin, what would you do with that knowledge?

ocean quartz
#

Well since each website has it's own way of getting the data from, i'll need to check what each does, for example for pastebin i'm trying to convert the link like pastebin.com/asdasdsa to pastebin.com/raw/asdasdsa so I can get the raw data

topaz bay
#

Ohhhh I see...

#

Well now Im questioning the contains

ocean quartz
#

It gets all the links in a discord message, the links could be anything, so the contains is just to check what is the website in the link
Tbh probably not the best way of doing it

topaz bay
#

progressive index search?

pallid gale
#

Trying to do a converter like Cube did
@ocean quartz oh hi

topaz bay
#

store the current index, and find the index of that value in the string offsetting the current, and run that until you can no longer find indexes

#

Could even get the actual value of the url with a space index search, offset by the link index

ocean quartz
#

Gotcha, I'll try that
@pallid gale Hope you don't mind me stealing that idea xD
Just really dislike other pastes and most people on my server use pastebin

topaz bay
#

racist

pallid gale
#

lol idm, ill find our list of pastes

#

const regex = /pastebin\.com\/([0-9a-zA-Z]+)|hastebin\.com\/([0-9a-zA-Z]+)|hasteb\.in\/([0-9a-zA-Z]+)/;

#

Those are the one we can currently convert

#

Then from that we can grab the raw url https://${matches[0].replace(${matches[1]}, "")}raw/${matches[1]}

#

https://${matches[0].replace(`${matches[1]}`, "")}raw/${matches[1]}

topaz bay
#

nice

pallid gale
#

Barry also has other ways of reading paste services that don't use /raw/ but i won't go into that

topaz bay
#

question @pallid gale

pallid gale
#

hi

topaz bay
#

why dont you have the first group collapsed?

pallid gale
#

idk that's just how i did it

#

i hate regex

#

it works so its fine

topaz bay
#

Now I'm no mathematician, but that difference seems astronomical

pallid gale
#

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

#

Pretty sure it's just how i built it, cause it only did pastebin to start with

#

just never reorganised it

topaz bay
#

Do they actually all use the same uuid pattern?

#

Thats kinda cool

pallid gale
#

probs all the same code tbh

topaz bay
#

=paste

compact perchBOT
#
HelpChat Paste

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

pallid gale
#

just a different ui

topaz bay
#

interesting

#

Are you a fan of the twitch style identifier?

pallid gale
#

no idea what that is

topaz bay
#

Its like they have a word database, and it just throws a bunch of actual words together

pallid gale
#

oh that thing

#

sharex can do it iirc

topaz bay
#

I believe github also uses this for repo names

#

but formatted differently

quiet depot
#

hehe

pallid gale
#

kahooot

topaz bay
#

I fucking love kahoot

quiet depot
#

random spin username

topaz bay
#

Has anyone made kahoot in block game?

#

Or in discord even?

#

That could be fun

quiet depot
#

probs not

#

cube get on it with bazza

topaz bay
#

I would think probably yes

#

NO

#

My idea hoe

#

back off

quiet depot
#

2 bad

pallid gale
#

=kahoot start

quiet depot
#

u already know cubes impl will be nicer

topaz bay
#

...

#

That is objectively incorrect

quiet depot
#

@compact perch where de kahoot at

compact perchBOT
#

@quiet depot, I didn't get that. Can you say it again?

topaz bay
#

nightmare. fuel.

quiet depot
#

@pallid gale is ur triangle emote taller than thr others?

pallid gale
#

yeah they're all over the shop

quiet depot
#

the shop?

#

wat

pallid gale
quiet depot
#

fair dinkum

topaz bay
#

Are you fucking british!?!??

#

Have you been british this entire time????

quiet depot
#

most australians sound british when they be mad or speaking fast

topaz bay
#

they do be mad doe

ocean quartz
quiet depot
#

ez

topaz bay
#

hot

pallid gale
#

noice

quiet depot
#

can it do the stupid pebblehost paste too?

ocean quartz
#

Currently only pastebin, haven't dove into the other ones yet xD

quiet depot
#

gj anyway

topaz bay
#

A+

#

new challenge

#

send it as one message

#

Wait, is it one?

ocean quartz
#

Ty ;p
Gotta make it better though currently doing it in a weird way, for example to add the /raw in the middle of the link.. you'll judge me
that A+ will be lowered to a D
URL("https://pastebin.com/raw${URI(link).path}")
THOUGH this was just a test, i just wanted to get it working before I go to bed xD
And yeah it's only one message

#

joinToString("\n")

topaz bay
#

You...

#

Dare.

ocean quartz
#

Told you xD

topaz bay
#

To insult me with this

ocean quartz
#

I'll do it better tomorrow! It's 4am i just wanted to get it done xD

#

Now to convert from https://mcpaste.io/ hmm, it doesn't seem that hard

#

It's always added the same way, with the numbers on the the td line-number and the actual content on a td line-content
Just would need to cycle through the html and get the line-content data
not optimal, but could work

#

We're sorry but MCPaste doesn't work properly without JavaScript enabled. Please enable it to continue.
.<

pallid gale
#

yeah do you want the answer?

#

or you wanna work it out urself?

ocean quartz
#

I'll try doing it myself ;p

pallid gale
#

aight ping me if u want it ๐Ÿ˜‰

ocean quartz
#

Sure thing, that'll be a challenge for tomorrow me though ;p

storm latch
old wyvern
hot hull
#

Already laughed at in offtopic

old wyvern
#

๐Ÿ˜‚ ๐Ÿ˜‚

remote goblet
#

i enjoy that i rarely use spigot javadocs

pale shell
#

@compact perch hi

#

rude barry

remote goblet
#

@compact perch Hello

#

okay

#

rude

#

I understand why you'd ignore untouched

#

but me? EmiCry

pale shell
#

I understand why you'd ignore untouched
@remote goblet ๐Ÿ˜ 

remote goblet
#

mmSipTeaMilk you know ily

pale shell
#

no you dont

#

๐Ÿ˜ 

remote goblet
#

you right

pale shell
#

i mean i wouldn't know I don't have emotions so

buoyant vortex
#
package me.ItchyDitchy.HelloWorld;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    @Override
    public void onEnable() {
        
    }
    
    @Override
    public void onDisable() {
        
    }
    
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args ) {
        if (label.equalsIgnoreCase("hello")) {
            
            if (sender instanceof Player) {
                Player player = (Player) sender;
                player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&e&l[!]&e Hello Player!"));
                return true;
            } else {
                sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&e&l[!]&e You have to be a player to use this command!"));
                return true;
            }
            
             return false;
        }
    
    }
}

halp

obtuse gale
buoyant vortex
#

Errors: This method must return a result of type boolean
Unreachable Code

obtuse gale
#

Also give us some details

buoyant vortex
#

I am new to this xd

obtuse gale
signal tinsel
#

Should I give kotlin a try?

heady birch
#

yes

#

real question is

#

why have you not already

signal tinsel
#

...

#

You dipshit lmao

pale shell
#

@signal tinsel just do it no questions

hot hull
#

Also, @distant sun Have you fixed this yet?

>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'ACTIONBAR'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'BROADCAST'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'CENTERBROADCAST'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'CENTERMESSAGE'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'MESSAGE'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'CONSOLE'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'CLOSE'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'JSON'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'PERMISSIONBROADCAST'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'PERMISSION'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'CHAT'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'PLAYER'
>.... [12:13:44 WARN]: [Pouches] [ActionUtil] Overriding the action with ID 'SOUND'
distant sun
#

??

#

I don't have that dude

signal tinsel
#

Hm Gaby

hot hull
#

It overrides default actions, so it always sends that, but I'm not sure why..

signal tinsel
#

Say 1 plugin adds an action

#

Can another plugin use that same action?

distant sun
#

no

signal tinsel
#

Aww rip

#

You should try n add support for that

distant sun
#

because you shade it

signal tinsel
#

You should be able to somehow add that

#

Using some static shit

distant sun
#

๐Ÿคท

signal tinsel
#

That doesn't get moved into anotehr package by maven

onyx loom
#

frosty that sounds like a you problem