#dev-general

1 messages · Page 108 of 1

topaz bay
frail glade
#

Oh that

#

I was referring to the old one.

#

I haven't seen that one before.

topaz bay
#

Mhmm

#

Hater.

#

That is unequivocally untrue

errant geyser
#

No proof

topaz bay
#

Korm is the best

errant geyser
#

I said nothin

topaz bay
#
data class User(val name: String, val pass: String)

val korm = Korm()
val user = User(name = "Sxtanna", pass = "BadPassword")

// converting from object to korm
val push = korm.push(user)
println(push) // user: "Sxtanna"
              // pass: "BadPassword"


// converting from korm to object
val pull = korm.pull(push).to<User>()
println(pull) // User(name=Sxtanna, pass=BadPassword)

val same: Boolean = user == pull
println(same) // true
#

thats proof

errant geyser
#

Yeah idk wtf that does but cool

topaz bay
#

....

#

It literally shows exactly what it does

prisma wave
errant geyser
#

Ok so I get it now after reading it

#

But why would you want to use that

topaz bay
#

For the same reasons you would want to use gson?

#

@prisma wave ugly

prisma wave
#

very ugly

errant geyser
#

To put things into/take stuff out of JSON? Is that what Korm does?

prisma wave
#

works though

topaz bay
#

@errant geyser no... it serializes and deserializes to korm...

#

its a language

errant geyser
#

o

topaz bay
#

its like json, but without all the bullshit

errant geyser
#

So I'm going to make Frosty's joke now

prisma wave
#

welcome to the korm fields

errant geyser
#

Forgot he's staff so can abuse the caps thing

prisma wave
#

so unfair

errant geyser
#

ikr

#

Like give us all staff smh

hot hull
#

WELCOME TO THE KORM FIELDS

prisma wave
#

YES

topaz bay
#

I hate all of you

errant geyser
#

Thank you Frosty

hot hull
#

I agree Sx

#

Death to humanity

errant geyser
#

That makes it worth coming back over from the Dark Side

jovial warren
#

haha lol

errant geyser
#

Ok so @ocean quartz I still don't really understand how your events system works, basically I want a method that takes an ActionType, and an ItemAction (my version of your GuiAction interface), how would I take the event associated with the ActionType, and perform the contents of the ItemAction lambda thingy thing on that event?

ocean quartz
#

It's a functional interface that takes an event as a parameter

hot hull
#

Fancy shit

distant sun
#

my boy smart

errant geyser
#

Yeah I have that already @ocean quartz , but idk how I'd auto do that from the ActionType. Like java public void addAction(final ActionType type, final ItemAction<> action) { } I want the ItemAction<> to take the event that the ActionType has

ocean quartz
#

Uuh what? I am confused xD

topaz bay
#

generics

distant sun
#

<? extends PlayerInteractEvent> or smth like this, right?

topaz bay
#

This would be so perfect for sealed classes

errant geyser
#

U gon explan that Sx

topaz bay
#

Why it would be perfect?

distant sun
#

I've wrote my first kotlin code today, be proud of me @topaz bay

topaz bay
#

sealed classes are like enums, except they are full classes

errant geyser
#

No, like how to use it

topaz bay
#

Which means they can have generics

#

unlike enums

#

@distant sun no

distant sun
#

wdym no

#

??

topaz bay
#
public void <T extends Event> addAction(final ActionType<T> type, final ItemAction<T> action)
prisma wave
#

@distant sun i'm very proud

distant sun
#

:3

prisma wave
#

write more

distant sun
#

we will see xd

#

I want to make a rest api but looks scary

#

😕

prisma wave
#

can't be that hard

topaz bay
#

ktor or spark

#

ez pz

distant sun
#

what's that?

prisma wave
#

http libraries for kotlin

errant geyser
#

Ok Sx mind explaining how I would use your example since it obviously won't work with what I have now?

topaz bay
#

@errant geyser you would use it the same way?

#

You cant pull a generic type out of nowhere, so you need to define it on the action type

hot hull
#

I am dissapointed in all of you

errant geyser
#

Ok then let me rephrase, how would I make that, like, exist

hot hull
#

Y'all starting a kotlin kult or what?

distant sun
#

@topaz bay what about Spring?

topaz bay
#

ew

#

@errant geyser you would make it an abstract class

errant geyser
#

Frosty

Y'all starting a kotlin kult or what?
Starting?? Its been around for months now

topaz bay
#

years*

distant sun
#

what's wrong with spring?

errant geyser
#

I meant you an KM's Kotlin circlejerk

distant sun
#

I don't like all the annotations but oh well xd

topaz bay
#

ceremony

#

WAY too much ceremony

jovial warren
#

not a cult, just some enthusiasts stating facts

topaz bay
#

look at this

distant sun
#

h m m

hot hull
#

To hell with all of you

topaz bay
#

Its really THAT simple

#

Thats ALL you need

#

for a simple rest api

#

with ktor and spark

errant geyser
#

just some enthusiasts stating facts
You mean the same one over and over again?

topaz bay
#

I mean... when you dont listen, what do you expect?

jovial warren
#

^^^^

prisma wave
#

I will circlejerk to the end of days but saying "you should use kotlin" isn't circlejerking

#

nor is helping people who have decided to use it

errant geyser
#

Its just all you seem to say, even when I asked yesterday why I should use Kotlin, the first answer I got was "kotlin good java bad", which is all you guys seem to say about it

topaz bay
#

I will circlejerk to the end of days

#

LMFAO

#

Oh the joys of context

prisma wave
#

I gave you reasons?

errant geyser
#

yeah you did

prisma wave
#

I love context @topaz bay

topaz bay
#

The reason you should use kotlin is literally because its kotlin

prisma wave
#

jerk

topaz bay
#

Every single thing about kotlin makes it superior

prisma wave
#

jerk

#

You're not wrong tbf

errant geyser
#

hey KM want me to show your Reddit post again so we can all enjoy lots of context?

prisma wave
#

I would suggest no

errant geyser
#

The first time I saw it I actually started crying laughing, idk why

prisma wave
#

understandable

#

without context I'm sure it's quite absurd

#

Although I think it probably is with context too...

topaz bay
#

I would very much like to witness this

errant geyser
#

The message is pretty "deep", if you get what I'm saying

#

Ok Sx, this is on you, not me

prisma wave
#

😏

errant geyser
#

here comes

prisma wave
#

shit shit

topaz bay
#

what the hell

#

oh god... is it the ram ranch one?

errant geyser
#

YEP

topaz bay
#

lol

prisma wave
#

😕

#

That post is haunting me

topaz bay
#

Literally every soul on this planet knows about ram ranch

errant geyser
#

I still dk what it is

topaz bay
#

WHAT

prisma wave
#

you're in for a hell of a time

errant geyser
#

Bruh Ik its some kind of porn-related thing from what people at my school were saying about it, but hell na I'm not searching that in yt

topaz bay
#

It's barely porn related

errant geyser
#

o ok

prisma wave
#

but have you heard Ram Ranch 7?

errant geyser
#

Still reluctant to watch it after KMs post

#

No

heady birch
#

Have you heard of spring?

prisma wave
#

it's tremendous

#

spring?

errant geyser
#

Niall, get out of here with your Spring adverts

prisma wave
#

But have you heard of KOTLIN??!?

errant geyser
#

Oh I regret saying that

#

No proof I said anything weird

topaz bay
#

watch it?

#

Its a song

errant geyser
#

I rlly don't wanna search that on yt lol

#

Imagine my recommended

topaz bay
#

My next up is heartbeat

#

Which is a great song btw

errant geyser
#

Genre?

prisma wave
#

DAE kotlin is underrated in this discord?

errant geyser
#

Yeah, needs more kotlin

topaz bay
#

You know what else is a great song

prisma wave
#

ram ranch 85

topaz bay
#

This specific part of this

#

headphones required

#

btw

prisma wave
#

same goes for ram ranch 85

errant geyser
#

Ohhhh BM. You should make the earrape machine v2, which deep fries it, slaps "kotlin" on it, and then earrapes you

topaz bay
#

truth

prisma wave
#

damn

#

good idea

#

@topaz bay that is not fire

#

😠

topaz bay
#

LMFAO

#

You should see the music video

#

Its fucking INSANE

jovial warren
#

also what does ! mean at the end of a data type?

#

is it the resultant non-null data type called as a value from a non-null data type?

topaz bay
#

Its what happens when the nullability is ambiguous

jovial warren
#

ah okay

topaz bay
#

should only really happen when youre calling java code without nullability annotations

jovial warren
#

which is exactly what I'm doing lol

errant geyser
prisma wave
#

kotlin

#

good

#

java

#

bad

topaz bay
#

what the FUCK

#

Is THIS

jovial warren
#

I'm trying to get the song that's currently playing in a server, to add to the queue, but I can't check if it's not null, meaning if it is null, it throws an error

topaz bay
#

MY EARS

errant geyser
#

Its good

#

Just don't listen to it from the embed

jovial warren
#

it's obnoxious

errant geyser
#

very loud

topaz bay
#

wdym you cant null check it?

jovial warren
#

well you could've MENTIONED THAT @errant geyser

prisma wave
#

you can still use the null operators on ! types

errant geyser
#

Its a known Spotify thing

prisma wave
#

or just a standard null check

errant geyser
#

I thought you all woulda known that

jovial warren
#

I probably could sx but IntelliJ whinges at me, complaining that it's useless lol

prisma wave
#

screenshot or it didn't happen

jovial warren
#

nvm all I had to do was just add an elven operator to set the value to null if it's null and that seemed to've worked

errant geyser
prisma wave
#

i beg to differ

errant geyser
#

(╯°□°)╯︵ ┻━┻

loud gyroBOT
#

┬─┬ ノ( ゜-゜ノ)

topaz bay
prisma wave
#

@jovial warren ```kotlin
someJavaMethodCall()?.doSomething()

topaz bay
#

good song

jovial warren
#

@prisma wave yeah that works I guess

#

I'm not going to explain what I'm trying to do right now

#

actually I will

#

basically I'm trying to create a bot command that gets the music queue and formats it to an embed

errant geyser
#

Ok so is there actually a good way to go about what I'm doing here? java public void addAction(final ActionType type, final ItemAction<> action) { I want the ItemAction to take the event that ActionType has. Sx you mentioned abstract/sealed classes or smth, how do I implement that like this?

prisma wave
#

sealed classes are sadly not a java feature

#

abstract classes on the other hand are

topaz bay
#

I told you exactly what to do

#

lmfao

jovial warren
#

what are sealed classes again?

prisma wave
#

classes with a known amount of subclasses

topaz bay
#

they are abstract classes with constrained implementations

prisma wave
#

a restricted amount of subclasses I should say

jovial warren
#

ah okay

prisma wave
#

kind of like enums but usually better

topaz bay
#

I wouldnt say amount

#

I would say a restricted set

prisma wave
#

true

#

amount is still correct though

errant geyser
#

@errant geyser you would make it an abstract class
Sx I meant like, how does that translate to doing what I need? I don't comprehend the comprehende that you comprehende to comprehend the comprehende

#

Explan

topaz bay
#

What goes on in that pea brain of yours

errant geyser
#

Not much

#

Random thoughts

topaz bay
#

send the action type class

errant geyser
#

Very weird dreams

#

My head is fucked

#

Anyway, here ya go

public enum ActionType {

    LEFT_CLICK(PlayerInteractEvent.class),
    RIGHT_CLICK(PlayerInteractEvent.class),
    SHIFT_LEFT(PlayerInteractEvent.class),
    SHIFT_RIGHT(PlayerInteractEvent.class),
    JUMP(PlayerJumpEvent.class),
    SNEAK(PlayerToggleSneakEvent.class),
    SHIFT_JUMP(PlayerJumpEvent.class),
    SHIFT_JUMP_RIGHT(PlayerJumpClickEvent.class),
    SHIFT_JUMP_LEFT(PlayerJumpClickEvent.class),
    SPRINT(PlayerToggleSprintEvent.class);

    private final Class<? extends Event> event;

    ActionType(Class<? extends Event> e) {
        this.event = e;
    }

    public Class<? extends Event> getEvent() {
        return event;
    }
}```
topaz bay
#
abstract class ActionType<T extends PlayerEvent>
{

  public static final ActionType<PlayerInteractEvent> LEFT_CLICK = make();
  // etc...

  private static <T extends PlayerEvent> ActionType<T> make()
  {
    return new ActionType<T>(){}
  }
  
}
#

You can add in the code for tracking the class, but I dont really think its actually needed

#

When youre just using them as type markers

#

You would also probably want to make the constructor private

errant geyser
#

Ooo ok got that thanks. But now how would that help with what I want to do?

topaz bay
#

You would use the method I gave you earlier

#
public void <T extends PlayerEvent> addAction(final ActionType<T> type, final ItemAction<T> action)
#

Once you pass a specific ActionType, T would become constrained to that

errant geyser
#

Oooo ok I get you now. I've never done this kinda funky cool stuff before

topaz bay
#

the generic should come before void though

errant geyser
#

I didn't take a Java course, who do you think I am? We also dont do Java until A level at school, fun times

#

I know like, the basics of it, just not that you could do all this

topaz bay
#

Isn't it beautiful

prisma wave
#

you ever wonder how much faster buildtools would be if they used gradle?

topaz bay
#

nope

prisma wave
#

i kinda wanna find out

errant geyser
#

Sx ily, you saved me so many hours of staring at my screen like what the holy fuck do I do now.

#

Km fork it, convert it to Gradle and make a PR on whatever Spigots internal Git thing is

prisma wave
#

doing that right now lol

errant geyser
#

Ah

remote goblet
#

i wonder what hykiu is gonna say

errant geyser
#

Same

#

Lurking for this

#

And then you stop typing hykui?? What an anticlimactic end...

remote goblet
#

then its just "hi"

prisma wave
#

bruh where do you get Spigot-Server and Spigot-API from?

topaz bay
#

from building?

prisma wave
#

with build tools?

topaz bay
#

no

errant geyser
#

Never heard of spigot-server, spigot-api is the one on Spigots maven thing, no?

topaz bay
#

clone the repo

prisma wave
#

i can't build without those directories

topaz bay
#

and run the build

prisma wave
#

it doesn't have them

#

i've cloned and building fails

#

because they're not present

#

it's like the chicken and the egg

topaz bay
#

this is literally all you have to do

#

it will generate the files for you

prisma wave
#

i'm trying spigot

#

i'll try paper tho

#

cloning spigot from JIRA fails despite the documentation

weak forum
#

Hello

#

plugin don't start

topaz bay
#

LOL

weak forum
#
[00:13:23 ERROR]: Error occurred while enabling Guilds v3.5.5.3-DEV (Is it up to date?)
java.lang.NoClassDefFoundError: co/aikar/taskchain/BukkitTaskChainFactory
        at me.glaremasters.guilds.Guilds.onEnable(Guilds.java:170) ~[?:?]
#

PaperSpigot used

prisma wave
#

this is very much the wrong channel

#

hello though

weak forum
#

What channel should I write to?

prisma wave
weak forum
#

thanks

prisma wave
normal talon
#

someone make a guide on how to update gradle wrapper

prisma wave
#

it's 1 command lol

normal talon
#

where do I put that commands tho

prisma wave
#

In a terminal?

#

In the working directory of your project

normal talon
#

wich project

#

gradle ?

prisma wave
#

Whichever project you're using gradle in

normal talon
#

can you give me in example of what I need to type ?

topaz bay
#

Read the page

#

It shows you what to type

#

./gradlew wrapper --gradle-version {version}

normal talon
#

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

topaz bay
#

...

prisma wave
#

gradlew.bat

#

stupid windows lol

topaz bay
#

No...

#

This should work fine without using the .bat

prisma wave
#

oh

#

I thought the gradlew was written in bash

topaz bay
prisma wave
#

huh

#

TIL

normal talon
#

./gradlew wrapper --gradle-version 6.5
so i have this in a new document

topaz bay
#

in a what?

normal talon
#

on my desktop

prisma wave
#

I

#

What?

#

Just open the terminal in Intellij and run it in there

normal talon
#

So i'm opening intellij rn

topaz bay
#

Is that an image of nothing?

normal talon
#

wut

#

I uploaded a image

#

pff

topaz bay
normal talon
topaz bay
#

I...

#

Yeah, its still nothing

#

what the hell...

normal talon
#

wtf

topaz bay
#

send the raw link

#

the i.imgur one

normal talon
topaz bay
#

yeah...

#

no...

#

thats not how batch works

distant sun
#

sxtanna, so you say I can use spark for a REST api?

topaz bay
#

Just type what I said into the shell

#

@distant sun yes

normal talon
#

`./gradlew : The term './gradlew' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • ./gradlew wrapper --gradle-version 6.5
  •   + CategoryInfo          : ObjectNotFound: (./gradlew:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException`
#

this is using power shell

prisma wave
topaz bay
#

reverse the slash

normal talon
#

C:\Users\youfi\IdeaProjects\youfishcommands > .\gradlew wrapper --gradle-version 6.5

prisma wave
#

Mhm

normal talon
#

Does anyone have anydesk ? then u can do it for me since I don't understand a thing about this mess 🙂

prisma wave
#

Probably better for you to learn how to do it yourself

#

That command is step 1

#

From there evertything should work

normal talon
#

Like if I get gradle to work , I can help myself watching youtube tutorials while coding a simple plugin

topaz bay
#

This is from a framework I wrote on top of spark

normal talon
#

THIS IS also not working in the terminal

./gradlew wrapper --gradle-version 6.5
of Intellij

topaz bay
#

In IntelliJ, you don't need to type the ./

#

Which btw, like I said, you should reverse the slash

normal talon
#

i did

#

and didn't work either

#

nope not working either without the ./

topaz bay
#

It definitely does

normal talon
#

C:\Users\youfi\IdeaProjects\Test 10200\server>gradlew wrapper --gradle-version 6.5 'gradlew' is not recognized as an internal or external command, operable program or batch file.

topaz bay
#

Is that folder a gradle project?

#

With the gradlew file in it?

normal talon
#

wait

topaz bay
#

Did you consider it can't find gradlew... because its not there?

normal talon
#

I already said I have 0 idea of what I'm doing

#

so do I create a file name gradlew ?

topaz bay
#

Ok but like... come on now...

#

common sense...

#

No, you do not create the gradlew file

#

You need to actually make that project use the gradle wrapper

#

open a terminal there, and type gradle init

normal talon
#

but when I create that it says its not there

topaz bay
#

When you create what?

normal talon
#

a project using gradle

#

Select type of project to generate: 1: basic 2: application 3: library 4: Gradle plugin Enter selection (default: basic) [1..4]

topaz bay
#

You have got to use google

normal talon
#

for ?

normal talon
#

for what do I need to use google now ?

topaz bay
#

You need to use google to find solutions to your problems

#

And to find out how things work

normal talon
#

but google is like to complicated to understand

topaz bay
#

WHAT

#

Google is an infinite database of all human knowledge

normal talon
#

nvm I will stop with this crap

prisma wave
#

Select basic

#

or just make a gradle project with intellij

normal talon
#

or just make a gradle project with intellij
I have been doing that the whole time

#

and it keeps giving me an stupid error

topaz bay
#

Install jdk8 and make it your default

#

Theres like no reason for you to only have jdk14

normal talon
#

I don't know either

#

what is jdk 8 gonna do ?

prisma wave
#

As I said

#

The error is because old gradle versions don't support Java 14

#

just install Java 8

#

you need it anyway for working with older MC versions

distant sun
#

@topaz bay can I have the framework? 🥺

prisma wave
#

Possibly ktor

#

I don't recognise it

topaz bay
#

I literally said its one that I made

#

lol...

#

@distant sun no go away

#

its mine

prisma wave
#

oh yeah lol

distant sun
#

??

#

you smell

topaz bay
#

Its also very fucking old

#

Ok

distant sun
#

@topaz bay how do I test requests on IIJ?

normal talon
#

your Iij looks diffrent than mine

distant sun
#

ah

#

theme

normal talon
#

No errors on 1.8 jdk

#

or jdk8

topaz bay
#

@distant sun ?

#

you can just like... use a browser...

distant sun
#

I always get a 404 on iij 😦

#

ok but how do I do a post request from browser xd

topaz bay
#

you havent even defined a post?

#

all of those are get requests?

distant sun
#

bruh

#

hot

normal talon
#

my bad

prisma wave
#

You need to run BuildTools if you want spigot

#

if you don't want nms classes, use spigot-api

#

Instead of spigot

normal talon
#

but when u told me in the afternoon

#

to paste that code form spigot

#

well I just made the most simple plugin

#

how do I get the plugin.yml ?

prisma wave
#

wdym?

#

you make it?

#

in src/main/resources

normal talon
prisma wave
#

yes...?

#

make your plugin.yml in that directory

#

Then when you run gradle build it will be included in the jar

normal talon
#

I can't create plugin.yml in there ?

#

it says new folder

prisma wave
#

Under this bit lol

#

Right click on resources, new > file

#

Also the spigot gradle guide specifically says // Pick only one of these and read the comment in the repositories block

#

Don't just copy and paste without reading the docs

normal talon
#

build.gradle should look like that

#

right ?

prisma wave
#

No

#

You have 2 dependencies and repositories blocks, merge them

#

And you are depending on spigot which, like I said earlier, means you have to run BuildTools

#

Use spigot-api

#

like the docs say lol

normal talon
#

I have buildtools setup for 1.8

#

and 1.5

prisma wave
#

ok

#

1.5?

#

that's quite old lol

normal talon
#

1.15 xd

prisma wave
#

ok

#

Well even so

#

unless you specifically want nms classes

#

use spigot-api

normal talon
#

What is an nms ?

prisma wave
#

net.minecraft.server

#

the actual server implementation

normal talon
#

so what I need to do just from project structre add that spigot-api

prisma wave
#

for packets and things

#

no not in project structure

#

In build.gradle

#

change spigot to spigot-api

#

compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT' here

normal talon
#

I was about to ask 🙂

#

thanks

prisma wave
#

np

normal talon
prisma wave
#

Once you've done that and merged the blocks, go to Gradle on the right, Tasks, and double click build

normal talon
#

I have this rn

prisma wave
#

Remove the random { }

#

And you should set group to the actual group

#

Which is the starting part of your package

#

eg in me.bristermitten.pluginname group is me.bristermitten

distant sun
#

Does spark have any kind of cache system? Or I need to handle that? thonking

prisma wave
#

I don't think it has anything no

normal talon
#

group 'me.commands.plugin'
like that

prisma wave
#

It's basically just a Tomcat wrapper

#

I think so @normal talon

#

What's your full package?

distant sun
#

Tomcat?

#

from tom and jerry? 😮

normal talon
#

like under srs

prisma wave
#

whatever package you're using

#

@distant sun yes lol

onyx loom
#

gaby netflix and chill status? thonk

prisma wave
#

Tomcat is a webserver, but it's very verbose

#

So things like spark wrap it to make it nicer

distant sun
#

for now only netflix @onyx loom 😢

prisma wave
#

spark might be Jetty though

#

one of the two

#

idk

normal talon
#

I don't have any packages

onyx loom
#

🙁

#

unfortunate gaby

distant sun
#

xd

prisma wave
#

well you should probably make one

normal talon
prisma wave
#

in src/main/java

#

That's where you put all your code

distant sun
#

is there any nice way to send html code as response?

prisma wave
#

(or src/main/kotlin for the cool kids ;))

distant sun
#

possible with placeholders for data xd

normal talon
#

what is kotlin

topaz bay
#

@distant sun html is just text

prisma wave
#

Request#raw

#

a language @normal talon

topaz bay
#

set the body to the html

prisma wave
#

Also I was completely wrong spark does have caching

normal talon
prisma wave
#

and I believe it's actually standalone rather than building upon Tomcat

normal talon
#

its not downloading the external libraries

prisma wave
#

you're still not using spigot-api @normal talon

distant sun
#

ic

normal talon
#

you just gave me the code and I copied it

prisma wave
#

bruh

normal talon
prisma wave
#

I was showing you which part to change lol

#

I copied that from your code

normal talon
#

oeh

prisma wave
#

change spigot to spigot-api
@prisma wave

normal talon
#

so 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'

#

?

distant sun
#

can I make it send the same response for /path and /path/

prisma wave
#

yes @normal talon

normal talon
#

still get error

topaz bay
#

Because you don't have central declared

normal talon
#

I just implemented it in through project structure

topaz bay
#

?????

normal talon
#

I added spigot-api-1.8.8-R0.1-snapshot
from project sturcture

#

to the project

#

its now in the external libraries

hallow crane
#

How do I have multiple versions of craftbukkit with gradle? It only compiled one

#

(without downloading jar and using as local repo library)

ocean quartz
#

Show your gradle

hallow crane
#

I'm on my phone

#

I'll just do tomorrow

topaz bay
#

Youre declaring multiple versions in the same module scope?

#

How do you expect it to choose?

#

You need to have separate modules for separate versions...

#

Obviously...

hallow crane
#

yeah but I don't want that

#

I need craftbukkit 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16 in one module

#

is the only way to compile the jars alongisde?

ocean quartz
#

In one module?

#

Or each in a different module?

hallow crane
#

All of those dependencies need to be included in one module

#

I suppose maybe I can just split up functionality between modules

#

ill try that

ocean quartz
#

Oh god, the imports

topaz bay
#

@hallow crane thats literally just not how that works

#

And you definitely dont need all of those in one module

#

That would be stupid

#

If you have them all in one, theres no reason to have all of them

distant sun
#

@quiet depot you said to use js to display data from rest, right? How can I do that without exposing the access token? Env or smth?

prisma wave
#

If this is for a public website afaik you can't avoid exposing the token somewhere

#

Apart from using an intermediary server for the requests

distant sun
#

hmm

#

if the api it's made in java, do I need a VPS or smth to host it?

old wyvern
#

Yes

distant sun
#

damn ok xd

obtuse gale
#

Question:

#

Making a website for my friend, if I dont wanna use spring for backend since he just has standard web hosting that wont support that, what should I use, the next language i'm most familar with is PHP

analog crater
#

Are you familar with any frameworks (related ofc) in PHP?

obtuse gale
#

nope

#

Only php basics, i dont really know it that well

hot hull
#

ayy

[07:08:23 INFO]: Task Runnable Has Started! (0)
[07:08:53 INFO]: Task Timer Passed Another 30 Sec! (30)
[07:08:53 INFO]: Task has started!
[07:09:03 INFO]: Task interval!
[07:09:13 INFO]: Task interval!
[07:09:23 INFO]: Task Timer Passed Another 30 Sec! (60)
[07:09:23 INFO]: Task has finished!
gusty fulcrum
#

why won't this work ?

hot hull
#

Why not just use getStringList ?

gusty fulcrum
#

im a newb

#

why wouldnt that image above work though?

hot hull
#

Cause you need to use String List

obtuse gale
#

then u wont need to cast

gusty fulcrum
#

too much of a noob

#

still not working

hot hull
#

Remove the cast

#

And define "not working"

obtuse gale
#

in before its an NPE or not registered 😎

gusty fulcrum
#

Is registered + config setup is fine

obtuse gale
#

the events being run?

#

Have you added debug printlns

gusty fulcrum
#

yes

obtuse gale
#

So whats not working?

gusty fulcrum
#

Its not blocking the command

obtuse gale
#

also methods should be lowerCamelCase

#

are you getting the Bocked Command kmessage?

gusty fulcrum
#

nope

obtuse gale
#

add a println after the if statement i guess

#

and print out element

hot hull
normal talon
#

someone should really make a tutorial on how to make a plugin with gradle

obtuse gale
#

its not hard

normal talon
#

well I tried yesterday

hot hull
#

Piggy is making one iirc

normal talon
#

it keeps giving me errors

hot hull
#

And yea you just select gradle instead of maven kek

normal talon
#

I did

obtuse gale
#

if it gives u errors just chuck them in google

#

ez

normal talon
#

but when I build the plugin

#

it gives me errors

obtuse gale
#

what does errors mean

normal talon
#

multiple error

#

-_-

compact perchBOT
#
HelpChat Paste

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

normal talon
hot hull
#

Damn gradle gives you a solution

normal talon
#

like can someone walk me through it from the beginning of setting up a new project ?

obtuse gale
#

I dont see multiple errors there

normal talon
#

but you are different 🙂

obtuse gale
#

but fact is fact

#

Basically what its saying is that
Could not find org.spigotmc.spigot-api:spigot-api:1.8.8-R0.1-SNAPSHOT.
in these repositories

 - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot-api/spigot-api/1.8.8-R0.1-SNAPSHOT/maven-metadata.xml
  - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot-api/spigot-api/1.8.8-R0.1-SNAPSHOT/spigot-api-1.8.8-R0.1-SNAPSHOT.pom
  - https://oss.sonatype.org/content/repositories/central/org/spigotmc/spigot-api/spigot-api/1.8.8-R0.1-SNAPSHOT/maven-metadata.xml
  - https://oss.sonatype.org/content/repositories/central/org/spigotmc/spigot-api/spigot-api/1.8.8-R0.1-SNAPSHOT/spigot-api-1.8.8-R0.1-SNAPSHOT.pom```
and this might fix it
` - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html`
#

(you just fucked up ur dependency)

normal talon
#

https://oss.sonatype.org/content/repositories/central
so this needs to be changed

obtuse gale
#

no

#

your file literally says dependencies somewhere

#

(you just fucked up ur dependency)

#

group 'youfishcraft.commands.commands'

#

also what the fuck is this package lol

normal talon
#

that is the package

#

and the main class

hot hull
obtuse gale
#

why .commands.commands tho

#

anyway, that shouldnt change things

#

you just need to fix your dependency

normal talon
#

One other question do I create a new package under srs/main/java ?

obtuse gale
#

yes

normal talon
#

and plugin.yml under /srs/main/recourses

obtuse gale
#

yes

normal talon
#

aah

obtuse gale
#

src tho

#

not srs

normal talon
#

yea that

#

typo

#

it give me the same error

#

I don't see any mistake in my dependencies

obtuse gale
#

send it

#

just ur dependency

normal talon
#

oh

obtuse gale
#

and the error

normal talon
#

the same error as before

obtuse gale
#

that...

#

isnt the same error as before

normal talon
#

different spigot versions

obtuse gale
#

?

normal talon
#

so what is the error about.

it just says couldn't find that spigot-api there

errant geyser
#

It says it couldn't find Apache commons lang, which is required by spigot-api

normal talon
#

do u know a fix for it ?

obtuse gale
#

paste the error in google

#

bam

errant geyser
#

Hol up, your comments dont make sense here

#

You dont need the sonatype repos

obtuse gale
#

they dont lol

#

compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT' // The Spigot API with no shadowing. Requires the OSS repo.

normal talon
#

I pasted it from that spigot stuff

obtuse gale
#

u do need it i think

errant geyser
#

Right let's clear something 1 sec

#

Are you trying to get just the API or the whole thing? Your comments make it look like you want the whole thing, yet you use spigot-api

obtuse gale
#

^

errant geyser
#

Which are you going for

normal talon
#

Yesterday while talking to KM he said I needed the api for my pluign

errant geyser
#

Yes, you do

#

But you can get that from the entire spigot jar (from your comments what you seem to be going for) or just just spigot-api, which you have rn?

normal talon
#

but plugin doesn't extend javaplugin

obtuse gale
#

imported it?

#

and wdym doesnt extend

normal talon
#

But you can get that from the entire spigot jar (from your comments what you seem to be going for) or just just spigot-api, which you have rn?
What do you mean

obtuse gale
#

have you typed extends JavaPlugin lol?

normal talon
#

yes ?

errant geyser
#

AJ give us a minute

obtuse gale
#

kk

errant geyser
#

Let's just clear this first

#

So, you can get the entire spigot jar which includes the api, NMS and everything you'll need for SQL, etc. From your comments this is what you were going for. You've then specified spigot-api, which is just the API. What are you going for here?

normal talon
#

for the spigot-api ?

errant geyser
#

🤦

#

No

normal talon
#

compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
this right

errant geyser
#

this is what I'm asking YOU

#

Read my message

#

From your comments you want the full jar, yet you specify spigot-api. Which do you actually want?

hot hull
errant geyser
#

Fancy

#

Also u can expect ItemActionsLib today Frosty

normal talon
#

I really don't understand what your talking about really

hot hull
#

Cool

normal talon
#

I have that spigot-api

#

cuz that was what KM told me yesterday

errant geyser
#

Yes, we can see that. But your comments say the full jar

#

The differences are

#

So, you can get the entire spigot jar which includes the api, NMS and everything you'll need for SQL, etc. From your comments this is what you were going for. You've then specified spigot-api, which is just the API. What are you going for here?

#

We need to know if you want just the api or if you want everything, as your comments say

normal talon
#

I just want the api

wide mauve
#

How can I use the papi api? The github isnt avaiable

normal talon
#

and the github is down for some reason

#

oh wait

#

dunno either

#

We need to know if you want just the api or if you want everything, as your comments say
any idea

#

because i just want the api

hot hull
#
<repository>
  <id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>

<dependency>
  <groupId>me.clip</groupId>
  <artifactId>placeholderapi</artifactId>
  <version>2.10.6</version>
  <scope>provided</scope>
</dependency>
distant sun
#

🤢 brb

errant geyser
#

@normal talon

old wyvern
#

Works fine tho

normal talon
#

I can't reach it

#

it says oops

old wyvern
#

do a hard reload

#

ctrl + f5

errant geyser
#

Neither can I actually

old wyvern
#

huh

normal talon
#

just close google

#

and start it over

errant geyser
#

Do you realise how wrong that sentence is

#

Anyway

old wyvern
hot hull
#

Works fine for me

versed ridge
#

Me too

errant geyser
#

Yep, I refreshed and now it's working for me

normal talon
#

uhn katsumag

#

shadowjar

#

is gray

errant geyser
#

That's fine

pallid gale
#

wiki is a bit iffy

#

just refresh the page and it should work

versed ridge
#

It’s gray?

#

Oh

errant geyser
#

Then to build @normal talon just use gradle clean shadowJar

normal talon
#

in therminal ?

versed ridge
#

Lmao, don’t mind me

errant geyser
#

Yep, or in IJ

#

Itself

normal talon
#

i did it

errant geyser
#

On the Gradle tab you can click the elephant then write that command and it'll build

normal talon
#

BUILD SUCCESSFUL in 22s 3 actionable tasks: 2 executed, 1 up-to-date

#

and it's still gray

#

nvm

#

it just updated

errant geyser
#

Ok

normal talon
#

now I have a bigger issue

#

I can't create a package

#

src/main/java(java folder is red)

errant geyser
#

Have you marked src as the sources root?

normal talon
#

I don't think so

errant geyser
#

Do it

normal talon
#

because last try it did it automatically

errant geyser
#

Just try doing it and see if anything changes

normal talon
#

uhm I actually don't know how

errant geyser
#

right click -> mark directory as -> sources root

normal talon
#

ooh

#

yea thank you

errant geyser
#

Np

normal talon
#
    public void onDisable() {
        super.onDisable();
        getLogger().info("&c&lThis plugin is disabled!");

how is this working without @Override

errant geyser
#

You're supposed to override it, but in my old plugins I never did and it worked ¯_(ツ)_/¯

normal talon
#

ah

errant geyser
#

Its a feat of spigots engineering

normal talon
#

2 more questions:

How do I export the plugin now?

and is the plugin now only 1.15.2 ?

errant geyser
#

How do I export the plugin now?
gradle clean shadowJar

#

and is the plugin now only 1.15.2 ?
Uh, plugins are usually only the version you use. In this case you used 1.15.2, so yeah. You can stretch multiple versions but its harder. If you wanna switch versions change the version of your dependency, run BuildTools for that version and you're done

normal talon
#

oke now. my package name is me.youfishcommands.plugin

#

so the main should be like this ? me.youfishcommands.plugin.commands

errant geyser
#

Package structure for the main class is usually
groupId.artifactId.artifactId
So plugin main classes tend to be the name of the plugin

#

So say I'm making a plugin called Chat, I'd put the main class in
me.katsumag.chat.Chat <- the last Chat is the class

normal talon
#

then I got it right

#

so where do I find the plugin that I exported

#

and is gradle build not the same as the shadowJar one ?

errant geyser
#

No, shadowJar includes all of Matt's library for you

normal talon
#

ah

errant geyser
#

You can find the jar in build -> libs

normal talon
#

oke thank you

versed ridge
#

Your plugin should work fine on most versions as long as what you're using in it exists in those other versions

normal talon
#

well I just want 1.8.8 version

#

Thank you so much katsumag

versed ridge
#

Then don't use the 1.15.2 api

normal talon
#

I already changed it

errant geyser
#

np, gl

prisma wave
#

@Override doesn't actually do anything

#

It's just a marker

errant geyser
#

you saw nothing

prisma wave
#

nope

#

Absolutely nothing

normal talon
#

Well I'm confused I coded a while ago in 2018 on eclipse

#

a fly and vanish plugin

#

but it disappeared

hot hull
#

Some would say it vanished

normal talon
#

jezus

prisma wave
#

Lol

normal talon
#

cracking lame jokes

#

sad moment

#

again

#

but I found my antiswear

prisma wave
#

and is gradle build not the same as the shadowJar one ?
Ik this was already answered but just to elaborate: shadowJar will include the classes of any dependencies that you mark with implementation or compile. This is a process known as shading

normal talon
#

about that

#

when I build it with shadow

#

it didn't give me anything

#

but when I did gradle build it did give me the jar

prisma wave
#

You sure?

normal talon
#

yes

prisma wave
#

gradle shadowJar should make a jar in build/libs

#

Although the jar will have a different name

hot hull
#

You sure you were looking in the right folder?

normal talon
#

gradle clear shadowJar

#

oof

prisma wave
#

clear isn't a thing

errant geyser
#

I told ya to use clean

#

But mk

prisma wave
#

clean is, but you don't need that every time

runic flume
#

hi

errant geyser
#

Henlo

#

Hooman

prisma wave
#

Howdy

hot hull
#

A wild 4head has appeared

errant geyser
#

How dare you

#

Sx is a 4head

#

Codiq is different

#

sorta

#

kinda

#

bye

prisma wave
#

Ok

normal talon
prisma wave
#

We're all 4heads

normal talon
#

what is this all about all of the sudden

prisma wave
#

Well that's new

#

I'm gonna guess 1.8 doesn't play well with Java 14

normal talon
#

I used 1.8

#

jdk 8

errant geyser
#

I'm excited for Piggy's paragraph 👀

prisma wave
#

To run the server?

#

Same lol

quiet depot
#

@distant sun js is local storage, so technically the end user will always have access to the key. That’s not a bad thing though. The people who go looking for it, probably know how to use it anyway

normal talon
#

To run the server?
yes

#

wait no

errant geyser
#

You need to use it to compile your pluuugin tooo brouda

distant sun
#

Ye but I dont want that xd

#

P1g

normal talon
#

I got these weird penguins on every .jar thing

prisma wave
#

lol

errant geyser
#

OS?

quiet depot
#

don’t want what

prisma wave
#

that's the Java mascot

quiet depot
#

people having the key?

distant sun
#

Yes

normal talon
#

didn't have that before

#

rest in peace my brain

prisma wave
#

how do you start the server?

quiet depot
#

why? I literally can’t think of a reason. Purposely hiding the key just sounds like needless restriction

normal talon
#

how do you start the server?
run.bat

#

@ECHO OFF java -Xms2048M -Xmx4096M -Dfile.encoding=UTF-8 -jar paper-443.jar nogui pause

distant sun
#

Hmm mkay

#

I really hope this wont be a fail

#

I want it for my server xd

prisma wave
#

run java -version and tell me the result @normal talon

normal talon
#

java -version and then the rest

prisma wave
#

no

normal talon
#

oh on cmd

prisma wave
#

yes

normal talon
#

openjdk version "14.0.1" 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.1+7) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.1+7, mixed mode, sharing)

prisma wave
#

you're running Java 14 still

normal talon
#

I dun't want that

#

so can I remove it ?

prisma wave
#

Either update the PATH, or directly reference the Java 8 binary

quiet depot
#

if he just followed my guide from the beginning, none of this would've been necessary 😏

normal talon
#

I did

#

I downloaded that java from the guide

#

🙂

quiet depot
#

welp, please tell me where it all went so wrong, so I can fix it next time

prisma wave
#

Iirc it'll be something like C:\Program Files\Java\jdk-8-something\bin\java

#

tbh you may as well uninstall 14 unless you have a particularly strong need for it

normal talon
#

I don't use it

#

I use jdk 8 now for plugins

#

wew I removed it

#

openjdk version "14.0.1" 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.1+7) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.1+7, mixed mode, sharing)

prisma wave
#

open a new terminal and run it again

#

and it doesn't look like you did remove it lol

normal talon
#

I don't have it installed anymore

#

and I edited the path

#

to C:\Program Files\Java\jdk1.8.0_251\bin\java.exe this

prisma wave
#

what's the output now then?

normal talon
#

oh wew

#

it works now

prisma wave
#

ok cool

quiet depot
#

path should just point to \bin, not the java executable

normal talon
#

thanks mate

prisma wave
#

^

#

np

normal talon
#

2020-06-19 11:41:09,157 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream

I get this error also.
it was longer before this code -Djline.terminal=jline.UnsupportedTerminal

#

but stil get the first one

errant geyser
#

A lot of people get that, its nothing critical that you should worry about

normal talon
#

oh okay

topaz bay
#

terminal updates

#

aayyyyyyeeee

prisma wave
#

Ngl the new windows development stuff looks pretty good

#

WSL2 + the new terminal + chocolatey or the windows package manager would be pretty nice I think

frigid badge
#

why use chocolatey if you have wsl

#

and use zsh with oh-my-zsh

#

to make your terminals spicy

heady birch
#
private final DataTable<Operator> operatorDataTable = new DataTable<>(
            /* col 0: name */       Operator::getName,
            /* col 2: country */    operator -> operator.getCountry().getName()
);
#

Maybe I do like functional programming now

distant sun
#

oo

heady birch
#

helper class for spring returning json support for DataTables.js

prisma wave
#

@frigid badge zsh is great, but wsl can't install things like intellij no?

jovial warren
#

maybe we can move in to the future, to a time where linux and windows aren't so much competitors as they are partners, conquering the new world, together

#

also, is it just me or did I see Rythm in here earlier

topaz bay
#

rythm is here

obtuse gale
jovial warren
#

oh nice

#

my boy

#

what's his prefix?

obtuse gale
#

thats just because barrys too lazy and wont do it himself 😠

topaz bay
#

Look at the screenshot

#

Its shows them using the commands

jovial warren
#

a.k.a meaning cube's too lazy to program music capabilities in @obtuse gale

obtuse gale
#

i think he said it was actually a bandwidth thing or something lol

jovial warren
#

idk how music works with discord.js

#

I personally use lava player

regal gale
jovial warren
#

it's a pain to work with but works like a dream

regal gale
#

I used LavaPlayer before

jovial warren
#

yeah the youtube searching is a pain

#

I'm considering just querying the YouTube API myself then giving lava player the formatted URL with video ID

#

since the inconsistencies bug me

#

I think it's getting better though

#

anyone here know how to use YouTube's Data API by the way?

old wyvern
#

It requires a API key and has quotas I think

jovial warren
#

cheers Yugi

#

so do I need to use something like retrofit to query it directly using HTTP queries then?

old wyvern
#

Depends on what you want to use I guess

jovial warren
#

my question is do I need to query it directly using HTTP queries or is there some sort of library for it?

old wyvern
#

requests

jovial warren
#

requests yeah that's what I mean lol

old wyvern
#

oh wait

jovial warren
#

library for Java

old wyvern
#

Yes

jovial warren
#

that'll do

#

also this literally just queries the API lol

#

which I could just do myself

old wyvern
#

yes

#

Thats just what they had on their documentation welp

jovial warren
#

¯_(ツ)_/¯

distant sun
#

Can you use google shit to host an api server on your machine?

old wyvern
#

wha?

distant sun
#

Nvm

jovial warren
#

api server? tf gaby? lol

distant sun
#

I've said N v m

#

Smh

jovial warren
#

if I could get it to work lol

frigid badge
#

@frigid badge zsh is great, but wsl can't install things like intellij no?
@prisma wave why would you install intelij using wsl

prisma wave
#

well exactly but you said

why use chocolatey if you have wsl

obtuse gale
#

Hey guys,
Anyone know a good inventory builder api or source code where i can buy? I am trying to find a really good and detailed api where i can work with. I mean i can make one myself but i honestly want one that can do like this:

https://www.youtube.com/watch?v=szAZQBoZihU

●Hey, DiamondRushXD here ultra permissions is a next level permissions system that can be fully controlled via GUI's Ingame. It is able to suggest you permissions based on installed plugins so you no longer have to search the internet for those!

●Revivenode
https://revivenode...

▶ Play video
heady birch
#

Hello

obtuse gale
#

hello

errant geyser
#

@obtuse gale Matt's Framework

obtuse gale
#

Can it make like animations like that?

ocean quartz
#

buy 👀

hot hull
#

Disguisting that you'd even show UP 🤢

errant geyser
#

Sure you can make animations

obtuse gale
#

Disguisting that you'd even show UP 🤢
@hot hull ?

errant geyser
#

He was on about Matt