#dev-general

1 messages · Page 105 of 1

distant sun
#

ye we are far behind society

obtuse gale
#

the only compuslory subjects i have is english

#

and maths is kinda like, you should do it or you will fail

distant sun
#

lucky you tbh

obtuse gale
#

i thought that was just standard

#

Thats only next year tho

distant sun
#

not here

obtuse gale
#

this year i have to do science, History, maths, english, Religion,

distant sun
#

@static zealot can probably confirm

frigid badge
#

@distant sun at some point you don't want to have programming in school though

distant sun
#

ye I'm sure

frigid badge
#

since like it'll be boring as shit and most teacher suck at it

#

they don

#

't follow the conventions

#

or make clean code

hot hull
#

ngl, learning like this is probably much more entertaining than school

distant sun
#

like the other shit we are forced to learn are better @frigid badge

frigid badge
#

and all use very old stuff

errant geyser
#

It is Frosty

hot hull
#

But can you operate a cnc

distant sun
#

id rather spend 11 hours a week learning fucking php than doing modules (specialization classes)

hot hull
#

modules?

distant sun
#

that's how they are called here

static zealot
#

what should I confirm?

hot hull
#

that the world is fucked

distant sun
#

wait all your subjects are compulsory?
@static zealot

static zealot
#

well I am the confirmation

hot hull
#

Still waiting for @onyx loom to drop a nuke

distant sun
#

or a nude at least 😢

static zealot
#

oh yeah

#

they are

#

well most of them

#

in highschool

obtuse gale
#

thats an oof

static zealot
#

you can go on 3 or 4 profiles

hot hull
#

Lmao Gaby

static zealot
#

that have 2-3 different subjects

#

but yeah

#

for example because I went where I went I only had art and music until 10th grade

distant sun
#

ye but you still have to do them for 2 years

#

so it's not optional

static zealot
#

yep

distant sun
#

😡

static zealot
#

well

#

you can drop out

#

if you want ..

#

xD

#

so all are optional

#

just you do them all or none of them

frigid badge
#

in my country you technically can't even drop out lol

#

you are forced to get a degree

distant sun
#

unless you are lemmotresto

#

:)

static zealot
#

xD

frigid badge
#

I dropped out of the higher degrees

#

cause lazyness

#

and did a lower degree

static zealot
#

:gear: Development General - Not configuration help - More relaxed area to discuss development topics Does that mean I can ask in here how do I give access to another IP to MySql? xD

frigid badge
#

you don't give another ip to mysql

#

mysql runs on a server

static zealot
#

no just to connect to it

frigid badge
#

the server connects to a router

static zealot
#

well idk how mysql works

frigid badge
#

the router connects to the isp and the isp gives the router an ip

topaz bay
#

...

frigid badge
#

xD

topaz bay
#

You are overexplaining that

frigid badge
#

that's the goal

topaz bay
#

@static zealot do you want a user to be able to connect from a specific IP?

frigid badge
#

it's underexplaining and overexplaining at the same time

distant sun
#

I CAN CONFIRM

#

fu lemmo

static zealot
#

well I want my plugins to be able to connect from my server

hot hull
#

no u Gaby

static zealot
#

but I changed the port of the server and now they can't

frigid badge
#

ew tho exposed mysql servers

topaz bay
#

So you need to open the port...

#

That you changed it to

static zealot
#

yeah I have no idea how xD

frigid badge
#

it aint upnp

static zealot
#

I have 0 knowledge about mysql

topaz bay
#

Thats not sql

frigid badge
#

that isn't about mysql

#

it's about networking

static zealot
#

I think I'll just ask my hosting company to do it for me xD

frigid badge
#

you should

#

unless it's a vps

topaz bay
#

ufw allow {port}/tcp

frigid badge
#

maybe he uses iptables smh

static zealot
#

but mysql is not on the same IP as my server? do I just allow the port?

topaz bay
#

Theres no reason to use anything besides ufw

frigid badge
#

that's true

#

but you never know

topaz bay
#

@static zealot then only allow from the ip of your server

#

just add from {ip}

#

to the end of that

#

You should also probably change the mysql user to only allow from that ip as well

static zealot
#

ufw allow {port}/tcp{ip}?

frigid badge
#

no

topaz bay
#

What the hell

frigid badge
#

ufw allow {port}/tcp from {ip}

topaz bay
#

I literally... told you exactly what to type

static zealot
#

oh

topaz bay
#

How do you fuck that up

static zealot
#

xD

frigid badge
#

overthinking

static zealot
#

well

#

I am more of a special human

#

I can fuck anything up

#

xD

topaz bay
#

Oh, thats actually not the syntax

#

ufw allow from {ip} to any port {port}

static zealot
#

I just asked them to do it because I'll destroy everything and I rather do that on a test database xD

#

also I got this

topaz bay
#

what the hell is that??

distant sun
#

Its not a mysql query

#

Thats a command, isnt it?

#

Just ask the provider to do it for you 🤷‍♂️

static zealot
#

yeah

#

I already did xD

topaz bay
#

I just...

#

How do you get into this stuff without doing research and learning how

static zealot
#

funny can we delete the last 50 messages? xD

#

well

#

you ask others to do it for you xD

#

I am trying my best to convert it back to .db files but 2 plugins of mine don't have a migration command or something like that

#

it was more of an experiment at first xD

heady birch
#

I hate crumbs

onyx loom
#

@hot hull still waiting for papi 3 🙄

obtuse gale
#

wooh

#

korms giving me an error on a line that is non existant lol

topaz bay
#

@obtuse gale give me what youre trying to deserialize

#

Like it says, its not a hash

#

Also that line 100% exists... lol

obtuse gale
#
coolGenerator69: {
  item: {
    type: "STONE"
    meta: {
      name: "coolBlock69"
      glowing: true
    }
  }
  // How many Items should spawn per minute in each tier, in order of ascending tier
  speedTiers: [5,10,15,20]
  // How long until it should tier up from beginning of game
  timeToTiers: [5,10,15,20]

  locations: [
    "420,69,420",
    "410,69,420",
    "400,69,420"
  ]
}``` I meant the line it was saying in my code lol
topaz bay
#

Um...

#

It works fine?

#

Show me your code

#

=paste

compact perchBOT
#
HelpChat Paste

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

obtuse gale
#

fun readGenerators(): Map<String, GeneratorData>? = korm.pull(df.resolve("$generatorsFile")).toHash()

#

lol

#

one sec

#
class GeneratorData(val item: Item, val speedTiers:List<Int>, val timeToTiers:List<Int>, val locations:List<String>) {

    class Item(val type: String, val meta: Meta) {

        class Meta(val name: String, val glowing: Boolean)


    }

}```
topaz bay
#

Oh

#

Wrap the entire document in { }

obtuse gale
#

same thing

topaz bay
#

Show me what you have

obtuse gale
#
{
coolGenerator69: {
  item: {
    type: "STONE"
    meta: {
      name: "coolBlock69"
      glowing: true
    }
  }
  // How many Items should spawn per minute in each tier, in order of ascending tier
  speedTiers: [5,10,15,20]
  // How long until it should tier up from beginning of game
  timeToTiers: [5,10,15,20]

  locations: [
    "420,69,420",
    "410,69,420",
    "400,69,420"
  ]
}
}```
#

Is that what you meant lol

topaz bay
#

Yes

#

And are you sure its the same? Cause I literally just tested that xD

obtuse gale
#

yes lol

hot hull
#

(Clean, then build again)

obtuse gale
#

still getting it lol

topaz bay
#

oh

#

I think this is my fault

obtuse gale
#

smh

#

i knew I shouldnt of use korm :)(:

topaz bay
#

Shut your whore mouth

#

What I just fixed has nothing to do with your issue

#

Send me the error youre getting

hot hull
#

:kek:

topaz bay
#

For some reason the lexer was categorizing tab characters as symbols

obtuse gale
#
[23:01:56 WARN]: Caused by: java.lang.IllegalStateException: This does not represent a hash
[23:01:56 WARN]:     at com.sxtanna.korm.reader.KormReader$ReaderContext.internalToHash(KormReader.kt:294)
[23:01:56 WARN]:     at org.aj3douglas.ajbedwars.utils.FileManager.readGenerators(FileManager.kt:37)
[23:01:56 WARN]:     at org.aj3douglas.ajbedwars.core.GeneratorManager.createGenerators(GeneratorManager.kt:18)
[23:01:56 WARN]:     at org.aj3douglas.ajbedwars.commands.Test.test(Test.kt:15)
[23:01:56 WARN]:     ... 23 more```
topaz bay
#

Are you sure you updated the file?

obtuse gale
#

indeed

topaz bay
#

downgrade korm, and see if it works

obtuse gale
#

to what version?

topaz bay
#

The last version

obtuse gale
#

lol whats that

topaz bay
#

Do you not use the packages plugin?

obtuse gale
#

I dont believe so

topaz bay
#

Get it

obtuse gale
#

whats it do

topaz bay
#

It can read dependencies from your build.gradle or pom.xml

#

and show you the metadata, the versions, and allows you to update them with the gui

obtuse gale
#

is one?

topaz bay
#

yes

prisma wave
heady birch
#

Conector = Conecta.getConexion();

#

I thought this was english till I saw it wasnt

topaz bay
#

@prisma wave thats a lot of ms

#

@obtuse gale v3.1 is a couple of hours

#

:)

prisma wave
#

indeed it is

#

I've sped it up quite a bit though

#

kind of

#

:/

topaz bay
#

aww shit

#

version 3.2 coming soon

obtuse gale
#

its been 24 hours

#

smh

jovial warren
#

anyone know of a good API for writing Discord bots in Kotlin?

quiet depot
#

jda

jovial warren
#

okay

#

yeah I was thinking that

#

what about making commands though?

#

I was thinking JDA Utilities but the documentation is very vague

quiet depot
#

jda utilities is trash

#

terrible code last time I checked

#

I doubt a good command framework exists for jda

jovial warren
#

and for making music bots I should use lava player right?

quiet depot
#

yeah

old wyvern
#

matts lib seems nice

distant sun
#

I use matt's

ocean quartz
#

👀

quiet depot
#

oh if matt's lib has discord support, go for it

distant sun
#

he has one for jda and one for mc

jovial warren
#

matt send us a link

old wyvern
#

he has a separate one for jda

quiet depot
#

separate, not abstracted?

distant sun
#

yes

jovial warren
#

to github matt

old wyvern
#

yes

quiet depot
#

D:

#

matt i'm ashamed

distant sun
#

??

ocean quartz
#

I know Piggy D:

distant sun
#

why would you add jda commands framework on a mc plugin thonking

quiet depot
#

code one run everywhere though

ocean quartz
#

I'll rewrite everything later to make it abstract though

quiet depot
#

gaby, the only difference there should be between the two separate frameworks, is the command listener, and the parameter type

distant sun
jovial warren
distant sun
#

maybe

ocean quartz
#

Harder maintenance Gaby

#

@jovial warren Yeah, though the link i sent you has the maven repo

jovial warren
#

where be yer wiki matey

ocean quartz
#

no wiki yet

old wyvern
#

But its fairly similar to the other cmd lib

#

actually pretty much fully

jovial warren
#

also, what's latest matt?

onyx loom
#

ping pong

quiet depot
#

=ping

compact perchBOT
#
Pong!

• Replied in 98ms.
• API Ping is 37ms

ocean quartz
#

1.1.9-BETA

jovial warren
#

okay

#

now gotta figure out how to use this

#

especially with Kotlin

prisma wave
quiet depot
#

copy java examples you find around the place into intellij

ocean quartz
#

Also it's not exactly like ACF it has it's differences

quiet depot
#

that's good, you don't want to be exactly like acf, because acf is severely flawed

#

what's an fg brister?

ocean quartz
#

Yeah, imo it's more customizable than acf as well

prisma wave
#

my language

hot hull
#

Frigga

old wyvern
#

frigga

onyx loom
#

frigga

jovial warren
#

also, what is value supposed to be in the @Command annotation?

prisma wave
#

^^^

quiet depot
#

lol is it actually called frigga

#

what does that word mean

#

I've seen it before

onyx loom
#

nice way of saying fucker

prisma wave
#

norse goddess

#

I made it to compete with Odin so

topaz bay
#

Frigga is not a Goddess

quiet depot
#

odin?

prisma wave
#

the name seemed appropriate

jovial warren
#

because idk about you Matt but value doesn't seem very contextual to me lol

old wyvern
#

Frigga was the Queen of Asgard and wife of Odin

prisma wave
#

sx's language

topaz bay
#

She's a witch

jovial warren
#

oh her lol

quiet depot
#

damn i might aswell make a language called god

topaz bay
#

....

#

You are not good at naming things...

prisma wave
#

lol

old wyvern
#

Djin will be ariving soon

jovial warren
#

You are not good at naming things...
no one is lol

quiet depot
#

christian god > ur norse gods

old wyvern
#

💀

hot hull
#

Oh, you two married?

onyx loom
#

i mean if its called god, then maybe its the god of all gods thonk

topaz bay
#

LOL

prisma wave
#

lol

obtuse gale
#

lol

ocean quartz
#

@jovial warren Only one sad thing for Kotlin, you need to register the Int parameter type because it's different from Java
The command annotation is the command name for example @Command("test") for the test command, you can have more than one and it'll act as aliases
And the name value is needed so you don't have to specify the name, cuz Java

jovial warren
#

most of the time things just happen by accident and they end up working out very well

#

ah okay

quiet depot
#

have u never watched supernatural sx

topaz bay
#

Nope

quiet depot
#

other gods are like a snack to christian god

ocean quartz
#

Christian god was written too op

prisma wave
#

Frigga could take christian god easily

quiet depot
#

well he's the creator of all

#

doubt

prisma wave
#

no contest tbh

quiet depot
#

u clearly haven't seen supernatural

topaz bay
#

Odin could easily roll you god

#

He's the allfather

#

Try again

prisma wave
#

I propse an alliance

#

to take out this false god

topaz bay
#

Supernatural is HERESY

quiet depot
#

it's not lol

#

it's literally not

jovial warren
#

okay now for this command, how do I get arguments?

topaz bay
#

It literally is heresy

#

In every way possible

old wyvern
#

just add it to the parameters

jovial warren
#

okay

ocean quartz
#

fun test(argument1: String, argument2: Int) ;p

topaz bay
quiet depot
#

I had to look up the definition of heresy because your vocabulary eludes me at the best of times

#

and heresy is the exact opposite of supernatural

jovial warren
#

can you annotate methods outside of classes in Kotlin?

prisma wave
#

uh

#

wdym

#

i think the answer is yes

topaz bay
#

Does supernatural not depict false gods?

jovial warren
#

a.k.a translating to do I even need a class to put this command in

ocean quartz
#

You do yeah

quiet depot
#

no, there's no false gods in supernatural

jovial warren
#

can I take arguments as an array?

ocean quartz
#

Yeah

jovial warren
#

okay

topaz bay
#

....

#
Supernatural Wiki

Zeus was the chief pagan deity and king of the Greek Pantheon. He was the God of the sky, lightning, thunder, storms, law, order, justice, destiny, fate and kingship. He was a father to many other...

#

HERESY

#

!!!!!!!!!!

#

xD

jovial warren
#

so the name of the method is supposed to be the name of the command?

#

also, what about command aliases?

ocean quartz
#

no
Let me show you a good example

// Prefix for ! command for `command` so !command
@Prefix("!")
@Command("command")
class YourCommand {

  @Default
  fun defaultCommand() {
    // this method handles the call for !command
  }

  @SubCommand("test")
  fun subCommand() {
    // this method handles the call for !command test
  }

}
jovial warren
#

ah okay

prisma wave
ocean quartz
#

Aliases are simple @Command("main", "alias") or @SubCommand("main", "Alias")

jovial warren
#

ah okay

#

someone really needs to make a good Kotlin Discord API at some point lol

#

like one actually written in Kotlin

onyx loom
#

ill do it np

prisma wave
#

there's not much benefit to having one

ocean quartz
#

I thought about making one, but too much work

prisma wave
#

because interop

jovial warren
#

yeah but wouldn't it just make your life so much easier when writing in Kotlin KM

prisma wave
#

you can do that anyway?

topaz bay
#

JDA is perfectly fine from Kotlin?

prisma wave
#

there's very little benefit that the interop can't solve

#

apart from slightly more idiomatic use

jovial warren
#

yeah fair point I guess

prisma wave
#

coroutine support can be done with extension functions

#

as can anything else

jovial warren
#

now time to figure out how lava player works lol

prisma wave
#

a nice addon to JDA that makes kotlin more idiomatic would be nice

topaz bay
#

In regards to what?

prisma wave
#

coroutine support, maybe some DSLs and named arguments instead of builder patterns, etc

topaz bay
#

coroutines are not idiomatic to kotlin

prisma wave
#

they exist though

#

they don't in java

topaz bay
#

That doesn't make them idiomatic

prisma wave
#

you know what I mean though

#

being able to use coroutines instead of JDAs things would be nicer

#

whatever the class is called

topaz bay
#

RestActions

jovial warren
#

can't you use coroutines anyway?

prisma wave
#

that's it

topaz bay
#

I mean... you can

jovial warren
#

or does JDA not allow you to use your own concurrency (and have it still work)

topaz bay
#

Theres very little need for coroutines

jovial warren
#

do I just have to have the main method in a class? because I don't think that's how Kotlin works

#

or do I create a separate class and call that

prisma wave
#

do it in an object or as a top level function

topaz bay
#

?????

prisma wave
#

the latter is preferable

ocean quartz
#

My main is great fun main(args: Array<String>) = Kipp()

obtuse gale
#

when tf is korm getting put on urban dictionary

#

they said 24 hours

#

its been over

topaz bay
#

imagine using args in main

ocean quartz
#

I couldn't get IJ to recognize it without it

topaz bay
#

Pretty sure it only supports it when its top level

jovial warren
#

anyone know any Kotlin alternatives to BlockingQueue<E>?

topaz bay
#

Why do you need an alternative?

#

Just use it... ?

jovial warren
#

okay

#

what do I use instead of the synchronized keyword?

#

suspend?

topaz bay
#

No

#

You would use a synchronized block

jovial warren
#

can you do that in Kotlin?

heady birch
#

probably something like

#

blockingQueueOf()

jovial warren
#

yeah that doesn't exist

#

apparently channels exist though

heady birch
#

or a Next list

old wyvern
#

only on jvm tho

heady birch
#

Next list is not real, he cant hurt you

#

Next list:

jovial warren
topaz bay
#

Dude

#

You should not be copying Java code into Kotlin

jovial warren
#

I'm trying to adapt it

topaz bay
#

Read the code, try to understand it.

#

And then write your own

distant sun
#

long guildId = Long.parseLong(guild.getId()); disgusting

topaz bay
#

Its really stupid code

#

honestly

ocean quartz
#

If only there was a method called getIdLong

distant sun
#

but wait, IT IS

obtuse gale
#

genius

prisma wave
hot hull
#

For shorter strings, second, otherwise first

prisma wave
#

Yeah well the strings could be long

#

I think first is probably better

ocean quartz
#

I think first is better as well

prisma wave
#

Okay

#

now to figure out why it's not parsing newlines propertly :/

remote goblet
#

i just clicked on some code

#

i wish i hadn't

lost edge
#

I've managed to crash IntelliJ O_O

remote goblet
#

i do that all the time

#

it's not difficult

tranquil crane
#

Step 1). Attempt to decompile the Material class...

lost edge
#

lol. All I did was copy and past a constructor for decimal format

jovial warren
#

also @ocean quartz how do I post a response to the channel the command was sent in?

ocean quartz
#

In the commandbase class you get access to the message method which is the message that was sent, so you can do message.textChannel and get the channel to reply back to it

prisma wave
topaz bay
#

93 milliseconds?!?!??! @prisma wave

cedar jolt
#

anyone experienced in PHP who could potentially help me with changing something up and reimplementing a function

topaz bay
#

Just ask your question

#

If someone knows, they will answer

cedar jolt
#

alright

#

so changing "Player' to "Banned Player:" and "Moderator" to "Banned By:"

topaz bay
#

What

#

No?

#

These values are in the lang files

cedar jolt
#

that's what the dev told me

topaz bay
#

The files are in the lang folder

cedar jolt
#

lemme check out the english one tho

topaz bay
#

Theres files for every language

cedar jolt
#

bruh you're right, the dev must have got confused smh

#

only issue tho

#

that makes it say banned by: for all types

#

even mutes, warnings etc

#

i'd rather have warned by: banned by: etc

topaz bay
#

It shouldn't

#

It already does that

cedar jolt
#

nope, it says banned by for all of mine

#

which file is that you're looking at

topaz bay
#

Oh, youre looking at the individual punishment page

cedar jolt
#

i'm looking at the lang file

topaz bay
#

No, thats not what Im talking about

#

Where it says "Moderator"

#

Its on an individual punishment

cedar jolt
#

there's only one "moderator" tho

#

is what i see

#

compared to generic.banned.by

topaz bay
#

Thats exactly what I just sent?

#

xD

cedar jolt
#

wait nvm lol i read it wrong sh

#

smh

#

where would i edit individual punsihments then, so like banned by, warned by etc

topaz bay
#

You will have to change the info.php

#

If you want it to show those values, just change table.executor to the appropriate lang key

cedar jolt
#

Yeah thought so

topaz bay
#

for each punishment type

cedar jolt
#

uhh im a bit of a noob with php, could you help with that?

topaz bay
#

Its just a text file dude

cedar jolt
topaz bay
#

No

#

Change it to the language key

#

That you see in the lang file

#

generic.banned.by

cedar jolt
#

oh

topaz bay
#

it really do be that simple huh

#

xD

cedar jolt
#

bruh I'm a tard xD

prisma wave
#

@topaz bay yes I have done many an optimization to reach the blazingly fast speed of 93 milliseconds

#

I'll run a profiler once I've actually finished but I see no point in prematurely optimising it

cedar jolt
#

i

topaz bay
#

Shouldve hand written your lexer and parser

#

:)

cedar jolt
#

i've got it working now, idk how tho it's back to it's default smh, coz i was testing something but yeah seems fine ig

prisma wave
#

The lexing and parsing doesn't take that long afaik

#

it's the runtime that's the most slow I believe

#

but it speeds up after warmup anyway

topaz bay
#

why tf would that take 93ms though

topaz bay
#

@prisma wave shorthand tuple syntax?

#

I've settled on this syntax

heady birch
#

So in my application I could have alot of similar strings

#

"United Kingdom" maybe a couple hundred times

#

I thought about using intern(), would that be a decent idea?

#

My other option would be a kind of Country.of("") which would return the same string if it already existed

signal tinsel
#

Lol wtf

#

I managed to create a bug where if slowmode is enabled, User#getChatFormat always returns null

#

And I literally don't have a fucking clue how

signal tinsel
#

Okay

#

That was not actually true

#

LMAO

#

In theory chatformats.size() never should return 0 but just in case lol

obtuse gale
#

@topaz bay I still get This does not represent a hash :)(:

signal tinsel
#

Nice dark blue @obtuse gale

obtuse gale
#

I dont like it

#

lol

signal tinsel
#

Lol

#

Tru its bad

#

But still nice

signal tinsel
#

Is there any way to prevent direct commits to my master branch?

#

On GitHub

old wyvern
obtuse gale
#

hi

#

Location location = event.getClickedBlock().getLocation();
World world = ((CraftWorld) location.getWorld()).getHandle();
BlockPosition position = new BlockPosition(location.getX(), location.getY(), location.getZ());

            if (event.getClickedBlock().getType() == Material.CHEST) {
                 TileEntityChest tileChest = (TileEntityChest) world.getTileEntity(position);
                 world.playBlockAction(position, tileChest.w(), 1, 1);
            } else {
                 TileEntityEnderChest tileChest = (TileEntityEnderChest) world.getTileEntity(position);
                 world.playBlockAction(position, tileChest.w(), 1, 1);
hot hull
#

?codeblocks

compact perchBOT
#
FAQ Answer:

Use codeblocks for formatting code or configuration files:
```<language name>
<your code here>
```

For example:
```yaml
test:

  • “hi”
  • “there”
    ```

Produces:

test:
- “hi”
- “there”```
obtuse gale
#

I added this cuz the open animation of my ec wasnt working

#

But now it stays open and doesnt close

#

Added this to my openEvent

hot hull
#

java ;c

obtuse gale
#
Location location = event.getClickedBlock().getLocation();
                World world = ((CraftWorld) location.getWorld()).getHandle();
                BlockPosition position = new BlockPosition(location.getX(), location.getY(), location.getZ());

                if (event.getClickedBlock().getType() == Material.CHEST) {
                     TileEntityChest tileChest = (TileEntityChest) world.getTileEntity(position);
                     world.playBlockAction(position, tileChest.w(), 1, 1);
                } else {
                     TileEntityEnderChest tileChest = (TileEntityEnderChest) world.getTileEntity(position);
                     world.playBlockAction(position, tileChest.w(), 1, 1);```
hot hull
#

Try updating the block on close

obtuse gale
#

but won't it then be closed immediately

#

instead of like the animation of a chest closing

hot hull
#

Not sure, test it

obtuse gale
#

so update an ec block?

hot hull
#

When you close the inventory yea

obtuse gale
#
    @EventHandler
    public void onCloseEnderChest(InventoryCloseEvent event) {
        if (event.getView().getTitle().contains(event.getPlayer().getName() + "'s EnderChest")) {
            // save inventory to hashmap
            extrainv.put(event.getPlayer().getUniqueId(), event.getInventory());
            
        }
    }
#

yes so this and than add the block update

#

but how do I do that?

hot hull
#

mhm, also don't use title to compare inventories

obtuse gale
#

just remove the .getTitle()?

hot hull
#

No, use either inventory holders and make your own inventory, or something else

obtuse gale
#

Im using a hashmap to keep the inv

#

and save the hashmap into a file ondisable

#

and load it onenable

hot hull
#

Make an interface which will contain a uuid of the inventory

#

(and the base inv methods), and use that to compare the inventories

obtuse gale
#

But everything works good

#

The only problem is close event

#

The animation

hot hull
#

Might need to use packets if it's doesn't show up normally

obtuse gale
#

Maybe due to a setCancelled(true); event

hot hull
#

perhaps

obtuse gale
#

Try updating the block on close
But how do I update the block?

#

I should start with that

hot hull
#

block#update();

#

I believe is the method

obtuse gale
#

Ok ty

#

And should I make a update() method for it?

#

Gives an error and Thats the solution

#

or should I include ENDER_CHEST somewhere?

pale crown
#

Hi I'm fiddling around with the Mojang api and am trying to get the users skin as like a JPEG but the API returns this:

{'id': '9f9cc91354cf4c4fae4deaf7f258cea9', 'name': 'Dinoosawruss', 'properties': [{'name': 'textures', 'value': 'ewogICJ0aW1lc3RhbXAiIDogMTU5MjMwMzc5NDQwNywKICAicHJvZmlsZUlkIiA6ICI5ZjljYzkxMzU0Y2Y0YzRmYWU0ZGVhZjdmMjU4Y2VhOSIsCiAgInByb2ZpbGVOYW1lIiA6ICJEaW5vb3Nhd3J1c3MiLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWRiZTlkZTg3MWNjOTFhNjUyMGFmMTRjZWJkYzc0ZWRiMTIyMmZhMjFiODdjMzAwMDZlMTVhYzVmZmU5MmQ1ZiIKICAgIH0KICB9Cn0='}]}```
#

Any idea how I could convert that to some kind of jpg or png?

distant sun
#

Use a base64 converter to turn that "value" into a json that contains the url to the image @pale crown

obtuse gale
#

Frosty

#

I don't think thats the correct method?

pale crown
#

Ahh ok thanks @distant sun

distant sun
#
{
  "timestamp" : 1592303794407,
  "profileId" : "9f9cc91354cf4c4fae4deaf7f258cea9",
  "profileName" : "Dinoosawruss",
  "textures" : {
    "SKIN" : {
      "url" : "http://textures.minecraft.net/texture/edbe9de871cc91a6520af14cebdc74edb1222fa21b87c30006e15ac5ffe92d5f"
    }
  }
}```
pale crown
#

How does one decode that?

#

@distant sun

#

Nvm

#

Thanks for the help

heady birch
#

json

topaz bay
#

@obtuse gale because you havent wrapped it in braces bruh

obtuse gale
#
{
coolGenerator69: {
  item: {
    type: "STONE"
    meta: {
      name: "coolBlock69"
      glowing: true
    }
  }
  // How many Items should spawn per minute in each tier, in order of ascending tier
  speedTiers: [5,10,15,20]
  // How long until it should tier up from beginning of game
  timeToTiers: [5,10,15,20]

  locations: [
    "420,69,420",
    "410,69,420",
    "400,69,420"
  ]
}
}```
#

REE

hot hull
#

Masive ree

topaz bay
#

I literally just copy pasted what you have

#

And just for fun, I emulated your exact code

#

That reads from a file, and uses type inference to pass the key and value types

#

It works fine

#

You need to write some debug statements to make sure youre actually pulling the data you expect you are

obtuse gale
#

block#update();
@hot hull doesn’t work?

#

Oops I didn’t tag

#

Happened automatically

#

How do you test things like that sx? Is there a faster way to check if my korm is valid other than just building the plugin everytime?

topaz bay
#

I told you to write test classes

#

Also, you can just print the text of the file

obtuse gale
#

whats a test class?

topaz bay
#

oh dear god in heaven

obtuse gale
#

lol

#

or do you just mean like a test command

#

or is there something idk about

topaz bay
#

In your project

#

There are three folders

obtuse gale
#

oh that package i never use?

topaz bay
#

1 is your entire project

#

2 is main, 3 is test

#

inside of the test directory, theres java or kotlin

#

put java or kotlin code in there

#

and you can run it

#

In IntelliJ

obtuse gale
#

oo

jovial warren
#

@ocean quartz is my class supposed to extend CommandBase?

#

I guess so

ocean quartz
#

Yeah

jovial warren
#

👍

#

what about loading these commands?

#

do I have to register event listeners in my JDABuilder or do they just automatically load?

#

because I can see this CommandManager class must do something

ocean quartz
#

Loads automatically

jovial warren
#

ah okay

ocean quartz
#

The CommandManager handles all that stuff

jovial warren
#

what about my bot token?

#

do I need to still create my own JDA instance or do I feed that in some how

ocean quartz
#

I mean you always need to have a JDA instance, you have to pass it to the CommandManager

jovial warren
#

ah okay

#

so I instantiate CommandManager and pass it a JDA instance got it

#

cheers Matt

ocean quartz
#

Yeah ;p

jovial warren
#

then I just call register() to register my command

#

now time to see if this damn bot will actually work properly lol

#

because lava player isn't exactly the easiest thing to get the hang of imo

ocean quartz
#

Yeah then register the command, messages, etc using it
I can tell yeah

jovial warren
#

that's the demo it gives you for JDA

#

trying to convert that to Kotlin is a nightmare

#

and I know I could've done this so much better

#

for now it only works with direct URLs

heady birch
#

Tempted to build a library for spigot but not sure what

jovial warren
#

finally the mother fucker plays music lol

#

also, is there a way to change what the bot outputs if the command doesn't exist @ocean quartz ?

ocean quartz
#

Yeah with the registerMessage, register a new one with cmd.no.exists as the id and it'll override it

distant sun
#

custom message when smh Matt

ocean quartz
#

Wdym?

jovial warren
#

ah okay

#

also this lava player is really lacking a wiki on how to use it

#

or something

distant sun
#

oh

#

for command doens't exist

#

I was talking about wrong usage xd

ocean quartz
#

Still though which custom messages you want? ;o

distant sun
#

for usage

ocean quartz
#

I mean you can always do that no? ;o

distant sun
#

how?

#

there's only one message for usage

#

which is hardcoded

jovial warren
#

who here knows how to use lava player

ocean quartz
#

Oh wait not yet implement on the JDA

jovial warren
#

because the documentation on how to use it is atrocious

distant sun
#

I know it's not xd

ocean quartz
#

Gaby there is no hardcoded message all messages are overridable

distant sun
#

smh matt

#

let me set an usage message for each command and I will shut up xd

ocean quartz
#

later

distant sun
#

lazy mf

ocean quartz
#

shhhh

distant sun
#

lazyyyy

hot hull
jovial warren
#

looks cool, but that's bound to cause some FPS drops

distant sun
#

looks nice

hot hull
#

Gotta adjust the density etc

#

But yea, smexy

obtuse gale
#

unlike 1.8

hot hull
#

Stfu Aj

onyx loom
#

imagine getting fps drops in mc Kappa

distant sun
#

Imagine thinking the game it's well made

hot hull
#

Imagine playing MC when not having frame drops

onyx loom
#

n1 frosty

obtuse gale
#

imagine playing 1.8 MC

onyx loom
#

u got me there

heady birch
#

Nice good job

hot hull
#

Aj

#

Do you have mad stacks?

#

I think not

obtuse gale
prisma wave
#

@topaz bay how are you parsing tuples when they could be paranthesized expressions? I mean for example 1 + (2 * 3) could parse as a single value tuple (2 * 3) or it could be a paranthesized expression 2 * 3

#

currently they're parsing as tuples and i'm not sure how I could avoid that

#

apart from using different syntax

heady birch
#

Don't have tuples

prisma wave
#

why not D:

#

tuples good

heady birch
#

Well

prisma wave
#

#(1, 2) I guess I could use something like that

heady birch
#

Maybe require a type or something

prisma wave
#

or require a tuple to be at least 2 values

heady birch
#

new byte(){}

#

bit like java

#

new byte[]{}

prisma wave
#

🤔

#

that's kinda ugly tho

heady birch
#

But doesnt look like the style of your language

#

Yeah

#

kotlin style

#

tupleOf()

prisma wave
#

that's another option

#

but then I'd need to make some native function to instantiate them behind the scenes

#

which i kinda want to avoid

#

they should be a language feature rather than part of the standard lib

topaz bay
#

Oh

#

I actually don't have a thing for that

prisma wave
#

oh

topaz bay
#

Tuples have to be more than 1 value

#

Its kinda useless to have a single value tuple

prisma wave
#

yeah I'll probably go down that route as well

topaz bay
#

Its kinda in the name

prisma wave
#

precisely

topaz bay
#

lol

#

Hmm

#

So my logic for parsing tuples actually only even begins after a comma is found

prisma wave
topaz bay
#

Consequently

#

This works

prisma wave
#

yeah I'm doing the same pretty much

topaz bay
#

LOL

#

Oh the joys of side effects

#

I think I'll keep it tbh

prisma wave
#

that's kinda nasty

topaz bay
#

¯_(ツ)_/¯

#

I mean, its a pretty good syntax for it

prisma wave
#

i guess

heady birch
#

Now how would one fit 400k rows in a Jtable

#

Pagination pretty much the best option

old wyvern
#

OH DAMN
@hot hull
ayyy gj man

topaz bay
#

Annndddd

#

I just completely rewrote type parsing

#

AGAIN

#

=paste

compact perchBOT
#
HelpChat Paste

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

topaz bay
#

ouch

#

However comma

#

This new version is much more stable and logical

#

so yay

prisma wave
#

still gross

topaz bay
#

Wheres your type parsing?

prisma wave
#

somewhere

#

among the spaghetti

topaz bay
#

Mhmm

#

frigga could never

prisma wave
#

oh?

#

we'll see

#

we will see

topaz bay
#

:O

#

THEIF

#

LMFAO

#

How dare you!!!!

prisma wave
#

that's not theft

#

yours is a sealed class

#

mine isn't

hot hull
#

It's called advancement

prisma wave
#

precisely

hot hull
#

Improvement should you call it

topaz bay
#

Thats kinda backwards though

prisma wave
#

does your language do absolutely nothing? I don't think so. therefore frigga is better

topaz bay
#

As sealed classes are an improvement over abstract classes

prisma wave
#

you have to have them all in the same file though

#

which is ugly

topaz bay
#

Encapsulation

#

plus theyre all SUPER simple

prisma wave
#

this is a classic case of frigga good odin bad

#

you clearly don't get it

topaz bay
#

Woooowwww

#

Hater and a Thief

#

Who's shocked

#

Not me

prisma wave
#

it's not theft if it's OSS and you change it

topaz bay
#

FUCK

prisma wave
#

i took some inspiration

#

you should be flattered

topaz bay
#

Inspiration my ASS

#

Its the exact same

#

xD

prisma wave
#

IT'S NOT

topaz bay
#

LIES

prisma wave
#

literally nothing alike

topaz bay
#

LMFAO

#

YOU WHORE

prisma wave
#

WTF

#

you're just jealous

topaz bay
#

Wait

#

Does your property define both define and assign?

prisma wave
#

i think so

#

yes

#

it's the same syntactically

#

yeah it does

topaz bay
#

yikkkeeesss

#

Can't relate

prisma wave
#

i see nothing wrong with this

#

they're pretty much the same process

jovial warren
#

yeah, totally totally different

topaz bay
#

What about classes?

#

And functions?

prisma wave
#

what about them?

topaz bay
#

Wow... I'm... a 4head...

prisma wave
#

ew

jovial warren
#

makes a change

topaz bay
#

This is why you don't write code at 2+am

jovial warren
#

indeed

#

I'm still trying to get my head around lava player

topaz bay
jovial warren
#

also, there's probably something really really wrong with that, but what exactly is the issue?

topaz bay
#

quitScope is being called no matter what

#

Theres no reason to have to calls

jovial warren
#

okay yeah

#

actually is it though?

#

because break will exit the for loop

#

meaning that second quitScope() doesn't get called

#

what does quitScope() do though?

topaz bay
distant sun
#

what's that text saying Sxtanna, 5/18/2020 2:45 AM?

topaz bay
#

old and new

prisma wave
jovial warren
#

okay yeah that's dumb sx

topaz bay
#

Its gittoolbox

prisma wave
#

that's not even supposed to happen but EZ

topaz bay
#

And yes, the second one wouldn't be called

#

But it doesnt need to be there at all

#

Its going to be called no matter the conditions

#

It should be outside of them

jovial warren
#

yeah I see what you mean

topaz bay
#

join and quit scope move the current program scope

jovial warren
#

ah okay

topaz bay
#

Properties can be redefined inside of deeper scopes

#

technically, everything that can be defined, can be redefined in a deeper scope

#

And the context just searches in to out

jovial warren
#

also why tf am I getting Error: Could not find or load main class dev.bombardy.bardybot.BotKt when trying to run my main method in Kotlin?

topaz bay
#

reimport your project

jovial warren
#

isn't Kotlin supposed to create that at runtime

#

okay

#

how do I do that?

topaz bay
#

not reimport

#

I meant reload

#

open the gradle window, and click the circle arrows

jovial warren
#

just exit IntelliJ and reopen it?

#

okay

#

"Reload All Maven Projects" that'll be the one

#

and yes, I am still using Maven

topaz bay
#

You disgust me.

#

Why would you ever do that

jovial warren
#

it's what I'm used to

topaz bay
#

That's not an excuse

jovial warren
#

if I can get Gradle to create the src and test directories when I create new modules then I'll use it

topaz bay
#

It literally does

#

I dont understand how you can possibly fuck that up

jovial warren
#

it literally doesn't, otherwise I'd be using it

#

idk

#

I didn't fuck it up

topaz bay
#

Do you not have the java or kotlin plugins defined?

#

It only makes them when you have them defined and enabled

jovial warren
#

idk

topaz bay
#

for obvious reasons

jovial warren
#

do I need to do that manually?

topaz bay
#

Its literally just this

#

At the top of your gradle build

jovial warren
#

ah okay

#

also, JDA vs Discord.js

topaz bay
#

thats... not a question

prisma wave
#

it's personal preference

#

discord.js uses reactor no it doesn't that's discord4j

jovial warren
#

JDA isn't fucking well documented

prisma wave
#

which has a bit of a learning curve but is arguably more powerful

topaz bay
#

WHAT

#

Yes it is?!?!?!

jovial warren
#

well, not on the Wiki

#

or actually idk

#

I think JDA isn't too bad

#

it's Lava Player that's the real bitch

#

anyone here ever used lava player before?

distant sun
#

jda over d.js anytime tbh

topaz bay
#

Absolutely not.

jovial warren
#

what do you use for discord music bots?

prisma wave
#

dumb question but how does one loop through a directory in resources without copying it somewhere?

jovial warren
#

also:

plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.3.72'
}

group 'dev.bombardy'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

compileKotlin {
    kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}
compileTestKotlin {
    kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}

is that fine sx?

topaz bay
#

Change the values "1.8" to JavaVersion.VERSION_1_8

jovial warren
#

and define that somewhere?

topaz bay
#

?

#

No

jovial warren
#

nvm

#

lemme update that now

#

so that's fine now?

topaz bay
#

pretty much

jovial warren
#

it's underlining the kotlinOptions and saying "No candidates found for method call kotlinOptions"

#

is that fine?

topaz bay
#

Yeah, that happens

#

Ignore it

jovial warren
#

okay

topaz bay
#

It should go away when you reload it

#

sometimes it does, sometimes it doesn't

jovial warren
#

okay

#

now I need to depend on JDA

#

and also something that can handle music playing

#

idk what to use since lava player has literally no documentation on most things

#

anyone got any ideas?

topaz bay
#

How does it have no documentation?

jovial warren
#

nothing there about searching

topaz bay
#

That... would have nothing to do with the player?

jovial warren
#

searching youtube is something that lava player supports

#

I checked the source files and it's in there, but there isn't anything on it anywhere else

topaz bay
#

Wdym it supports searching?

jovial warren
#

it supports searching youtube, soundcloud, etc. for tracks/videos

pallid gale
#

jda over d.js anytime tbh
@distant sun 😮

jovial warren
#

yeah that's what I mean gaby

#

but I don't see any docs on how to use it anywhere

topaz bay
#

Thats kinda odd

jovial warren
#

what's odd?

#

the lack of documentation or the ability to search for results?

topaz bay
#

The ability

jovial warren
#

lava player is a music playing API, not a discord voice API

remote goblet
#

lavaplayer annoys and scares me

#

i gave up with that a long time ago

jovial warren
#

idk what else to use lol

remote goblet
#

by a long time ago

jovial warren
#

maybe just JDA's API

remote goblet
#

i mean like

#

14 hours ago

jovial warren
#

lol

topaz bay
#

I'm aware its a music playing api

#

But it seems out of scope to support searching for music

#

It should be just a simple input output

jovial warren
#

idk

distant sun
#

you can probably just use the youtube api

jovial warren
#

yeah true

#

or I could use LavaClient

#

which is the API made by the same guy who made FredBoat

distant sun
#

isnt that in js?

prisma wave
#

fredboat is java

jovial warren
#

^^^^

topaz bay
#

HEY

prisma wave
#

smh

topaz bay
#

Thats me underneath all those pixels

prisma wave
#

badtanna dies

topaz bay
#

LOL

prisma wave
#

nothing new there

topaz bay
#

Bruh

#

He fucking 1 clipped me

#

What was I supposed to do

jovial warren
#

who's clapped face is that?

topaz bay
#

Also..

#

ITS KRAGIEE

#

Theres no beating that

ocean quartz
topaz bay
#

Its always fun seeing myself in these videos

remote goblet
#

wait

jovial warren
#

lol

topaz bay
#

I should become a streamer ;(

remote goblet
#

fredbot has some kotlin

jovial warren
#

FredBoat is Kotlin

ocean quartz
#

You should

#

Do it

remote goblet
#

:o

topaz bay
#

NO

ocean quartz
#

DO IT!

topaz bay
#

Well maybe...

#

idk

distant sun
#

I should become a streamer ;(
@topaz bay or videochat

topaz bay
#

I just found a clip from one of my old videos

ocean quartz
#

I have a cringe af youtube video out there, the only video i ever spoke on, 10 minutes cod ghosts gameplay lmao

hot hull
#

@topaz bay onlyfans

onyx loom
#

????????

topaz bay
#

oooooo I have a clip of warzone too

#

Scariest moment of my life

onyx loom
#

hey saw that before

topaz bay
#

warning, I said a no no word

onyx loom
#

what the f

ocean quartz
#

You play with motion blur on, disgusting

topaz bay
#

Here is where I made a whole squad go boom