#dev-general

1 messages · Page 110 of 1

prisma wave
#

?

old wyvern
#

Also, is there any benefit of choosing ubuntu over cent?

jovial warren
#

CentOS is basically Red Hat Enterprise Linux without the amazing support team

prisma wave
#

Ubuntu is more widely supposed afaik

#

supported*

old wyvern
#

ah

prisma wave
#

Most tutorials target that

obtuse gale
#

Can I change roots password through ssh?

prisma wave
#

Since it's most widely used

jovial warren
#

CentOS has more built-in repos though

prisma wave
#

passwd @obtuse gale

obtuse gale
#

no like

#

the mysql one

jovial warren
#

ELrepo and EPEL are very, very large repos

prisma wave
#

Built in repos make practically no difference

jovial warren
#

suppose they technically aren't built-in lol

old wyvern
#

webmin + lamp good ?

prisma wave
#

lemp > lamp

jovial warren
#

a lot of Ubuntu guides I've seen use curl | bash

#

to download install scripts

old wyvern
#

nginx?

prisma wave
#

Apache bad

old wyvern
#

lol

jovial warren
#

I recommend caddy personally

#

so much easier to configure, handles SSL cert installation for you

old wyvern
#

Im not too familiar with linux so idk, lamp comes preinstalled if needed

jovial warren
prisma wave
#

Anything that isn't Apache is fine

old wyvern
#

so no lamp?

prisma wave
#

XML

jovial warren
#

@old wyvern nope

prisma wave
#

I'd recommend doing it yourself

#

It's fairly simple

#

and a good skill to have

jovial warren
#

what's LAMP stand for again?

old wyvern
#

Alrighty, I guess I gotta learn this shit someday

#

Linux, Apache

prisma wave
#

something Apache mysql and PHP

#

yeah Linux

old wyvern
#

Mysql php

jovial warren
#

Linux
Apache -> Caddy
MySQL -> MariaDB
PHP -> JS

so LCMJ

old wyvern
#

test

prisma wave
#

@old wyvern digitalocean has some very good guides to setting up lemp and a server

jovial warren
#

JS is much more responsive and has many less loopholes than PHP does

prisma wave
#

configuring permissions etc

jovial warren
#

though JS isn't really a good language

old wyvern
#

Alrighty ill check em out

prisma wave
#

Both PHP and JS can be fine

rotund egret
#

Js -> kotlin

prisma wave
#

JS is the hipster language

#

Or typescript

distant sun
#

✌️

#

Hypster

jovial warren
#

yeah idk how good Kotlin/JS is

distant sun
jovial warren
#

but definitelly LCMP instead of LAMP

#

or LNMP

#

but I recommend LCMP

distant sun
#

🪔

#

🛋️

jovial warren
#

MariaDB over MySQL any day though

old wyvern
#

So wait

#

Node should be installed right?

jovial warren
#

actually, CCMP

prisma wave
#

Not necessarily

jovial warren
#

CentOS
Caddy
MariaDB
PHP

prisma wave
#

node isn't necessary on the stack

#

Apart from for specific apps

jovial warren
#

if you're using PHP do you even need node?

#

also, node bad

old wyvern
#

I would need that for JS backend right?

prisma wave
#

Yes

jovial warren
#

every time I think node I think npm, and that reminds me of the is-promise thing

prisma wave
#

1 line packages

#

tasty

distant sun
#

Whats that

jovial warren
#

what's what?

rotund egret
#

That is a word, but that's not important right now,

old wyvern
distant sun
#

1 line packages
@prisma wave

prisma wave
#

npm packages that are literally 1 line long

#

there's 1 to check if strings are empty iirc

#

and it's literally return s && s.length != 0

#

or there's a package to check some regex but the package is like 4x the size of the actual regex

jovial warren
#

literally one change to is-promise broke firebase-tools, angular cli, aws serveless cli, create react app and a load of npm packages

jovial warren
#

anyone know how I can generate some sort of application file that I can port to my server from this project?

prisma wave
#

wdym?

jovial warren
#

like a JAR or some sort of BIN file idk

#

actually yeah it'd need to be a JAR since it takes system properties

#

with gradle*

#

is it shadowJar or something like that?

prisma wave
#

shadowjar makes a fatjar

#

that might be what you want

#

probably is

onyx loom
#

does it matter if im making a recursive call? only asking as IJ as highlighted it with a symbol

prisma wave
#

nah it's just to show

#

recursion is useful sometimes

onyx loom
#

👍

rotund egret
#

Recursion isnt Inherently bad, it just can be

prisma wave
#

quite

jovial warren
#

be very careful to not run in to an infinite loop though

prisma wave
#

indeed

jovial warren
#

to avoid infinite loops you can use lazy {} I think

prisma wave
#

uh

#

how do you mean

rotund egret
#

IJ wont run inf loops pretty sure.

jovial warren
#

surround the recursive function with lazy

#

it will

#

but not forever

rotund egret
#

Pretty sure it force stops it

#

Well yeah

jovial warren
#

yeah

#

it'll just get to the point where it gets fed up and throws an error to say "hey can you please stop making me repeat the same action over an over again?"

prisma wave
#

eventually the jvm will throw a StackOverflowError

jovial warren
#

^^^^

onyx loom
rotund egret
#

I've accidentally done that before a few times

prisma wave
#

We all have

jovial warren
#

^^^^

#

anyway, about my JAR, I just need a JAR file that has everything I'm depending on in it

prisma wave
#

shadowJar is what you want then

jovial warren
#

okay

prisma wave
#

Will include every implementation or compile dependency but not compileOnly

jovial warren
#

what's the difference between implementation and compile by the way?

prisma wave
#

compile is deprecated

#

implementation isn't

jovial warren
#

also, anyone got a good shadowJar configuration or do I not need one

prisma wave
#

Implementation also hides the dependency when used transitively

jovial warren
#

can I just use apply plugin

prisma wave
#

You don't really need one

#

don't use apply plugin

rotund egret
#

It's not that hard to setup

prisma wave
#

That's deprecated too

#

use the plugins block

jovial warren
#

okay

obtuse gale
#

anyone else ever liek

#

get halfway through a project

#

then think

rotund egret
#

Never

heady birch
#

bro

obtuse gale
#

Theres a million ways i couldve done this better

heady birch
#

every one

jovial warren
#

wait why's it downloading ant?

prisma wave
#

always

heady birch
#

I have 3 projects they are the same project but i did it 3 times for whatever reason

prisma wave
#

transitive perhaps

jovial warren
#

what's ant got to do with gradle?

prisma wave
#

idk

rotund egret
#

Just finish the project, dont make it better until after its done.

prisma wave
#

In theory nothing

#

I've never seen it download ant before

#

Maybe some dependency needs it for some reason

jovial warren
#

where does it output the JAR to?

#

wait do I need to run a certain gradle task like I do with maven's package or is build supposed to do it?

#

probably the shadowJar task

obtuse gale
#

its now 1am

#

and im like

#

what the fuck have i done

jovial warren
#

okay I ran that and it came out in build/libs as BardyBot-1.0-all.jar

#

what does the all in that mean?

prisma wave
#

It's the shaded jar

rotund egret
#

You can also make it so it compiles shadow by default.

prisma wave
#

with dependencies included

jovial warren
#

can I make it come out as @projectname@-@version@?

prisma wave
#

yes

rotund egret
#

You can, part of the shadow jar settings in gradle

prisma wave
#

In the shadowJar closure

#

It's something like artifactName iirc

#

Check the docs

jovial warren
#

the docs are the same ones that still use apply plugin (and also have the plugins block nvm)

rotund egret
#

Also, blossom is really nice as well if you need info from your gradle in your project as well

I specificy versions in gradle and they show up in my main project as well, really nice.

prisma wave
#

never heard of blossom

#

ah it's like the apache one

rotund egret
#

Kyori project iirc

jovial warren
#

baseName is deprecated

prisma wave
#

yeah it is

#

still works fine iirc

jovial warren
#

in favour of getArchiveBaseName or something apparently

prisma wave
#

there's definitely an alternative though

#

lemme check

jovial warren
#

archiveName?

#

that's deprecated too though

prisma wave
#

archiveFileName.set("${project.name}.jar") that's with the kotlin DSL but is probably very similar in groovy

jovial warren
#

I think I am using Kotlin's DSL

prisma wave
#

build.gradle.kts?

jovial warren
#

no

#

but it's the exact same

prisma wave
#

you're not then

#

yeah it's similar in syntax

jovial warren
#

haven't found anything that's different yet

prisma wave
#

the dsl does look different

#

ah

#

oops

jovial warren
#

lol

prisma wave
#

forgot i changed my server ip

jovial warren
#

right now time to rsync that file over to my server behind me

#

hopefully it connects to the internet just fine

#

ah crap I think I gotta set it up again

prisma wave
#

there we go

#

that's better

#

that's how the dsl looks

jovial warren
#

ah okay

prisma wave
jovial warren
#

for some reason CentOS doesn't like my WiFi dongle so I have to use a WiFi repeater with an ethernet cable

prisma wave
#

rip

jovial warren
#

and the WiFi repeater breaks every time it's unplugged

#

it disconnects from the network

prisma wave
#

wifi drivers on linux are a wonderful thing

jovial warren
#

yeah

#

even though the driver for my dongle is literally built-in to the kernel, and it didn't require any setup on Arch (even though this is running 5.6 and CentOS 8 runs 4.18 I think I'd still expect it to just work)

#

but it just doesn't connect

#

actually no that's a lie

#

it doesn't appear on the list

#

well, I suppose this thing is a Dell Optiplex computer

#

so old USB 3.0 didn't even exist back then

#

cost me £40 on Ebay

#

you get what you pay for I suppose

#

I should just rent a dedi

heady birch
#

Oh did you buy one of those refurb dell pcs?

jovial warren
#

yeah

heady birch
#

I was thinking about that, cheap and alright specs

jovial warren
#

yeah it's not too bad for what I paid for it

#

it has a pentium, 4GB RAM and 320GB HDD

#

is it worth getting a dedi though is my question

#

I mean it could be useful

#

and I can pick one up for quite cheap from SYS

#

SYS has verification though so I'm not sure

jovial warren
#

and just found out you gotta be over 16

#

ffs

old wyvern
#

SYS?

jovial warren
#

SoYouStart

#

basically OVH but affordable prices

#

and OVH is over 18

ocean quartz
#

is there a way to force gradle to copy a file even if the file is in use?

obtuse gale
#
public class OreGilde implements Listener {
    
    private final HashMap<UUID, Integer> oresMined = new HashMap<>();
    
    private final EnumSet<Material> types = EnumSet.of(Material.DIAMOND_ORE, Material.EMERALD_ORE, Material.GOLD_ORE, Material.IRON_ORE, Material.COAL_ORE);
    
    @EventHandler
    public void onBreak(BlockBreakEvent event) {
        Player player = event.getPlayer();
        Block block = event.getBlock();
        
        if (player.hasPermission("Ore.Gilde")) {
        if(types.contains(block.getType())){
            player.sendMessage("You mined an ore and 1 was added to the ore gilde");
            
        }
        }
}
}```
What do I do to make it to perform something when the hashmap oresMined reaches 3
#

something like if(oresMined == 3){
}

hot hull
#

Liskov

prisma wave
#

oresMined.get(player) == 3

ocean quartz
#

those brackets make me wanna cry

prisma wave
#

and yes liskov please

obtuse gale
#

ikr Matt

#

xd

hot hull
#

Press Ctrl + Alt + L

#

Please

ocean quartz
#

Ctrl + Alt + L

rotund egret
#

Ctrl + alt + L

obtuse gale
#

ø

old wyvern
#

L

hot hull
#

Ł

old wyvern
#

🇱

ocean quartz
#

Oh wtf the new github design

frail glade
#

Wait did they make it live or is it still feature preview?

ocean quartz
#

Still feature preview

frail glade
#

Okay

#

Yeah it's... Interesting.

ocean quartz
#

I like the icons but the top bar is .. too big

hot hull
#

It's nice, just the red doesn't suit it imo

jovial warren
#

I don't like where everything is

#

that top bar is a little too far to the left for me

hot hull
#

Might just be Matt wonky screen size

jovial warren
#

no I've seen the preview myself

#

and the rounded buttons just don't quite suit GitHub

#

in fact, the rounded everything doesn't quite suit GitHub

prisma wave
#

I think that might be a theme or something

#

It looked different for me

jovial warren
#

nah it's still rounded for me

hot hull
#

It's the preview feature

ocean quartz
#

What you mean wonky screen size xD

prisma wave
#

I'm using the preview feature too

#

But the buttons looked different for me

hot hull
ocean quartz
#

You're not using the preview

hot hull
#

I am

ocean quartz
hot hull
#

oh

ocean quartz
#

Told you

hot hull
#

I mean

#

Looks decent

ocean quartz
#

I mean that is your wonky screen size, yours is square xD
In 16:9 looks awful

prisma wave
#

4:3 bad

hot hull
#

It's nice ;c

ocean quartz
#

It was nice 20 years ago

jovial warren
#

yeah in 16:9 it looks terrible

rotund egret
#

Ultrawide is bae

jovial warren
#

who tf even uses 4:3 any more?

hot hull
#

I do

rotund egret
#

CRT users

jovial warren
#

what are you using? some fucking tablet?

ocean quartz
hot hull
#

Philips

#

190C

ocean quartz
#

Oof i used to have a similar one

hot hull
#

Got a 170C as well

ocean quartz
#

@topaz bay Kinda confused about how to do abstraction for entities 🥺
Basically the entity let's say a fox needs to extend EntityFox which means it can't extend the abstract pet class
And it be awful to repeat code for all entities for all versions

heady birch
#

Usually

topaz bay
#

composition over inheritance?

heady birch
#

EntityFox extends Fox extends Pet

#

but I guess you have to do it the wrong way round

topaz bay
#

I mean, deep inheritance is a common antipattern in OOP

heady birch
#

Child extends Person extends Human extends Entity extends Object

frail glade
#

So all humans are objects?

hot hull
#

Yes

ocean quartz
#

Well Niall that would work if EntityFox was made by me
I already have it implement Pet, which will share the methods, but my issue are small things like setting the custom pathfinders and things like that

old wyvern
#

Have an abstract Pet that wraps an Entity then extend it passing in a instance of EntityFox?

ocean quartz
#

Alright i think i have a way in mind, let me try it

heady birch
#

Yeah i guessed it was minecraft EntityFox

jovial warren
#

also guys, little bit of promo here, BardyBot's live if you wanna give him a try

#

lemme just get an OAuth2 link

topaz bay
#

permissions..... 8....

#

y

jovial warren
#

idk

#

makes it easier

#

should probably change his perms though

obtuse gale
#

perm8 is a no no

jovial warren
#

lemme rethink the perms then

obtuse gale
#

😛

jovial warren
#

he needs to be able to talk in any text channel, and join and speak in any voice channel

topaz bay
obtuse gale
#

what does it do?

errant geyser
#

Sooo BomBardy hows Privaritine (please don't hurt me) doing?

jovial warren
#

plays music

#

Sooo BomBardy hows Privaritine (please don't hurt me) doing?
Prevarinite

#

and it's doing alright

obtuse gale
#

Okay so im fairly new to developing and i want to get into java and minecraft development. Could you give me some advice on where to start and what tools to use? Im really dedicated to learn and get into it.

jovial warren
#

I'd highly, highly recommend IntelliJ

prisma wave
#

Intellij & a decent java tutorial is pretty much all you need

obtuse gale
#

is intellij free?

jovial warren
#

CE is

#

and CE is OS

obtuse gale
#

yeah then thats fine

#

alright

#

and a decent java tutorial 👀

jovial warren
#

also I'd recommend learning how to use a build automation tool

obtuse gale
#

any recommendations for good ones?

jovial warren
#

you want a paid one or free one?

obtuse gale
#

pretty tough picking one out without good knowledge of the subject

#

i honestly dont mind if its paid

#

i think theyre better tbh

jovial warren
#

because I know one that I learned to use from Udemy, it's £9.99, and it's absolutely amazing

ocean quartz
#

Stay away from youtube for good ones

jovial warren
#

Stay away from youtube for good ones
yes

obtuse gale
#

i found the one from udemy

ocean quartz
#

This is great

jovial warren
#

that's the one that taught me how to code

#

well, somewhat taught me

obtuse gale
#

i do like to learn by doing, seems like the jetbrains one is a good fit for me

#

the community version on this page is what i need right?

prisma wave
#

I used sololearn but in retrospect it kinda sucks

obtuse gale
#

its pretty tough to find the right one

prisma wave
#

indeed

obtuse gale
#

but its mainly about getting a start i think

prisma wave
#

kinda personal preference

#

yeah definitely

obtuse gale
#

but if you have some that you really liked then id prefer to take them

prisma wave
#

hyperskill / jetbrains academy is good from what I've seen

jovial warren
#

after you learn Java, you should learn Kotlin

errant geyser
#

Can I just say Sololearn sucks ass

jovial warren
#

and I say after mainly if you haven't programmed before, and because Kotlin is heavily based from Java

obtuse gale
jovial warren
#

3148800 is view channels, send messages, connect and speak

errant geyser
#

I see we've moved from 8 to 3148800

#

Ah

obtuse gale
#

that should be good

jovial warren
#

though I doubt he'll be able to access restricted channels

errant geyser
#

People tend to give bots roles with higher permissions if they want them to have them

jovial warren
#

idk how those type of discord perms work

#

People tend to give bots roles with higher permissions if they want them to have them
I only had permissions 8 because it made things a lot easier

obtuse gale
#

is jetbrains the same thing as hyperskill or?

jovial warren
#

plus popular bots like Rythm are 8

errant geyser
#

Yeah most bots are on 8 because its the easiest to tick and not have to deal with permissions questions

jovial warren
#

^^^^

prisma wave
#

god i forgot how shit functional programming in java is

jovial warren
#

if anyone's actually adding him, let me know what his permissions are like

errant geyser
#

What does he do?

obtuse gale
jovial warren
#

plays music katsumag

prisma wave
#

i would literally kill for coroutines & the kotlin collections lib rn

#

nice @obtuse gale

obtuse gale
#

which boxes to tick? 😛

prisma wave
#

I'd do 64 bit, path, open folder, and all the file types

jovial warren
#

same as above

errant geyser
#

You can leave em all blank if you want to, but probably PATH and associations

#

Also context menu

jovial warren
#

and the 64-bit launcher

obtuse gale
#

errant geyser
#

Thats a shortcut

#

I despise shortcuts

obtuse gale
#

i dont use shortcuts but i put em on my desktop anyway

errant geyser
#

.-.

obtuse gale
#

😂

errant geyser
#

Intellectual

obtuse gale
#

is there a discord presence addon for IntelliJ?

prisma wave
#

yes

errant geyser
#

Yeah

#

Called the Discord plugin

#

Also Material theme + UI you should probably get to beautify your IDE

obtuse gale
#

Yeah I need that

#

You guys are too helpful ❤️

jovial warren
#

I just use the default darcula theme, looks fine to me

#

You guys are too helpful ❤️
it's all I've ever wanted to be

errant geyser
#

Ok BM, don't lie to me, how aids is this

@Command("army")
class ArmyCommand() : CommandBase() {

    lateinit var plugin: ZombFields
    private val inventory: Gui = Gui(plugin, InventoryType.HOPPER, "Warriors")

    constructor(pl: ZombFields) {
        plugin = pl

        val pane: GuiItem = GuiItem(ItemBuilder(ItemStack(Material.STAINED_GLASS_PANE, 1, 1)).setName("").build())
        inventory.setItem(0, pane)
        inventory.setItem(1, GuiItem(ItemBuilder(ItemStack(Material.SKULL_ITEM,1, 0)).setName("Archers").build()))
        inventory.setItem(2, GuiItem(ItemBuilder(ItemStack(Material.SKULL_ITEM, 1, 3)).setName("Warriors").build()) { event ->
            event.isCancelled = true
        })
        inventory.setItem(3, GuiItem(ItemBuilder(ItemStack(Material.SKULL_ITEM, 1, 4)).setName("Bombers").build()))
        inventory.setItem(4, pane)

        inventory.setDefaultClickAction(GuiAction{event ->  event.isCancelled = true})

    }

    @Default
    fun defaultCommand(sender: CommandSender) {
        
    }

}```
#

Constructor will only be called once

jovial warren
#

aids isn't quite the word I'd use

#

maybe... FUCKING HELL

errant geyser
#

Catastrophic cancer?

#

I mean I don't see a better way to do that

prisma wave
#

ew

obtuse gale
#

wish i knew what this did

prisma wave
#

secondary constructors

errant geyser
#

KM if you can tell me how do that outside of a constructor (like pythons __init__ method) I'll do it

topaz bay
#

There is literally 0 reason for this

#
init {

}
prisma wave
#
class ArmyCommand(val plugin: ZombFields) {
    init {
      blah
    }
}```
errant geyser
#

o

#

See I didn't know that existed

prisma wave
#

smh

topaz bay
#

That property shouldnt even be lateinit

jovial warren
#

what does lateinit mean?

errant geyser
#

Its all getting changed, don't shit on it yet

topaz bay
#

late initialized

obtuse gale
rotund egret
#

It's only Initialized after 8' o'clock

prisma wave
#

don't disable any @obtuse gale

obtuse gale
#

oki

topaz bay
#

Thank god you changed your picture @rotund egret

errant geyser
#

Ugh KM my IJ has the "everything-is-white-and-no-autocomplete" thing again

topaz bay
#

😈

rotund egret
#

Yeah, it was two years old

#

Young me

obtuse gale
errant geyser
#

Yeah

#

Material Icons goes nicely with that too, but some people don't like it

jovial warren
#

but use the marketplace

obtuse gale
errant geyser
#

Yep

jovial warren
#

Settings -> Plugins -> Marketplace tab on IntelliJ

obtuse gale
#

ah yeah thats easier

#

any other good ones you recommend?

jovial warren
#

darcula

ocean quartz
#

Atom one dark

errant geyser
#

Atom One Dark

obtuse gale
#

isnt darcula default

errant geyser
#

MATT ily

jovial warren
#

yes it's the default dark theme

errant geyser
#

Finally someone agrees on the theme

jovial warren
#

just change the font

#

I use Cantarell

#

but I'm on linux

ocean quartz
#

Nothing beats Atom one dark

errant geyser
#

JetBrains mono 👀

prisma wave
#

mono best

jovial warren
#

fira isn't too bad

obtuse gale
#

aah with the material theme there are still so many choices

prisma wave
#

atom one dark best theme

topaz bay
#

fira is the best font

ocean quartz
#

^

topaz bay
#

no question

prisma wave
#

jb mono > fira

errant geyser
#

Don't listen to us, go through and find which one you like best. Though if it isn't Atom One Dark I will crucify you

topaz bay
#

false

distant sun
#

Nothing beats Atom one dark
@ocean quartz Other than Material Oceanic you mean

jovial warren
#

Cantarell for the appearance definitely

#

mono outside of the editor looks horrible

ocean quartz
#

@distant sun Nah i hate the green hue it has

errant geyser
#

Sx how do you get your ligatures thing anyway? I'm using Mono and that doesn't happen

distant sun
#

you are ugly

jovial warren
#

I use Fira Code Medium for my editor font

ocean quartz
#

I am but that's not the point here

distant sun
#

lmao

#

you mf :))

topaz bay
#

@errant geyser ?

#

wdym

#

you just check the box to enable it

#

It has to be in the font though

obtuse gale
#

alright think i got it setup now, thanks guys ❤️

rotund egret
distant sun
#

I dont think mono has font ligatures

jovial warren
#

also, JetBrains mono looks horrible

topaz bay
#

it does

jovial warren
#

it's way too compressed for me

distant sun
#

Anyways, Fira Code it's better 🙂

errant geyser
#

Sx where's the box?

topaz bay
ocean quartz
jovial warren
#

too tall and too skinny

topaz bay
#

On the same page you choose the font

rotund egret
#

I write code in wingdings

obtuse gale
#

haha wth

ocean quartz
#

It's great trust me

errant geyser
#

Matt don't you have that for Sublime too?

ocean quartz
#

Yeah

obtuse gale
#

which font do i take?

topaz bay
#

fira

#

:)

ocean quartz
#

I like mono

jovial warren
#

Fira Code Medium for editor, Cantarell for outside editor imo

topaz bay
#

I use retina

#

I use fira code retina in the editor, and jetbrains mono for everything else

jovial warren
#

yeah retina's nice, but it just isn't as thick as I like

#

you have your IDE in monospaced?

errant geyser
heady birch
#

🤢

jovial warren
#

oh my god

topaz bay
#

Thats not the editor

obtuse gale
#

your atom dark is so much different from mine

topaz bay
#

Go under editor font

jovial warren
#

🤮

errant geyser
#

I have high contrast on LEFTY

ocean quartz
#

@errant geyser Search for ligatures it's the first thing

jovial warren
#

how can one live looking at that font?

errant geyser
#

oh yeah I got it

heady birch
jovial warren
#

it's almost as bad as having your entire computer in Comic Sans

heady birch
#

Superior theme

jovial warren
#

get out

ocean quartz
#

@heady birch Die

heady birch
#

😫

topaz bay
#

That.... is not a query

heady birch
#

SHUT up

#

DONT-

jovial warren
#

yeah that is a terrible query

distant sun
#

enum

heady birch
#

ok

#

STATEMENT

jovial warren
#

also who tf queries tables directly like that?

topaz bay
#

Do you not have ultimate?

heady birch
#

STATEMENT

#

THERE YOU GO

#

YES

topaz bay
#

Add @Language("MySQL")

#

:D

jovial warren
#

you know how easily you can fuck that up?

distant sun
#

CREATE_MODEL_TABLE_QUERY_STATEMENT

errant geyser
#
@Command("army")
class ArmyCommand(private var plugin: ZombFields) : CommandBase() {

    private val inventory: Gui = Gui(plugin, InventoryType.HOPPER, "Warriors")

    init {

        val pane: GuiItem = GuiItem(ItemBuilder(ItemStack(Material.STAINED_GLASS_PANE, 1, 1)).setName("").build())
        inventory.setItem(0, pane)
        inventory.setItem(1, GuiItem(ItemBuilder(ItemStack(Material.SKULL_ITEM,1, 0)).setName("Archers").build()))
        inventory.setItem(2, GuiItem(ItemBuilder(ItemStack(Material.SKULL_ITEM, 1, 3)).setName("Warriors").build()) { event ->
            event.isCancelled = true
        })
        inventory.setItem(3, GuiItem(ItemBuilder(ItemStack(Material.SKULL_ITEM, 1, 4)).setName("Bombers").build()))
        inventory.setItem(4, pane)

        inventory.setDefaultClickAction(GuiAction{event ->  event.isCancelled = true})

    }

    @Default
    fun defaultCommand(sender: CommandSender) {
        
    }

}``` ok now that I know init {} exists, is that better Sx?
jovial warren
#

personally, I let ORM software do the queries for me

ocean quartz
#

That feature of ultimate is a blessing

jovial warren
#

yeah ultimate is way better

distant sun
#

lang comment?

heady birch
#

you know how easily you can fuck that up?
@jovial warren ?

topaz bay
#

Why are you specifying types

jovial warren
#

being able to make everything I want in the same place is amazing

errant geyser
#

Thought I had to Sx

jovial warren
#

@jovial warren ?
raw queries Niall

ocean quartz
#

Yeah highlights the string with the language syntax

heady birch
#

@topaz bay Awesome

distant sun
#

it doesn't always work though

ocean quartz
#

Even checks the DB for columns and stuff

topaz bay
#

Its pretty great

jovial warren
#

if you get one part of that query wrong, you could end up fucking up the whole database and there's no turning back

prisma wave
#

@errant geyser spacing pls

#

GuiAction{event -> event.isCancelled = true}) ew

jovial warren
#

as I said, personally, I prefer to let ORM software do the querying for me

#

GuiAction{event -> event.isCancelled = true}) ew
where's that from?

#

also tf is that

#

where's the bracket at the beginning?

obtuse gale
jovial warren
#

yeah

topaz bay
#

wdym the bracket at the beginning?

obtuse gale
#

how much out of 10 is this

jovial warren
#

Tim Buchalka is an amazing teacher

#

wdym the bracket at the beginning?
shouldn't it be GuiAction()?

ocean quartz
#

GuiAction { it.isCancelled = true } better

prisma wave
#

nah

#

not necessary if it only takes a lambda @jovial warren

jovial warren
#

sorry looked a lot like Java, couldn't recognise it lol

#

@obtuse gale 11/10

#

it literally teaches you everything

#

from the basics, to in-depth OOP, to Java FX, to concurrency, to HTTP and Database querying

heady birch
#

if you get one part of that query wrong, you could end up fucking up the whole database and there's no turning back
@jovial warren 🙁

obtuse gale
#

well that sounds positive

heady birch
#

Who does it on a production database

jovial warren
#

you'd be surprised

obtuse gale
#

im gonna buy it

jovial warren
#

this is human beings we're talking about here Niall

heady birch
#

Lol

jovial warren
#

im gonna buy it
go for it

rotund egret
#

I can suggest some free ones as well if you want

obtuse gale
#

if theyre good

heady birch
#

I might actually do that course

rotund egret
#

JetBrains Academy (free online course): https://www.jetbrains.com/academy/
Codeacademy (free online course): https://www.codecademy.com/learn/learn-java
University of Helsinki (free online course): https://java-programming.mooc.fi/
Basic Java Tutorials: https://docs.oracle.com/javase/tutorial/

JetBrains

Introducing JetBrains Academy – a hands-on platform for learning to program. Learn to program by creating working applications step by step in an interactive environment integrated with JetBrains IDEs.

jovial warren
#

yeah do it Niall

heady birch
#

Get me up to date with java 8 and 9

obtuse gale
#

how good is the jet brains one?

jovial warren
#

it uses Java 11 as well

obtuse gale
#

and is it good to start with?

jovial warren
#

no idea

#

I think it's alright

#

there's no video tutorials afaik

#

but it's very interactive

obtuse gale
#

really feel like the udemy is best if you want to learn a ton completely from scratch

topaz bay
#

the jetbrains one hooks into intelliJ

#

its kinda fire

obtuse gale
#

thats true

jovial warren
#

the paid one I sent you uses IntelliJ

rotund egret
#

Theres also a discord for java help if you want the name of it (I'm not allowed to link it)

jovial warren
#

you can get it for £9.99 though

obtuse gale
#

@rotund egret id like that

rotund egret
#

Together Java
They have good support, and they do code review as well.

#

Really informative folk

errant geyser
#

TG helped me a lot early on. Though if its for Spigot exclusively you get told to piss off into one channel nobody goes into iirc

jovial warren
#

Tim Buchalka has like 30+ years of experience or something

obtuse gale
#

lmaoo

#

@jovial warren where do i find it for 9.99?

#

its 14.99 on udemy

jovial warren
#

when I bought it, it was £9.99

#

idk whether they still have the deal where you can get any course for £9.99 if you're a new user or not

obtuse gale
#

oh i see

#

hm yeah if i click take course it just sends me to udemy

#

and there it is just 15

jovial warren
#

I guess that deal's gone away then

#

guess it's £14.99 now

obtuse gale
#

but 15 is cheap as fk already

#

by the way if any of you need some graphic designs done for free you can hmu

#

thats a thing i am good at

rotund egret
#

If you wanna design something for me to try and recreate thatd be great.
Trying to get better at it :^)

obtuse gale
#

@rotund egret uhmm okay 😂

jovial warren
#

designing requires creativity though you gotta remember that one

obtuse gale
#

@rotund egret yeah i think its a bad idea to recreate stuff

oak raft
#

I’ve been using IntelliJ for a while now, but what does it have over eclipse?

rotund egret
#

I can design, recreation is for getting used to the tools

#

Through recreation I now am familiar with the shape tools, pen tool, gradients, text settings, adding fonts, channel splitting, and a few others.

obtuse gale
#

what kind of design do you want to learn

jovial warren
#

@rotund egret you creative?

rotund egret
#

To a degree, I did design my logo currently.
It's not full of creative design, but it was my idea through and through

jovial warren
#

fair enough

#

yeah my avatar shows you what my creativity span is

#

literally all that is, is a 500x500 area with an orange background and a large "B" in Bernard MT Condensed

#

I'd like to say that's the Bardy orange, but I prefer #ff6600, and that definitely isn't #ff6600

remote goblet
#

orange ugly

jovial warren
#

get out

rotund egret
#

I'd like to work on a banner type thing if possible, but anything goes honestly.

jovial warren
#

also, the name and design of just about everything I have made shows you my creativity span

#

BardyBot came from my username, my name came from something I overheard years ago and maybe misheard slightly and decided to copy

rotund egret
#

I also considered orange for mine, since blue and orange are complementary, but it didn't look great

jovial warren
#

BardyBot's messages are based off of Rythm, in fact, originally, I was using Rythm's exact messages

remote goblet
#

plagarism

jovial warren
#

I only changed the messages slightly because I wanted to at least make something different

obtuse gale
#

@rotund egret how i learnt it is just doing. look on behance and dribbble, take things you like and try to create something similar

jovial warren
#

but I don't have the patience for creativity anyway

rotund egret
#

That's what I'm tryna do

#

Smh

jovial warren
#

I like to call myself a "manipulator", meaning I take things and change them around to my liking

#

and that includes human beings

rotund egret
#

Uhoh

errant geyser
#

r/yesyesyesno

jovial warren
#

lol

#

hey what should I add to BardyBot next?

#

I'm considering trying to use speech recognition to turn him in to a discord version of something like google home or the amazon echo

errant geyser
#

=fuck {ping}

Hey fuck you {ping}

#

Well your suggestion isn't as childish but it'll take you much longer

jovial warren
#
Me: Hey Callum
Bot: What can I do for you?
Me: Can you play me x song please?
Bot: Sure I can, coming right up
errant geyser
#

That would be cool I guess

obtuse gale
#

that would be very cool

topaz bay
#

dialogflow

hot hull
#

Machine learning AI or go away

errant geyser
#

4 year BardyStream™️ of teaching his bot english

hot hull
#

Worth it in the end

jovial warren
#

dialogflow?

errant geyser
jovial warren
#

Common Voice is a project to help make voice recognition open to everyone. Now you can donate your voice to help us build an open-source voice database that anyone can use to make innovative apps for devices and the web.

#

when I said speech recognition, I mean speech recognition

#

like actual speech

#

or deep speech, that's what I mean

topaz bay
#

dialogflow has that too

jovial warren
#

what STT?

topaz bay
#

mhmm

jovial warren
#

thing is though, it's not OS

topaz bay
#

?

#

Its a service

jovial warren
#

I personally don't like depending on CS projects

prisma wave
#

how would open source machine learning models even work

topaz bay
#

Its not a project

#

Its a service

prisma wave
#

if they're constantly being updated

topaz bay
#

By google

jovial warren
#

how does it work?

#

isn't it only available on google cloud then?

topaz bay
#

You give it values, it gives you back values

#

lol

jovial warren
#

isn't it only available on google cloud then?

topaz bay
#

No

#

Can bots even hear in discord?

#

I dont think thats a thing

jovial warren
#

yes they can

#

they can receive audio

jovial warren
topaz bay
#

Why not just pass it straight into dialogflow...

jovial warren
#

good idea

#

guess I gotta learn how this thing works then

#

I heard it was a pain to setup

topaz bay
#

Eh

#

You have to set up the intents

jovial warren
#

Matt said he had problems with it

topaz bay
#

Once you do that, its not that hard

jovial warren
#

intents?

topaz bay
#

Yes

jovial warren
#

what do they do?

topaz bay
#

They are basically descriptions of input and output

jovial warren
#

ah okay

#

yeah I can see this is a bit complex

topaz bay
jovial warren
#

all the stuff you gotta give it

topaz bay
#

This for example, is the default welcome intent

#

(plus some inputs I added)

#

It will detect those basic phrases, and return whichever response is appropriate

jovial warren
#

ah okay

#

does wake word detection work on it?

topaz bay
#

There is no concept of waking

#

You could define an intent that detects a certain phrase

jovial warren
#

and it'll what I'm gonna call "wake" to that word?

topaz bay
#

????

jovial warren
#

actually no

#

the bot is always listening

#

that's the way audio works

rotund egret
#

It only listens when the president is on the line 👀

jovial warren
#

also, could I possibly use some sort of TTS engine to respond with?

#

or better yet, just record my own voice

topaz bay
#

It has that built in

ocean quartz
#

Yeah discord already has tts

jovial warren
#

true

ocean quartz
#

test

topaz bay
#

Yeah, but dialog flow can return audio

jovial warren
#

but it sounds horrible

topaz bay
#

No it doesnt

jovial warren
#

I want this guy to sound more normal

topaz bay
#

You can use one of the wavenet voices

#

They sound pretty good

jovial warren
#

so what do I use for the responses?

#

Text Response? or whatever Custom Payload is

topaz bay
#

Why not play the audio through the bot?

jovial warren
#

that's what I want to do

#

but idk how this thing works

topaz bay
#

BRUH

#

Go play audio with these settings

#

LOL

#

Its like.... breathy and scary

#

omfg

jovial warren
#

where do I find that?

topaz bay
#

Settings > Speech

jovial warren
#

yeah that really isn't very good

topaz bay
#

Those settings arent meant to be good

#

xD

jovial warren
#

also, where is en-GB?

topaz bay
#

Doesn't have it

jovial warren
#

also, turn it down to 0.25 speed

rotund egret
jovial warren
#

also, none of these voices sound any good

obtuse gale
#
    @EventHandler
    public void onEnchantment(PrepareItemEnchantEvent event) {
        Player player = event.getEnchanter();
        int newXP = getOffers​() - 1;
    }```
I want to reduce the required level of 30 to enchant with the highest change by 1
jovial warren
errant geyser
#

Nice, now make that make sense. Also ^

obsidian hamlet
#

Pleeeeease give me a good intellij theme/scheme i've spent one hour trying to find a good dark theme and a good scheme for java 🙂

jovial warren
#

darcula with cantarell and fira code medium

#

(a.k.a default)

errant geyser
#

Atom One Dark Material UI with Orange highlight colour on high contrast. JetBrains Mono with ligatures for font

obsidian hamlet
#

alright i'll test those thanks !

jovial warren
#

monospaced outside of the editor looks doodoo

errant geyser
#

k

#

I'm not looking at it from outside an editor tho

jovial warren
#

outside the editing window thingy I mean

#

the editor

#

monospaced looks good when editing code, but outside of that it looks doodoo

topaz bay
#

Not always

#

I like monospace everywhere

obtuse gale
#

Any1 knows how to decrease the required enchanting xp with 1 level?

#

So in an enchantment table

#

For the enchantment you normally need 30, you need 29 if This happens

jovial warren
#

you use monospaced for windows font as well?

topaz bay
#

I used to have the system font set to fira

#

Didn't have values for everything though, so some things were those missing character boxes

ocean quartz
#

Just realized i use Fira lol
Also fira retina is thicc

jovial warren
#

I use whatever's default usually

#

i3 uses monospaced I think

#

waterfox uses whatever the fuck

#

discord does its own thing

#

also @ocean quartz what kind of a name for a project is "Ensinar1" lol

#

why the 1? did you fuck up the original project? lol

ocean quartz
#

It's in portuguese, it's like Lesson1, it's just a test project that i've had for far too long

jovial warren
#

ah okay

#

fair enough I guess

#

having any non-alphabetic character in a project, class, or package name is just no though lol

#

there is no other words to describe it, it's just no

ocean quartz
#

It's a test project lol

jovial warren
#

still

#

test project or no test project

#

anyway gn all

topaz bay
#

@jovial warren thats not even slightly a thing

forest forum
#

Where do I start coding? who are some of the best youtubers?

#

I want to do Configs, MySQL, GUIS, World Generators

#

I basicly want to crate a skyblock plugin where I put a Prison Mine in the center of it

#

using Mines API

eager fern
#

lmao

chilly wind
#

@forest forum I could teach you some stuff

forest forum
#

bet

obtuse gale
#

who are some of the best youtubers?
no

chilly wind
#

I'll admit some of the college professors do put out some fire videos on java programming.

#

But not minecraft plugin developers.

hot hull
#

@forest forum Simon, if you're familiar with Java read up on the basics of bukkit, experiment. If you're not, start by learning java

foggy pond
#

Wtf is up with IntelliJ's new font

obtuse gale
#

Looks normal to me,

#

but you can change the font here

foggy pond
#

Have I had a not-normal one for years or something

#

Cause it just changed to that one over night and I hate it

errant geyser
#

That looks like the font I had before I changed it

hot hull
foggy pond
#

Ugh god knows what font I had before

quiet depot
#

@foggy pond try fira code

#

it has ligatures :>

errant geyser
#

So does JetBrains Mono 👀

foggy pond
#

Changing that font just changes it for the UI and not for the code editor itself

errant geyser
#

Editor -> font

quiet depot
#

fira > mono

#

idk actually, haven’t tried mono

errant geyser
#

I'm changing my editor font between Mono and Fira and I don't see a difference

quiet depot
#

maybe mono was heavily inspired by fira

#

@forest forum other’s have briefly touched on it, but please do not use youtube to learn programming, especially spigot related, and to a lesser extent, java itself. ALL spigot tutorials on youtube are riddled with errors, terrible practices, and inexperienced suggestions. Most java tutorials also follow this trend. I assume most other language tutorials, once again, also have these qualities. The only reliable source of information is the official oracle docs. That doesn’t mean you can’t use other resources, just use them knowing that it may not be the best way; if you care, research it.

errant geyser
#

Pig you need to make that part of the FAQ, and then shamelessly plug the upcoming HC YT

heady birch
#

That font is stupid

quiet depot
#

okie

#

I plan to write a bunch of shit on java and java tools on helpchat wiki

heady birch
#

Go to settings

#

Editor

#

Classic Light

quiet depot
#

I’ve already started with gradle

errant geyser
#

Can I have a link to that if/when its done? My friend still uses Maven because "its too hard to switch"

quiet depot
#

shameless self promotion time

#

click blog

#

it’s not really a blog but not sure what to call it

jovial warren
#

lol

signal tinsel
#

SQL is annoying

#

In their defense I haven't used it in YEARS, but still

hot hull
#

It's really not

signal tinsel
#

Well its something new for sure

#

Ok here lemme send u something

#

How would you turn this data into a mysql query

hot hull
#

Ctrl + A + Delete

#

:))

signal tinsel
#

....

hot hull
#

I'm not seeing any finals, why's that

signal tinsel
#

Wdym

#

@hot hull

obtuse gale
#

@jovial warren im taking the course you mentioned yesterday atm

#

but which jdk version are you guys using

jovial warren
#

I use 8 still

#

though I use Kotlin SDK with that

#

but I should really move to 11, though MC is still in 8

obtuse gale
#

i can use 11 right

#

if i want to get into mc plugins

prisma wave
#

depends what version you're targeting

#

1.8-1.12 is fussy and will crash when using 11 afaik

#

any newer versions don't matter

obtuse gale
#

Yeah then il use 11

jovial warren
#

in that course Tim is sure not to use any Java 11 only features for most of the course, and the points where he does, he'll tell you explicitly

jovial warren
#

just tried to use java -jar to run my JAR file and it says there's "no main manifest attribute"

#

any ideas?

ocean quartz
#

Add mainClassName = "path" to your gradle

jovial warren
#

where abouts?

ocean quartz
#

Anywhere

jovial warren
#

it doesn't seem to be resolved in IntelliJ

#

does it need to be in a specific block?

errant geyser
#

IJ will tell you stuff in Gradle doesn't exist

#

Just try and see if it works

jovial warren
#

alright

ocean quartz
#

Doesn't need to be in any block
Actually i think you also need to add the plugin id 'application'

jovial warren
#

will that generate a manifest and have shadowjar bundle it in to the JAR?

#

also which path do I use? the source path or the build path?

ocean quartz
#

It should
The path to the main class

jovial warren
#

my main class is in src/main/kotlin/dev.bombardy.bardybot/Bot.kt

#

though it's a main method, not a main class

ocean quartz
#

dev.bombardy.bardybot.BotKt

jovial warren
#

that's the path?

ocean quartz
#

Yeah

jovial warren
#

Could not find method mainClassName() for arguments [dev.bombardy.bardybot.BotKt] on root project 'BardyBot' of type org.gradle.api.Project. 🤔

ocean quartz
#

Even with the application plugin?

jovial warren
#

I've just got id 'application' in the plugins block

#

is that enough or does it need a version?

ocean quartz
#

Should be enough

jovial warren
#

should I call in a gradle expert

ocean quartz
#

Prolly better

#

Summon the big guns

jovial warren
#

@topaz bay you should know the answer to this: how can I set the main class and have it bundle the manifest in to the JAR file generated by shadowJar?

topaz bay
#

Application plugin

jovial warren
#

how do you configure that?

old wyvern
#

Could not find method mainClassName() for arguments [dev.bombardy.bardybot.BotKt] on root project 'BardyBot' of type org.gradle.api.Project. thinking
Its supposed to be dev.bombardy.bardybot.Bot

jovial warren
#

tried that as well

#

so no it isn't

old wyvern
#

What does it say when you try that?

jovial warren
#

same thing from what I remember

topaz bay
#

Just send the build file

jovial warren
#

can remove unsigned types now actually

topaz bay
#

Change it to double quotes, and clean build

jovial warren
#

change what to double quotes?

#

mainClassName?

topaz bay
#

Open the jar in 7zip, and make sure the class is actually named that

#

Yes

jovial warren
#

it's BotKt.class for the main class

#

also, clean build doesn't work after changing it to double quotes

ocean quartz
#

i have just mainClassName = "me.mattstudios.kipp.MainKt" and works fine

jovial warren
ocean quartz
#

Oh, you need args

jovial warren
#

which I'm guessing that's the part that compiles to BotKt.class

versed ridge
#

What's the problem?

jovial warren
#

I can run it just fine normally without args though?

#

What's the problem?
trying to build a jar file from my project and it says the main class doesn't exist

#

even though it does

obtuse gale
#

How do I get placeholders via mysql to another server

jovial warren
ocean quartz
#

Idk how, when using JVM Kotlin you should need the args

jovial warren
#

¯_(ツ)_/¯

#

just added the args and it did absolutely nothing

prisma wave
#

you don't since 1.3

jovial warren
#

^^^^

ocean quartz
jovial warren
#

keybind for that?

prisma wave
#

is that a file level function?

#

or inside an object

jovial warren
#

^^^^

ocean quartz
#

File level

prisma wave
#

hm

#

works fine for me

#

literally using one rn

jovial warren
#

same

#

the only thing that doesn't work is the JAR

topaz bay
#

Your fault

jovial warren
#

wdym my fault?

#

what did I do wrong?

topaz bay
#

It

#

Your did it wrong

jovial warren
#

what part of it did I do wrong though?

obtuse gale
#

It

jovial warren
#

I actually have no idea what I did wrong here

#

okay now for some reason I've restarted IDEA and it's giving me yellow warnings on the plugins and repositories blocks

#

actually ik why that is

#

it's tried to build on startup and failed

#

removing the mainClassName line makes it able to build, fixing the errors

#

still can't find anything though

#

still Could not find method mainClassName() for arguments [dev.bombardy.bardybot.BotKt] on root project 'BardyBot' of type org.gradle.api.Project.

#

idk wtf is going on

#

this is ridiculous

topaz bay
#

Comment it

#

Reload

#

Uncomment

#

Reload

jovial warren
#

still same issue

#

the way I fixed the manifest issue is by adding:

manifest {
    attributes 'Main-Class': 'dev.bombardy.bardybot.BotKt'
}

to my shadowJar block

topaz bay
#

I've never had this issue

jovial warren
#

probably because you were using mainClassName = 'fully.qualified.class.Path'

#

which is the correct way to do it

#

rather than using the method

topaz bay
#

I'm pretty sure I've done both

#

Groovy is stupidly non strict about this shit

#

Except for when it comes to strings

#

That shit gets annoying

jovial warren
#

¯_(ツ)_/¯

#

lemme try using the JAR now

#

yep works fine

#

idk what it's problem was

hot hull
#

How does one register an existing project as gradle?

frail glade
#

gradle init

hot hull
#

Not what I mean

#

Piggy converted my gh source to gradle, and I've pulled

#

But the ide doesn't recognize that it's gradle

jovial warren
#

how it knows that it's a gradle project is in the .idea folder there's a gradle.xml file

#

try just deleting your .idea folder and restarting IJ

#

@hot hull

errant geyser
#

Frosty just restart IJ with the project open and you can import it as a Gradle project

hot hull
topaz bay
#

Youre supposed to right click on the build.gradle

#

Theres a button to add it

#

@hot hull wrong import btw

hot hull
#

I mean yea, which one is the right one?