#dev-general

1 messages · Page 106 of 1

errant geyser
#

Sx why does your mic sound you're recording it in a steel container?

#

On the first clip

ocean quartz
topaz bay
#

Probably because I peaked it

onyx loom
#

u play on ps4 right matt?

ocean quartz
#

Yeah

onyx loom
#

ps4 share button quality is 💩

ocean quartz
#

Extremely

#

I got a capture card but it's getting dust for like 4 years

#

Actually imma go play some warzone

jovial warren
#

I'm guessing so

ocean quartz
#

Pretty sure you can do that in the field without needing to do in the init

jovial warren
#

setBuffer() is void

#

yeah this isn't set up well

ocean quartz
#

Oh yeah good point

jovial warren
#

ideally it should either have a constructor taking a ByteBuffer, and/or have setBuffer() return the class

prisma wave
#

😦

#

how does he do it

ocean quartz
#

@topaz bay That's pretty cool

topaz bay
#

right

#

its pretty old at this point though

topaz bay
#

@prisma wave this could be good for you to play around in go with

#

Its like processing

prisma wave
#

ooh

#

that looks pretty cool

jovial warren
#

do you need to download sources and documentation with gradle or is that done automatically

topaz bay
#

should be automatic

prisma wave
#

assuming there are any provided ofc

jovial warren
#

alright

jovial warren
#

also, anyone know if discord.js has any good music players?

oak raft
#

Hey, these imports don't seem to be working

#

This is what they're attached to

hot hull
#

Cause you need spigot, instead of spigot-api

oak raft
#

wym by that

hot hull
#

Ohh, those methods don't exist on your version

oak raft
#

I'm making this for 1.12.2

#

I already put the spigot 1.12.2 jar

#

so I'm assuming the methods need to be updated?

jovial warren
#

In cryptography, a nonce is an arbitrary number that can be used just once in a cryptographic communication. It is similar in spirit to a nonce word, hence the name. It is often a random or pseudo-random number issued in an authentication protocol to ensure that old communicat...

#

"cryptographic nonce"

#

tf haha

prisma wave
#

lol

#

the name was probably made by americans

jovial warren
#

anyone know how to use emotes in JDA?

oak raft
#

Oh, I should've mentioned that I'm updating an old plugin made in 1.7

ocean quartz
#

1.7 dios

#

@jovial warren You can use the mention for emotes, do \:emote: on chat and you'll get the code, for example theotherpig -> !theotherpig

oak raft
#

matt its really old

#

was updated

#

by someone else, but it was only 1.10-1.11

#

so im trying to make it 1.12.2

jovial warren
#

what's the number?

#

the channel ID or the emote ID?

prisma wave
#

The emote id

jovial warren
#

how do I get the emote ID?

remote goblet
#

also random really late not

#

pls no arrow code

jovial warren
#

there isn't any arrow code

remote goblet
jovial warren
#

HAHAHAHA

onyx loom
#

waduhek

remote goblet
#

doing that can easily lead into arrow code

jovial warren
#

yeah I'm not doing that

remote goblet
#

was talking to remence

onyx loom
#

that is quite the disgustingness

jovial warren
#

the only thing is, is that it's a bit all over the place since it's essentially converted Java code lol

#

also, what mention @ocean quartz ?

#

MessageBuilder#mention?

oak raft
#

Ori huh?

jovial warren
#

arrow code

oak raft
#

whats that

jovial warren
#

when your code looks like the himalayas

#

or like an arrow

oak raft
#

tf lmaoo

#

it's not my code 😛

jovial warren
#

it's basically nested if statement within nested if statement within nested if statement

oak raft
#

yeah makes sense

#

just noticed that

#

but I still have that problem 😦

#

idk how to fix it

jovial warren
#
if (condition) {
    if (otherCondition) {
        if (otherOtherCondition) {
            if (otherOtherOtherCondition) {
                // do something
            } else {
                // do something else
            }
        } else {
            // do something else
        }
    } else {
        // do something else
    }
} else {
    // do something else
}

that's arrow code

oak raft
#

so how do you fix it

#

(arrow code)

jovial warren
#

you just don't do that

#

sounds like one of those things that is much harder than it looks, but it really isn't

#

if you take another look at it, you'll probably be able to find a fix

prisma wave
#

prioritise if-not-return over if-so-continue @oak raft

jovial warren
#

that'll work

prisma wave
#
if(!condition) {
  //error message
  return;
}
//the rest
jovial warren
#

hey KM you might know the answer to my question

prisma wave
#

I might

jovial warren
#

how do I append an emote with MessageBuilder?

#

because I'm guessing it's IMentionable

#

but idk how I'm supposed to get an Emote instance

#

actually nvm hold up

#

Guild#getEmoteById exists

#

⏸️

prisma wave
#

👍

jovial warren
#

now how do I use bold text 🤔

prisma wave
#

**

jovial warren
#

and that works?

prisma wave
#

you wrap the text in **

#

the same way you do normally

jovial warren
#

okay

ocean quartz
#

@jovial warren No, like literally just pasting ![theotherpig](https://cdn.discordapp.com/emojis/656735249967087626.webp?size=128 "theotherpig") in the message will turn into the emote, and to get the id is like i said \:emote: in the chat

jovial warren
#

:Youtube:

#

lol

#

okay

ocean quartz
#

By emote I meant the actual emote xD
Like \ theotherpig

jovial warren
#

I did put in the actual emote

#

there ya go

#

but the thing is, I can't use that

#

is there a way to register custom emotes just for the bot's use?

ocean quartz
#

Hmm for emotes for the bot to use I normally cache them on guild ready event

jovial warren
#

where's that available from?

ocean quartz
#

What is your GitHub I can give you access to my bot's code

jovial warren
#

just BomBardyGamer

ocean quartz
jovial warren
#

cheers

#

also, that wasn't what I was saying

#

about the emotes

#

what I was saying is that for example Rythm uses it's own youtube emote

#

or can bots use emotes from other servers they're in?

ocean quartz
#

They can use from servers they are in I think

jovial warren
#

okay

#

so should be fine then

#

\⏸️

#

\⏸️

#

wait tf

#

they're resolving to unicode characters

#

⏸️

#

also, can't I just right-click and copy ID?

ocean quartz
#

No, i thought so too, but it gives you the message id instead

jovial warren
#

ah okay

#

because if I put \:pause_button: in chat it resolves to the pause button unicode character

ocean quartz
#

\⏸️

#

Interesting yeah, i think it only works with custom emojis?

versed ridge
#

You can just copy that

jovial warren
#

:~⏸️

#

@versed ridge no you can't

#

it just resolves to the message ID

versed ridge
#

You can copy \⏸️

#

?

jovial warren
#

copy ID returns the message ID

versed ridge
#

no

jovial warren
#

yes

versed ridge
#

Take your mouse

#

click and drag over that

jovial warren
#

oh you want me to do something different? okay

versed ridge
#

and ctrl c

jovial warren
#

yeah but that doesn't paste properly

#

also I don't think that's how it's supposed to work

versed ridge
#

What are you trying to do with it

jovial warren
#

paste it directly in to IntelliJ

#

\⏸️

#

wait will unicode characters get resolved by discord?

versed ridge
#

You're trying to react to a message with that right?

jovial warren
#

no

#

I'm trying to put that IN a message

#

This is my bot's message:
Paused ⏸️

#

it's sent when you pause the music the bot is playing

versed ridge
#

Yeah you can just paste that in the message

#

Just tried it

jovial warren
#

paste what? the unicode char?

versed ridge
#

Yeah

jovial warren
#

yes it worked

#

thanks

#

@ocean quartz any way to make optional args?

#

like args that can be sent, but aren't required

versed ridge
#

You're using his framework right?

jovial warren
#

yep

versed ridge
#

There's @Optional

ocean quartz
#

@Optinal annotation on the parameter

jovial warren
#

okay thanks Matt

#

how do I send a message? just update the message variable?

#

e.g. message = "My Custom Message"

#

actually no, message is a val

#

@ocean quartz how do I change the message being sent?

#

or should I say, send a response message

topaz bay
#

You would send the message to the channel

jovial warren
#

so message.textChannel.sendMessage()? seems a bit stupid tbh

#

maybe message.editMessage() might work actually

topaz bay
#

That would edit the user's message wouldn't it?

ocean quartz
#

You cant edit their message

jovial warren
#

yeah it would you're right

frigid badge
#

they’ve and they have is the same language though

#

@topaz bay

prisma wave
#

exactly

topaz bay
#

This does not translate the code to kotlin

prisma wave
#

I know it doesn't

topaz bay
#

Its not switching the language

prisma wave
#

I know that

#

but making 1 language look like another, speaking personally would just make development more confusing

topaz bay
#

Its not making it look like another

frigid badge
#

yes it is

prisma wave
#

it is though

frigid badge
#

val is in kotlin and not in java

topaz bay
#

It really isn't

prisma wave
#

not necessarily kotlin

#

but a language that isn't java

topaz bay
#

Some of these folds do not exist

frigid badge
#

I know

topaz bay
#

var is in java

#

Does that mean its still making it look like kotlin?

prisma wave
#

but var is an actual language feature

#

that you type

frigid badge
#

it isn’t becoming a different language it just has traits of other languages

prisma wave
#

it resembles a language that isn't java

topaz bay
#

As if thats a problem for a fold?

prisma wave
#

well... yes it is...

frigid badge
#

it could cause confusion

prisma wave
#

as I've said, if you're writing java you expect to see java. making java code suddenly look different would most likely make it more difficult to understand

#

I often find myself confusing kotlin and java just from muscle memory, having something like this would make that worse

topaz bay
#

Literally everything it folds increases the readability of what it is

#

Simply by using more concise syntax

#

Like I said before, install it and actually use it

#

Instead of arguing from hypotheticals

prisma wave
#

conciseness does not mean readability

topaz bay
#

WHAT

#

Thats literally 90% of the logic behind kotlin's design

#

Youre just talking bullshit now

prisma wave
#

it doesn't necessarily mean readability

topaz bay
#

Nothing "necessarily" means ANYTHING

frigid badge
#

I’m just gonna say we aren’t gonna agree on this lol

prisma wave
#
for(int i=0;i<100;i++)System.out.println(i);
``` this is consice. not readable
topaz bay
#

That is not "concise"

#

concise
giving a lot of information clearly and in a few words; brief but comprehensive.

#

This does not give a lot of information in few words

#

It is not brief

#

And it is not comprehensive

prisma wave
#

my problem is that it's not consistent. some sort of transpiler that would actually translate val to final var would be fine, but having java code made to look like a different language sometimes is my problem

topaz bay
#

It is by definition, not concise.

prisma wave
#

if you are writing java, you expect to read java. if you don't like how that language looks, use a different one rather than sometimes making java look different

#

i'm sure it's fine for some people but we're gonna have to agree to disagree here. I think it's less readable

#

on an unrelated note, which do you think is better for storing functions? A Multimap<String, Function> or a Table<String, Parameters, Function>

quiet depot
#

what is String, and Parameters?

#

actually I think I understand

#

table > multimap

#

@prisma wave

prisma wave
#

ah alright

#

how come? Faster lookup?

#

String would be the name, Parameters would be the function description (params and return type)

quiet depot
#

well I assume key based is faster than an iteration match (multimap)

#

@prisma wave beep boop

prisma wave
#

Yeah that makes sense

#

Thanks

hot hull
#

ngl this confuses the hell out of me in kotlin
player.server.info

#

Like damn have you not heard of () ?

prisma wave
#

whats confusing about that lol

#

You can literally do it in Java as well

hot hull
#

first glance you'd think it's fields

#

Instead of methods

prisma wave
#

There's not really a big difference

#

Why write getServer when server will do?

hot hull
#

idk

prisma wave
#

I see your point but remember kotlin isn't java

#

It doesn't follow the same rules

hot hull
#

Yea ik

prisma wave
#

When you think about it getters are pointless for example

#

unless you've got some custom functionality

hot hull
#

Ah yes, just use static :eeee:

prisma wave
#

😳

regal gale
#

Lol

hot hull
#

||Joking btw, don't kill me||

regal gale
#

|| 🗡️ ||

prisma wave
#

||static doesn't exist in kotlin||

old wyvern
#

bm

prisma wave
#

Yea

old wyvern
#

I have a question about coroutines

prisma wave
#

Ask away

#

I might be able to answer it

#

Coroutines are kinda confusing

heady birch
#

Stop complaining

prisma wave
#

Lol

heady birch
#

If your not using kotlin your opinions on kotlin do not count

#

Thank you

old wyvern
#

Uhh so when a suspend function is called basically it just runs a new couroutine task on any of the threads in the thread pool then return with a callback right?

prisma wave
#

not exactly

#

A suspend function technically has nothing to do with coroutines

old wyvern
#

wait what?

prisma wave
#

Suspend just means that you can pause the function and resume it later

old wyvern
#

uhh I read that suspend functions can only be used in coroutines

prisma wave
#

Yeah they can

#

but technically they are different things

old wyvern
#

They explained it as the compiler splitting the coroutine into pieces then store current point in a statemachine and then calls back the same function with the new state to execute the next piece

#

Honstly im confused af xD

prisma wave
#

that's pretty much what happens, except it's the suspend function that is split

#

The coroutine is responsible for executing the function

old wyvern
#

so like since the thread runs the next task while something is suspended... where the hell does the suspended function run?

#

xD

prisma wave
#

when it reaches something blocking, it suspends the function, does the blocking operation on another coroutine (I think), then resumes it once it's complete

old wyvern
#

ah yes that was what I asked

#

Thanks man

prisma wave
#

Np

#

Basically it's the bukkit scheduler on steroids

old wyvern
#

xD

#

but kinda every function like schedules a new task to comeplete it at some other time

#

welp

prisma wave
#

Yeah it's kinda confusing

heady birch
#

now- writing database connecting without spring isntead with hikari

prisma wave
#

Best way to learn is just to try it out

heady birch
#

I havnt done this for ages

#

last time I did I had a dreaded "DatabaseManager"

prisma wave
#

Ha

#

classic

heady birch
#

How big is just spring boot + jpa

#

Its a client app not a server so

prisma wave
#

I'd guess about 20Mb maybe

#

Hibernate is about 10 afaik

heady birch
#

Oof

old wyvern
heady birch
#

😮 nice

prisma wave
#

Interesting

#

Is it basically an ORM?

old wyvern
#

It has a lot to be finished tbh

#

Kinda yes

prisma wave
#

Ah cool

old wyvern
#

Basically trying to provide a use as is Map like implementation

prisma wave
#

That sounds useful

old wyvern
#

🙂

prisma wave
#

Is it only for SQL?

heady birch
#

Remember to add batching!

old wyvern
#

have to add nosql suppourt

#

currently trying to finish sql part so i can make sure the field collectors and stuff work properly

prisma wave
#

Ah cool

#

If you're adding nosql which I imagine is mongo could you add JSON flatfile too?

old wyvern
#

Yes

#

Sure

prisma wave
#

Sick

#

I'd use that

old wyvern
#

😁

prisma wave
#

Maybe even add support for custom backends

heady birch
#

🤢

prisma wave
#

What's wrong with that?

old wyvern
#

wdym?

prisma wave
#

Have an abstraction so it can work with any persistence method

#

So people could add yaml support if they wanted

#

or redis

#

Etc

heady birch
#

flatfile json

old wyvern
#

Sure 👌
Redis will already be suppourted btw

#

as in i mean its planned to be implemented

prisma wave
#

ah alright cool

heady birch
#

NSSF

#

niall serialized storage file

old wyvern
#

😂

heady birch
#

Damn I havnt written proper sql for ages

#

I have fallen victim to the power of hibernate

old wyvern
#

lol

#

O the framework also adds basic sql statement builders too btw

prisma wave
#

Ooh nice

heady birch
#

I wanna try out this config4j thing

old wyvern
#
new SelectStatement(tableName).column("test").column("somethignElse").where("id", someThing).executeQuery(ISQLConnector)```
heady birch
#

do you call your friends IFriend?

#

do you call people IPerson

#

no

#

Jks 🙂

#

I kinda like the I for interface thing

hot hull
#

NoFriends :c

old wyvern
#

There are 2 types

hot hull
#

NoPeople

#

That's what I call it

old wyvern
#

Pooled and just the normal one welp

#

That's what I call it
lmao 😂

obtuse gale
#

public void cancelOpenOnPlacement(BlockPlaceEvent event) {
if(event.getBlock().getType() == (Material.ENDER_CHEST)) {
onOpenEnderChest(null);
event.setCancelled(true);
}
}

#

what do I put in onOpenEnderChest();

heady birch
#

?

obtuse gale
#

I think thats where the mistake is

heady birch
#

what does onOpenEnderChest do?

#

no

obtuse gale
#
    @EventHandler
    public void onOpenEnderChest(PlayerInteractEvent event) {
        if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
            if (event.getClickedBlock().getType() == (Material.ENDER_CHEST)) {
                event.setCancelled(true);

                Location location = event.getClickedBlock().getLocation();
                changeChestState(location, true);
                openEnderChests.put(event.getPlayer().getUniqueId(), location);
               
            }

            Player player = event.getPlayer();
            if (extrainv.containsKey(player.getUniqueId())) {
                // already has a saved inventory
                player.playSound(player.getLocation(), Sound.CHEST_OPEN, 1.0F, 0.8F);
                player.openInventory(extrainv.get(player.getUniqueId()));

                return;```
heady birch
#

Dont think you should do that

#

BlockPlaceEvent is a subclass of PlayerInteractEvent?

obtuse gale
#

yes

heady birch
#

onOpenEnderChest(event);

obtuse gale
#

ohh ttyy

#

sm

#

The method onOpenEnderChest(PlayerInteractEvent) in the type Enderchest is not applicable for the arguments (BlockPlaceEvent)

prisma wave
#

It's not a subclass

obtuse gale
#

no I meant another class in the same class

prisma wave
#

You should refactor the method to accept a combination of the 2

#

Eg accept a Player and a Cancellable

obtuse gale
#

ohh srry

heady birch
#

Ugh i dont like this

#

relationships so much easier with hibernat

prisma wave
#

You could use SimpleORM or whatever it's called

hot hull
#

What should I use for storing queues?

#

(List, Set, ?)

heady birch
#

Queue

hot hull
#

Which kind?

heady birch
#

what kind of queue is it

#

LinkedBlockingQueue

#

ArrayBlockingQueue

#

or if you want priorites use PriorityQueue

hot hull
#

Not the queue I meant, referring to a waiting queue (not the actual queue object)

heady birch
#

but a queue is a queue

#

literally

#

you just .add to it like a list

#

then .poll it for the next item in the queue

hot hull
#

Not sure which one would suit it most

heady birch
#

List, Set, Queue? or queue implementation

#

well a Set would be pretty wack

#

loose ordering

jovial warren
#

hey @ocean quartz any idea why I get Nothing found by [Ljava.lang.String;@39881f32 when I try to run !play with the optional argument of trackURL: Array<String>?

#

I've tried toString(), joinToString() is what I'm using at the moment, can't seem to figure it out

#

the Nothing found by part is something I put in there as part of the message, but it's the String displaying as an object that's confusing me

heady birch
#
Connection connection = null;
try {
    connection = connectionSource.getConnection(); 
} catch (final SQLException exception) {
    exception.printStackTrace();
} finally {
    try {
        //TODO: close result set as well
        connection.close();
    } catch (final SQLException exception) {
        exception.printStackTrace();
    }
}
#

this is what i hate

jovial warren
#

if you use ORM software that's handled for you

#

I think Spring might have it built-in, but if it doesn't, or you don't want to use it, here's what I recommend:
ORMLite for Java
Exposed for Kotlin

#

also, for this music bot I'm working on, I'm very tempted at this point to just write my own library

prisma wave
#

@heady birch use kotlin ```
connectionSource.connection.use { connection ->
//some query
}

heady birch
#

cool

#

maybe you should have told me that 10 months ago 😦

#

also

#

does .use close automatically?

prisma wave
#

Yes

#

it's like try with resources

hot hull
heady birch
#

It makes no sense

#

Package level extensions are way better

prisma wave
#

util classes are a nono

errant geyser
#

why?

prisma wave
#

there's no point

#

for one thing, static doesn't exist

#

which makes things problematic

#

and for another thing there are better ways of doing it

#

as Niall said file level extension functions are usually the way to go

hot hull
#

Go yell at Glare

errant geyser
#

:/

onyx loom
#

😮

#

is it in vp?

prisma wave
#

eg (StringUtil.java) ```java
public class StringUtil {
private StringUtil() {
}

public static String color(String s) {
return ChatColor.translateAlternateColorCodes('&', s);
}
}would be replaced with (Strings.kt)kotlin
fun String.color() {
return ChatColor.translateAlternateColorCodes('&', this)
}```

hot hull
#

No Kali

#

DQ

prisma wave
#

ah.

#

that one...

hot hull
#

That one yes

prisma wave
#

yeah...

#

uhh

hot hull
#

I saw you contributed

onyx loom
#

lol?

hot hull
#

Is that why it's broken :kek:

prisma wave
#

i converted it all to kotlin

#

broken? D:

hot hull
#

So you were the devil that did that

prisma wave
#

yep 😎

errant geyser
hot hull
#

Thanks, I've been struggling for 2 hours trying to figure out what shit is

#

;C

prisma wave
#

what on earth is this

onyx loom
#

for what

prisma wave
#

you're welcome :)

errant geyser
#

Aids

#

Its aids

prisma wave
#

i got paid to do it as well

hot hull
#

wow

#

Disguisting

prisma wave
errant geyser
#

after I finish updating it?

onyx loom
#

bRuH

prisma wave
#

i'm very proud @hot hull

hot hull
#

smh

prisma wave
errant geyser
#

Yo KM I'll officially use Kotlin if you can give me actual reasons to use it

prisma wave
#

hmmmmm

#

cleaner syntax

errant geyser
#

Not just "it good"

onyx loom
#

iT gOoD

hot hull
#

It's not

prisma wave
#

null safety as part of the type system

errant geyser
#

Called it

hot hull
#

Like the fuck is this?

if (!file.exists()) {
            getResourceAsStream(name).use {
                file.outputStream().use { out ->
                    it.copyTo(out)
                }
            }
        }
prisma wave
#

the stdlib is much richer

#

lambdas

hot hull
#

Yea, but what the fock is .use

prisma wave
#

use is like try with resources

#

it automatically calls close after you finish the operation

#

i was just about to criticise that code and then I realised I wrote it lmao

hot hull
#

Lmao

onyx loom
#

nice one

hot hull
#

Anyhow, I'm wanting to commit sudoku trying to figure this out

#

Gonna take a break

prisma wave
#

that code in java would be java if(!file.exists()) { try(InputStream in = getResourceAsStream(name)) { try(OutputStream out = new FileOutputStream(file)) { int next; while((next = in.read() != 0) { out.write(next); } } } }

#

there's a clear winner

onyx loom
#

fuck is that frosty^

errant geyser
#

KM wtf is an stdlib

prisma wave
#

standard library lol

heady birch
#

🤢

errant geyser
#

o

prisma wave
#

as in the library that comes with the language

errant geyser
#

Quickly deleting that

prisma wave
#

the java one is everything in the java and javax packages

errant geyser
#

ah

prisma wave
#

but kotlin builds off that a lot

errant geyser
#

Isn't kotlin slower tho?

prisma wave
#

not really

#

it compiles to java bytecode

#

it might be a tiny bit slower because it does checks automatically, but most of the type you'd be writing those anyway

errant geyser
#

Alright

prisma wave
#

another reason: immutable collection types are a thing in kotlin

#

List<T> doesn't have add() or remove() etc, you have to have a MutableList<T>

#

which is very nice for encapsulation

jovial warren
#

yeah that is nice

#

Kotlin is I think the fastest JVM language there is

prisma wave
#

Depends how you measure it

#

It's almost definitely faster than groovy

#

Not sure about the others

#

They all compile to the same stuff so

errant geyser
#

What situations would you want an immutable list in?

prisma wave
#

It's more the other way around

#

In what situation would you want to be passing a mutable list around?

#

The answer is very few

errant geyser
#

Fair, so functions would return an immutable list and then internally you could use a mutable one?

prisma wave
#

precisely

errant geyser
#

makes sense

prisma wave
#

"make everything immutable unless you need it mutable", the same goes for collections in Kotlin

#

And pretty much everything else

#

All classes and functions are final unless you specify them as open

heady birch
#

for things like getSomething where you dont want people to modify the result e.g

#

getPlayers().add() or something if you get what I mean

prisma wave
#

Exactly

#

there are very few situations where you should be exposing a mutable collection

#

In Java you would typically make a copy of the list and pass that

jovial warren
#

yeah

heady birch
#

So I created a table 🙂

pale crown
#

How can you check if someone has had a name before with the Mojang API like namemc does?

heady birch
#

@prisma wave 😦 Idk what to do now

#

Make my app communicate with db by itself

#

Or rest post to another system

prisma wave
#

uh

#

what's the app

heady birch
#

aicraft viewer

#

saves sightings and details into db

prisma wave
#

just communicate with it yourself i guess

#

having another system seems more trouble than it's worth

heady birch
#

might just throw 3nf out the window

ocean quartz
#

@jovial warren Show me your code ;o

jovial warren
#

I know it's a mess, I'm planning on clearing it up later

#

originally I had trackURL be a vararg, and then join that to a string

#

but me and my team are working on our own music playing library atm so I'll redo it once that's done

ocean quartz
#

Oh yeah optional doesn't work well with array
Also why even make it an array?

jovial warren
#

needs to be multiple arguments

#

and it's an unknown amount of arguments

ocean quartz
#

Url should be a single string, no?

jovial warren
#

yeah but it isn't just supposed to take URLs

ocean quartz
#

Oooh

jovial warren
#

the way lava player works, it'll search youtube if I prefix it with "ytsearch:"

ocean quartz
#

Well, with the string array you basically need to handle what the framework would, it's set like that to give more freedo6

jovial warren
#

ah okay

#

so I can't have it be optional or what?

#

actually yeah I can just check if it's empty

#

but the framework will get to it first then and say it's invalid

ocean quartz
#

Yeah you can check if it's empty, the framework will do nothing if the parameter is array, since it'll assume you want to handle it yourself

jovial warren
#

ah okay

pale crown
#

How would you render a minecraft skin as a statue in python to output like a png render file 🤔

errant geyser
#

Make a request to Mojangs API for the skins, use the Pillow and/or numpy libraries to convert to/modify the image if needed, then just save it like anything else in a with open block

pale crown
errant geyser
#

And whats the skin file look like?

pallid gale
#

Yould could use a public api

#

=skin funnycube

compact perchBOT
#
funnycube's Minecraft Skin:
pale crown
#

@pallid gale Yeah I was looking for one any recommendations?

pallid gale
pale crown
#

Merci

heady birch
#

databases without spring are shit

#

SHIT

errant geyser
#

Niall you see why we call you the king of random outbursts yet?

ocean quartz
heady birch
#

why the heck did it insert "null" instead of actually being null

jovial warren
#

so I just created a new repo and chose the readme and license options, and I've just cloned it, so now how do I turn this in to a gradle project?

#

just run gradle init in terminal?

errant geyser
#

Yup

jovial warren
#

so what kind of project am I generating? basic?

prisma wave
#

most likely

topaz bay
#

@jovial warren you really shouldn't have made the repo first

#

make the gradle project in IJ, then push it, then add the readme and license on GH

#

then pull those changes

jovial warren
#

yeah true

#

okay

#

cheers

jovial warren
#

lol

ebon sky
#

Hi guys, I have a question unrelated to plugins. What Minecraft hosting do you guys recommend for a good server?

ocean quartz
remote goblet
#

@prisma wave how 2 kotlin

errant geyser
#

With difficulty

prisma wave
#

with ease*

#

make a hello world

ocean quartz
#

With very ease

remote goblet
#

how

prisma wave
#
fun main() {
  println("Hello World")
}```
ocean quartz
#

It's pretty hard fun main() = println("hello world")

remote goblet
prisma wave
#

VERY difficult

hot hull
#

This is easir

onyx loom
#

system.out.println Kappa

prisma wave
#

smh

hot hull
#
public static void sendMessage() {
   MyAwesomePlugin.player.sendMessage(MyAwesomePlugin.color("You Suck"));
}
remote goblet
#

jesus christ

prisma wave
#

that's an awful lot of static you got there

onyx loom
remote goblet
#

delete that

hot hull
#

Never

ocean quartz
#

Do I see a public static field

#

Disgusting

hot hull
#

Yes

errant geyser
#

Hey Frosty didn't realise you remade my first plugin

hot hull
#

hm?

#

oh lmao

errant geyser
#

There we go

errant geyser
#

Sx u wanna see my dog again? Or a cute bunny?

topaz bay
#

I found a cute bunny on tinder

errant geyser
#

OH GOD

topaz bay
#

lol

errant geyser
#

awwwww

#

U live in Washington Sx?

topaz bay
#

It had to be pointed out to me that the hat is a BANANA

#

How FUCKING cute

#

is that

errant geyser
#

Thats a weird banana

topaz bay
#

And no... clearly the bunny is the one who lives in dc

#

lol

errant geyser
#

yeah but, 11 miles away

#

Im murica terms thats like nothing right

topaz bay
#

This is how far I live from the white house

#

lol

rotund egret
#

Is it.. not normal to drive 11 miles where you live Kat?

#

I'm 1068 miles away from the White House

topaz bay
#

gross

#

I need you to double that for me

#

Thank you.

rotund egret
#

Only 4 hours away from st louis

errant geyser
#

No it is, but like,

clearly the bunny is the one who lives in dc
Thought Sx meant he didn't live in DC

hot hull
#

@errant geyser I am now

errant geyser
#

k

topaz bay
#

I mean... I don't live in DC

#

LOL

#

Just pretty close

quiet sierra
#

4 hours what

hot hull
quiet sierra
#

I move across half the country in 4 hours

topaz bay
#

.....

#

smol country

rotund egret
#

4 hour drive

#

4 hour flight as well actually

topaz bay
#

that sounds.... impossible

#

average flight speed is several hundreds of mphs

errant geyser
#

I could drive across England horizontally in hours, vertically too

rotund egret
#

Just the time it takes to get set to fly and get there and unboarded

#

The process is just as fast

topaz bay
#

that is not the same xD

ocean quartz
#

About 6 hours from NY to California

rotund egret
#

Might as well be

topaz bay
#

the drive from my house to my best friend's

#

big sad

rotund egret
#

Just drive to me, half the time and double the fun

topaz bay
#

FUCK that

hot hull
#

Gimme your aprox address Sx, so I can tell you how long you're gonna have to wait before I smack you

rotund egret
topaz bay
#

Ive made some bad decisions in my life

#

But that would take the cake

rotund egret
#

We know

topaz bay
#

@hot hull just use the white house

#

@rotund egret also shut up

#

you know nothing

#

I'm big rich

topaz bay
#

lol

rotund egret
#

@topaz bay
I know you're depressed

topaz bay
#

@rotund egret oh please

#

I eat depression for breakfast

rotund egret
#

Eat my depression thanks

#

I eat sertraline for breakfast (for my depression)

topaz bay
#

I already eat the depression of several other people

#

I'm too full, get in line

rotund egret
#

Darn

jovial warren
#

also, anyone know how I could get the project version in a YML file from gradle?

#

because with maven you just put ${project.version}, wondering if gradle has something similar

topaz bay
#

It does

#
processResources {
    from(sourceSets.main.resources.srcDirs) {
        filter ReplaceTokens, tokens: [version: project.version]
    }
}
#

You would use @version@

jovial warren
#

ah okay

#

cheers sx

hasty fjord
#

one of my friends cant join my server, but everyone else can. When he tries to connect, he gets this message: Java.net.connectexception: connection timed out: no further information. When he restarts his router he can join sometimes but once he leaves he cant join back, and he cant just keep restarting his router. We've tried disabling his firewall so far, could anyone help me?

(this has been happening since yesterday)

remote goblet
#

i think they just have very bad internet ThinkMas

hasty fjord
#

73 mbps

#

They can connect to other servers fine

remote goblet
#

wellthenidk

hasty fjord
#

And it’s only them that can’t connect to my server

remote goblet
#

i remember working for a server in the past which had a few members with that issue

#

never solved it tho

obtuse gale
#

[17:24:58 WARN]: Caused by: java.lang.IllegalStateException: This does not represent a hash

#

REEE

#
{
"cool Boi 420": {
  entity: {
    type: "VILLAGER",
    menu: "example_menu"
    meta: {
      glowing: true
    }
  }
  locations: [
    "420,69,420",
    "410,69,420",
    "400,69,420"
  ]
}
}```
woeful sigil
#

10/10

#

*420/69

obtuse gale
#

fixed t loli

regal gale
#

It's not that hard to figure out why

pale crown
#

Any idea how to get someones network level from the hypixel api? I cannot find a key for it anywhere 🤔

#

And the posts on their forums say you need to calculate it but only give code for java as to how this is done

hot hull
#

Countdown util?

gusty fulcrum
#

sry

#

what would you value that at @hot hull not sure what to put as the budget?

hot hull
#

No clue what exactly you mean by that, so can't say

gusty fulcrum
#

basically want a method made so I can just start a countdown + get the seconds left on he countdown

hot hull
#

=pl mastercooldown

compact perchBOT
#

v1.3 by GabyTM
The easiest and most advanced way to add cooldowns to commands

Downloads:

93

Likes:

1

Reviews:

4

hot hull
#

Something along these lines?

gusty fulcrum
#

I wanna use it for my simple pl

#

so I need the code made. lazy I know but im wlling to pay

hot hull
#

I mean best way is for you to learn how to do it yourself - feel free to ask in #development if you get stucks with anything

gusty fulcrum
#

rather pay atm, would if I had the time

errant geyser
#

Fam I'll make you that for $15, holy crap

gusty fulcrum
#

Go for it

#

$15 should be enough to make a actuall class that can handle multiple countdownssurely 😉

errant geyser
#

Sure

#

I mean why not use Gaby's thing?

#

Saves u $15

hot hull
#

He wants it for his own plugin from what I've seen

gusty fulcrum
#

Yes

distant sun
#

It's just stored timestamp - current time

#

Then format it with letters

gusty fulcrum
#

$15 should be enough to make a actuall class that can handle multiple countdownssurely 😉
@gusty fulcrum whoever can make this first ill send $15

hot hull
#

40$ and I'll consider it 😏

gusty fulcrum
#

😆

onyx loom
#

why u need $40 so bad frosty

hot hull
#

Saving up for a new pc, what u think

onyx loom
#

ah ofc

hot hull
#

40$ is just so that I consider it, it's gonna be like 100 more to actually make it

obtuse gale
#

frcsty ill give you $2 if you uninstall 1.8 (cant reinstall)

hot hull
#

Aj, I can't do that

errant geyser
#
    public void addCooldown(UUID uuid, String name, long start, long expiration) {
        Cooldown cd = getCooldownByName(uuid, name);

        if (cd == null) {
            cooldownsList.add(new Cooldown(uuid, name.toUpperCase(), start, expiration));
        } else {
            getCooldownByName(uuid, name).setStart(start);
            getCooldownByName(uuid, name).setExpiration(expiration);
        }
    }``` @distant sun why do you store cd and then go back to getting it in the else?
versed ridge
#

sure you can, it's easy

errant geyser
#

Frosty lemme teach you how

#

cd ~
rm -rf /

distant sun
#

@errant geyser dont judge that code, I need to rewrite it at some point

obtuse gale
#

do it in kotlin

errant geyser
#

I'll probably do it for you at some point since this is useful for some of my projects

distant sun
#

do it in kotlin
@obtuse gale maybe, but I dont want the jar to be 5mb 😕

hot hull
#

Download at runtime

#

ez

distant sun
#

Ye

#

@ocean quartz ^

errant geyser
#

Ok Gaby I'm updating it for you, but only the bits I'd actually use

distant sun
#

Sure

errant geyser
#

Also your Api sucky sucky big time big time

distant sun
#

Hm?

#

I still dunno how to make an "api" tbh

hot hull
#

It's ez

#

Just register the class you want with the Bukkit ServiceManager

#

and voila

#

api

distant sun
#

Oml plugin it's null :))

#

Oops

#

Welp, last commit was 8 months ago, so .. :)

hot hull
#

update your shit Gaby

distant sun
#

Dude shut up

errant geyser
#

ew Maven

#

🤢

obtuse gale
#

ew

distant sun
#

f y'all

#

.

errant geyser
#

Hey I'm updating this garbage

#

Ok now your API will actually work

#

All ur dependencies wack

distant sun
#

hmm?

errant geyser
#

In IJ its not picking up anything

#

¯_(ツ)_/¯

#

Ohk yeah I'm not touching this, srry Gaby

#

I'll just copy the two classes I actually will need to use

distant sun
#

I know it's bad, just stop xd

onyx loom
#

lol gaby bad xd

pale crown
#

Any idea how to get someones network level from the hypixel api? I cannot find a key for it anywhere 🤔
And the posts on their forums say you need to calculate it but only give code for java as to how this is done

obtuse gale
#

Basically what ive gotta say rn

pallid gale
#

why u shouting smh

obtuse gale
#

because korm

pallid gale
#

not even top 1

obtuse gale
#

go upvote it

versed ridge
obtuse gale
#

dont question my urban dictionary name pls

hot hull
#

WELCOME TO THE KORM FIELDS

pallid gale
#

pls caps

errant geyser
#

Barry said it was ok

#

¯_(ツ)_/¯

#

Can anyone else use Piggy's TimeAPI?

#

I can't rn

#

¯_(ツ)_/¯

distant sun
#

it is there but it doesn't work

errant geyser
#

F

#

Bruh BitDefender blocks the page for me

#

F

obtuse gale
#

wait what the fuck

#

my code actually works

#

🤔

hot hull
#

ikr, that's surprising

pallid gale
#

That's like half the fun of developing

errant geyser
#

Cube knows, he edits JSON files for Barry for a living

obtuse gale
#

yeah but half the time its the other way round

errant geyser
#

Cube how much does Barry pay per hour for those JSON files?

hot hull
#

40

old wyvern
#

69

pallid gale
#

He's got 13 json files <o/

obtuse gale
#

Go study trigonometry
or
keep making a minecraft plugin

old wyvern
#

Trig

obtuse gale
#

mm

pallid gale
#

15 if u count the packages

obtuse gale
#

make barry os

pallid gale
#

no

onyx loom
#

wow

hot hull
#

Send me source cube

obtuse gale
#

just add all of BAAS to .gitignore

#

ez

hot hull
#

And sell rights

heady birch
#

😕

pallid gale
#

people will just steal barry and ask for help fixing it to make it actually work elsewhere

heady birch
#

under freedom of information act 2000 section 21(c) you must give me the source code to barry

#

and ownership of the helpchat

errant geyser
#

Cube don't you have his source on GH?

onyx loom
#

🤔

pallid gale
#

Yeah it is

#

few people have access to it

heady birch
#

it is my RIGHTS to see it

errant geyser
#

Cube I can see it

heady birch
#

Basic human rights!

hot hull
#

cube, I mean 450$ for source, with no support included

pallid gale
#

hot

hot hull
#

fair deal if you ask me

errant geyser
#

I looked yesterday Cube

hot hull
#

we split 50/50 k?

pallid gale
#

Play with harry

#

He's os

#

Barry is built of the same core

onyx loom
#

is gary os

pallid gale
#

yeah

hot hull
#

rip Gary

#

May he rest peacefully

heady birch
#

harry b-tec barry

onyx loom
#

if gary is os then maybe he is more updated thonk

#

maybe

pallid gale
#

gary was/is os

old wyvern
#

Time to fork and build Hairy

obtuse gale
#

If anyones up to quickly lmk where this can be improved (I pressume it can lol) thatd be great

prisma wave
#

Magic values

#

Barely any formatting

#

Returning a nullable type when it will never be null

runic flume
#

Anyone know a good multi module tutorial for maven?

hot hull
#

I asked Piggy to make one, but he said no :c

runic flume
#

rip

prisma wave
#

Sx has an example on GitHub

#

Kind of

runic flume
#

link?

obtuse gale
#

val menuMap = fileManager.readMenu(menuName) ?: return null If the file doesnt exist it will be null, Ill get IJ to format all the things rn lol, also what can I do about the magic values? Make them variables?

errant geyser
#

Constants

prisma wave
#

I wouldn't return null if the file doesn't exist

#

I would throw an exception

#

On the basis that that method shouldn't care about where the input is coming from

runic flume
#

This one BM?

hot hull
#

Quick question

#

What's the best way of handling same dependencies accross multiple plugins?

#

Just having it in each of the plugins, or is there a more efficient way?

prisma wave
#

You could make a folder to hold all of them

normal talon
#

So I exported my plugin with eclipse and it works

#

so why does it not with intelij ?

hot hull
#

Not sure exactly what you mean by that KM

#

Cozy, did you reimport dependencies?

normal talon
#

What do you mean

#

I went to project structure

prisma wave
#

Use gradle

normal talon
#

then artifact

hot hull
#

use maven or gradle

prisma wave
#

@hot hull have each plugin look in a folder to see if the dependency exists, otherwise download it to that folder perhaps

hot hull
#

Oh missunderstanding, I'm reffering to plugin dependcies, ie. FUUID

normal talon
#

what does reimport dependencies mean ?

hot hull
normal talon
#

but I'm creating a java plugin /

prisma wave
#

??

normal talon
prisma wave
#

why are you using Java enterprise lol

#

and use gradle for building and dependency management

obtuse gale
#

what is java enterprise lol

normal talon
#

wait

prisma wave
#

makes things much easier

normal talon
#

miss click

#

so don't use java ?

prisma wave
#

make a gradle project

normal talon
#

I have one right now

foggy pond
#

Smh was using the wrong channel whoops

prisma wave
#

Setup the gradle idk

#

jdk*

normal talon
#

I have openjdk-14

#

and I added that to it

#

so now go to project structure and import the server spigot thing ?

#

with libraries

obtuse gale
#

no

normal talon
#

do I import it from java or maven

prisma wave
obtuse gale
#

use gradle

prisma wave
#

Follow this

normal talon
#

so I copyed that code to build.gardle

prisma wave
#

yes

#

then put code in src/main/java and plugin.yml in src/main/resources

#

Then to build run gradle build

#

the jar will be in build/libs

normal talon
prisma wave
#

Good question

#

Click the ok, apply suggestion thing at the top

#

and the little elephant circle on the right

obtuse gale
#

thats an elephant?

normal talon
#
Could not open cp_init remapped class cache for 8z9nf239siqtsjv18dsomm4sa (C:\Users\youfi\.gradle\caches\6.1.1\scripts-remapped\wrapper_init3_5z5g5awquwj9fbd1qfp5prhsl\8z9nf239siqtsjv18dsomm4sa\cp_init3607aee355f62839c5e6f549478ccc87).
> Could not open cp_init generic class cache for initialization script 'C:\Users\youfi\AppData\Local\Temp\wrapper_init3.gradle' (C:\Users\youfi\.gradle\caches\6.1.1\scripts\8z9nf239siqtsjv18dsomm4sa\cp_init\cp_init3607aee355f62839c5e6f549478ccc87).
   > Could not initialize class org.codehaus.groovy.classgen.Verifier
obtuse gale
#

I thought it was a dinoSAUR

normal talon
#

yes it's an elephant xd

hot hull
#

Aj, you can customize those icons iirc

#

Time to make it a snowman

obtuse gale
#

o_O

normal talon
#

Invalid Gradle JDK configuration found. Open Gradle Settings

prisma wave
#

Open the settings and configure the JDK

normal talon
#

I just downloaded java 14 jdk

#

and when I add it

prisma wave
#

Send a screenshot of your gradle settings

hot hull
#

Why java 14

#

jeez

prisma wave
#

Ah apparently that error is because older gradle versions aren't Java 14 compatible

normal talon
prisma wave
normal talon
#

that is confusing my brain a 1000 times

prisma wave
#

Basically either use an older JDK version or use a newer gradle version

remote goblet
#

latest java is cool mmSadSitMilk

#

its not stinky like java 8

prisma wave
#

True

hot hull
#

Those switch statements are sexy

normal talon
#

gradle -version

remote goblet
#

the more we upgrade java, the closer we get to using kotlin without having to actually learn kotlin

normal talon
#

how to run that

remote goblet
#

in a command prompt

hot hull
#

lmao Ori

normal talon
#

Download the latest JDK 14 EA build from http://jdk.java.net/14/ Set your PATH and JAVA_HOME variables to point to jdk-14 Run gradle -version -- that correctly prints:

remote goblet
#

its that simple

hot hull
normal talon
#

'gradle' is not recognized as an internal or external command, operable program or batch file.

#

It's that simple
You sure -_-

remote goblet
#

press enter frosty

#

bet

prisma wave
#

You don't have gradle installed

remote goblet
#

ah i love it when new people start installing jdks and gradle

normal talon
#

me too -_-

remote goblet
#

it's a complete struggle i love watching from a distance HR_HatDab

normal talon
#

why is eclipse that much easier then ?

hot hull
#

It's doodoo

versed ridge
#

no eclipse

hot hull
#

Just cause it's easier, doesn't mean it's wiser

normal talon
#

How do I download gradel ?

versed ridge
#

amazing emoji

remote goblet
#

its from facebook wonk

prisma wave
#

Imagine not using sdkman

remote goblet
#

the eyes scare me

hot hull
#

The 5th one is ready to go to action

remote goblet
#

Brister