#dev-general

1 messages ยท Page 119 of 1

prisma wave
#

that's... clever

#

oh wait this is really easy

topaz bay
#

RIGHT

prisma wave
#

how do you do access? first, second, etc?

topaz bay
#

Absolutely not

#

I use indexing

prisma wave
#

i see

#

so someTuple[0]?

topaz bay
#

yup

prisma wave
#

hm

#

i'm gonna be unorthodox

#

tuples can be like mini data classes

topaz bay
#

Are you gonna do what kotlin does?

#

with componentN functions?

prisma wave
#

possibly

#

(age: Int, name: String)

#

I'm thinking this for the tuple type syntax

#

basically a mini data class

#

but indexed access is possible

topaz bay
#

ooooo that sounds fun

prisma wave
#

very fun

#

the wonders of dynamically typed languages

topaz bay
#

dynamic typing

#

๐Ÿ‘€

prisma wave
#

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

#

i'm not clever enough to build a compiler so

topaz bay
#

It doesnt have to be compiled to be static

prisma wave
#

i mean

jovial warren
#

anyone can do pretty much anything if they put their mind to it

#

stop being so defeatist and just do it

prisma wave
#

static typed languages are those in which type checking is done at compile-time

#

I could probably figure it out eventually

#

but i'm lazy

jovial warren
prisma wave
#

and I don't wanna have to figure out the bytecode format and do interop hacks

old wyvern
#

Theres a remix for that

jovial warren
#

just fucking do it BM

#

I'll help you if you want as well

topaz bay
#

compile-time doesnt have to literally mean compile time

#

It just means the point at which you parse the code into some other format

prisma wave
#

true

jovial warren
#

but it ain't really a language if it doesn't kinda work on its own imo

prisma wave
#

i could do some AST traversal before

#

but again

#

effort

topaz bay
#

ummm

prisma wave
#

this isn't anything fancy

topaz bay
#

There is no language that "works on its on"

jovial warren
#

like if you're processing shit using Kotlin that ain't a language it's just a processor

topaz bay
#

besides machine code

jovial warren
#

that's what I mean

#

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

remote goblet
topaz bay
#

Thats a stupid thing to say then

jovial warren
#

not too bad

prisma wave
#

can't read the text very well imo

#

not the repo descriptions anyway

remote goblet
#

yeah i know

#

they're a bit wack

jovial warren
#

also anyone here know how the fuck I install mycroft?

#

I mean jesus christ

prisma wave
#

final question regarding consistency
since variable declaration is name::Type, should tuples be (name::Type) or (name: Type)?

jovial warren
#

::

prisma wave
#

ok

jovial warren
#

keep consistency

prisma wave
#

yea

#

probably wise

topaz bay
#

uh ohhh

#

frigga is quickly becoming Odin

#

LOL

onyx loom
#

๐Ÿ‘€

prisma wave
#

how so?????????????????/

#

tuples are hardly a ground breaking idea

topaz bay
#

Only because that slightly looks like odin's shorthand tuple type syntax

prisma wave
#

slightly

#

example?

topaz bay
#

resolves to (Int, Int, Dec, Dec)

prisma wave
#

it's not that similar

#

๐Ÿ˜ 

topaz bay
#

IT IS

prisma wave
#

nah

#

frigga does it better anyway

jovial warren
#

also imo both languages' syntax is kinda not all that good

topaz bay
#

LMFAO

prisma wave
#

damn

#

well

topaz bay
#

Good thing we didnt ask for your opinion

prisma wave
#

i mean

topaz bay
#

๐Ÿ˜‰

jovial warren
#

also val withType: Int = 20 you took that straight from Kotlin lol

prisma wave
topaz bay
#

Yes...

#

No one is denying that

#

lol

prisma wave
#

imagine not stealing ideas from kotlin

jovial warren
#
fun returns: Txt {
    => "Hey"
}
```that's not too bad
#

the pull and push seems kinda useful

#

rather than having to use a fucking scanner

prisma wave
#

the direct stack access is the work of the devil

topaz bay
#

Dont be a hater

#

Its great

prisma wave
#

not in the slightest

#

imagine not having access to the stack as a property

#
yield = (toYield::Any) -> _ {
    __stack.push(toYield)
    __caller.break()
}```
#

it's so hideous ๐Ÿ˜ข

topaz bay
#

gross

prisma wave
#

very gross

#

the implementation is worse

topaz bay
#

I believe you

#

Odin is the epitome of elegance

#

Frigga is a WHORE

prisma wave
#

OK

topaz bay
#

๐Ÿ˜ˆ

prisma wave
#

SHUT UP

topaz bay
#

No need to SHOUT

prisma wave
#

this is not gonna stand

#

frigga is literally going to kick the shit out of odin

#

LITERALLY

topaz bay
#

Wrong

prisma wave
#

2 can play at that game

topaz bay
#

mhmm

#

MHMM

onyx loom
#

Frigga is a WHORE
@topaz bay u really got him good with this one ๐Ÿ’€๐Ÿ’€

prisma wave
#

no he didn't

#

๐Ÿ˜ 

topaz bay
#

@onyx loom Thank you.

topaz bay
#

how do people write code like this

#

HOW

prisma wave
#

ew

topaz bay
#

There is literally nothing thats consistent

#

It hurts

prisma wave
#

it gets worse the longer I look at it

#

time to alt tab away

topaz bay
#

Actual nightmare fuel

cursive breach
topaz bay
#

@cursive breach I demand to see steve run in that character's style.

#

Immediately

cursive breach
#

It's not my clip, its someone else's audition animation for a project i'm helping run.

#

I'll let them know though

topaz bay
#

Thank you.

cursive breach
#

Wait I posted this in dev-general?

errant geyser
#

@cursive breach is that Cinema4D?

cursive breach
#

Probably

#

or Blender

errant geyser
#

ah

#

Yeah its Blender

signal tinsel
#

Aaaa I fucking hate github packages already

#

It literally errors out 50% of the time

#

Also is github actions not working?

#

Oh there's a reported issue

errant geyser
#

laughs in setting up a Sonatype Nexus

signal tinsel
#

Lol

#

Effort

#

And I don't wanna pay for a vps lmao

heady birch
#

OVH

#

You get free traffic as well

#

Chinese gov hackers bruteforcing ssh ports

signal tinsel
#

Lol

errant geyser
#

Its not much work Maffie

#

I set mine up in like 15 mins

signal tinsel
#

True

#

Its not much work I know

#

But I don't wanna pay for a vps

errant geyser
#

Fair, I thought the same but then after trying to get it working on a GCP CE instance for like a month I finally caved, and for โ‚ฌ5/mo I get 4 cores + 8GB RAM, thanks to BM pointing out I could get that rather than a lot worse Hetzner VPS for the same price

signal tinsel
#

Tru tru

#

But I barely have any packages to upload

#

I might publish my plugins apis separately sometime but eh

errant geyser
#

Yeah its all about what u wanna do with it I guess. Ima host my site and everything to do with it on there, the nexus, a few discord bots, etc

remote goblet
#

i wish i hadn't watched that video brent posted

signal tinsel
#

Automatically generated file

#

I'll just have people run the command to generate that and send it to me when requesting support

#

Anything I could add to it?

remote goblet
#

more hex support

signal tinsel
#

Lmao

heady birch
#

Is instanceof particularly slow

signal tinsel
#

Aight lets try taskchain

topaz bay
#

companion objects should always be at the bottom of a class

obtuse gale
#

o

#

why?

onyx loom
#

o why

topaz bay
#

Because thats convention

onyx loom
#

i think it looks weird at the bottom

#

๐Ÿ™

#

fuck convention

topaz bay
#

companion objects are not static members

#

It aint java

onyx loom
#

fuck covention

#

telling me to put a space between a colon too

topaz bay
#

I mean... its really not that hard

obtuse gale
#

on the jitpack page it says to use this

#

'com.github.User:Repo:Tag'

#

whats tag?

topaz bay
#

the github tag

obtuse gale
#

whats that lol?

topaz bay
#

its a git thing

#

tags are used to mark a certain point in time

obtuse gale
#

soo...

topaz bay
#

take vault for example

obtuse gale
#

what do i put for it lol

topaz bay
#

You put the fucking tag

#

bruh

#

come on

obtuse gale
#

I havent done anything with tags

topaz bay
#

use your head

obtuse gale
#

whats the default thing

topaz bay
#

Im pretty sure jitpack allows you to use a commit hash as a version as well

#

Don't know though, cause like... central is better

obtuse gale
#

oh wait

#
If the project doesn't have any GitHub Releases you can use the short commit hash or 'master-SNAPSHOT' as the version.```
topaz bay
#

welp

#

there ya go

obtuse gale
#

Added API details

#

and examples and whatnot

topaz bay
#

You have made a mockery of kotlin

obtuse gale
#

lol

topaz bay
#

Does the spacebar just like... not work on your keyboard?!?!?

#

WHY

obtuse gale
#

lol

#

I just control Alt Ld for u lol

prisma wave
#

you should throw Error instead of RuntimeException

#

looks cooler

#

and no need to catch it

obtuse gale
#

nO

#

if I dont catch it the code stops doesnt it?:

#

Thats what I was having before

prisma wave
#

hm

obtuse gale
#

I want the runtime exception to get thrown 10 times ofc

prisma wave
#
var error = Error()
repeat(10) {
   error = Error(error)
}
throw error
#

tasty

topaz bay
#

....

#

You could just like...

#

throw one exception

obtuse gale
#

na

topaz bay
#

and call print 10 times

obtuse gale
#

whats the point in that

topaz bay
#

4head ass

obtuse gale
#

also im just kinda guessing the api works

#

havent tested it whatsoever

topaz bay
#

thats not an api

obtuse gale
#

yes it is

#

its a pro api

topaz bay
#

Its trash

#

And heresy

obtuse gale
#

NO

topaz bay
#

To be quite honest

obtuse gale
#

How else would you use my plugin in yours then sx??

topaz bay
#

FUCK YOU

obtuse gale
#

Without tha

topaz bay
#

Fucking stupid bot

obtuse gale
#

people need to be able to listen to the FuckEvent

onyx loom
#

I mean... its really not that hard
@topaz bay its not about how hard, but its looks โ˜น๏ธ

topaz bay
#

Using something in something else is not an API

#

@onyx loom it looks immeasurably better when you follow the conventions though

obtuse gale
#

a set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service.

prisma wave
#

not accessing any data

#

nor features

topaz bay
#

Your code being all crammed together is ugly and disrespectful to my eyes

obtuse gale
#

my event has a version variable

#

:))

topaz bay
#

LOL

obtuse gale
#

bruh

onyx loom
#

i would disagree sx ๐Ÿ˜ฆ

obtuse gale
#

did you just say i was disrespecting ur ass??

topaz bay
#

Well youre a microbrain, so that means nothing to me

onyx loom
#

class ClassName: extension() {
// blah blah
}

topaz bay
#

@obtuse gale That is what happens when Im reading and writing at the same time

onyx loom
#

class ClassName : YUCK

topaz bay
#

I end up writing what Im reading instead of what I want to actually write

obtuse gale
#

you get ur eyes confused with ur ass?

topaz bay
#

No, nothing was confused

#

It just gets overridden

obtuse gale
#

Any plugins you make in future I should hope hook into Fuck1.8

topaz bay
#

I will do everything I can in my power to ensure this repository is seen by not another soul.

obtuse gale
#

do you support 1.8 users?

topaz bay
#

Nope, but I also do not support trash kotlin code

obtuse gale
#

make it better for me

topaz bay
#

Absolutely not.

onyx loom
#

shutup or pr

#

is it os aj?

jovial warren
#

lol

obtuse gale
#

yep

onyx loom
#

shutup or pr

#

thisll do the trick

topaz bay
#

I refuse to take part in this heinous atrocity

obtuse gale
#

its sexy i reckon

topaz bay
#

You've already shattered a large part of my ever increasingly shrinking soul

#

Thats kind of an oxymoron

#

increasingly shrinking

prisma wave
#

you're an oxymoron

errant geyser
#

We're all morons

topaz bay
#

Well you're short

#

So who really wins here Alex

onyx loom
#

cant even remember what oxymoron means :kappa:

topaz bay
#

NO ONE

prisma wave
#

im actually massive

topaz bay
#

An oxymoron is something that seems to directly contradict itself

obtuse gale
#

Aj3douglas

#

good code

topaz bay
#

Well... well no...

#

Im pretty sure it has to be a figure of speech

#

Your statement is just false

#

LOL

jovial warren
#

yeah an oxymoron is when two words next to each other contradict one another

#

but oxymorons are only about two words directly next to each other, juxtapositions are what they are called if they aren't directly next to each other (a.k.a two phrases contradict one another)

onyx loom
#

ohhh yea

#

pretty ugly

heady birch
#

microbrain

topaz bay
#

That is not at all what a juxtaposition is

heady birch
#

pretty ugly

topaz bay
#

Thats not really an oxymoron either

remote goblet
#

aj ima upvote that shit for the idea

heady birch
#

the computer screamed at kalibers code

onyx loom
#

WHAT

remote goblet
#

downvote it because damn the video is laggy

onyx loom
#

whats wrong with my code ๐Ÿ˜”

topaz bay
#

As you arent using pretty in the sense of beauty, but as an modifier for ugly

heady birch
#

Oh I meant AJs

onyx loom
#

๐Ÿ˜„

obtuse gale
#

what video is laggy??

onyx loom
#

yeah fuck ajs code

heady birch
#

Or whoever's they were complaining about

obtuse gale
#

๐Ÿ˜ข

remote goblet
obtuse gale
#

mine?

topaz bay
#

downvote

#

because sublime is trash

obtuse gale
#

not laggy for me

remote goblet
#

or its my pc

topaz bay
#

get that shit out of here

remote goblet
topaz bay
#

vscode is better

#

smile

quiet depot
#

sublime is the superior text editor

errant geyser
#

Sublime is superior

#

I've never used VSC, but Sublime just is

topaz bay
#

This is a prime example of the epitome of idiocy

obtuse gale
#

vsc takes like

#

a solid 2 seconds to load

quiet depot
#

yeah

#

imagine what you could do in that spare 2 seconds

topaz bay
#

vsc just took 1.5 seconds to open for me

#

To a remote server.

quiet depot
#

lol

topaz bay
#

with 10 files.

quiet depot
#

sublime is effectively instant

topaz bay
#

to remote???

quiet depot
#

I don't believe sublime has built in remote capabilities like vsc

topaz bay
#

Just as I thought.

#

Trash.

jovial warren
#

hey would anyone know why my editor colour scheme isn't applying properly?

#

using Atom OneDark (customised by me)

#

and half of the colours aren't working properly

#

most of the keywords are loading properly but the rest of it is just like "nah fuck this"

#

okay must be an issue with the way it detects Kotlin code since it's detecting Java code just fine

#

๐Ÿค”

quiet depot
#

is this for intellij?

jovial warren
#

yeah

quiet depot
#

make sure you're applying the theme properly

#

tools > material theme > material theme chooser > atom one dark

jovial warren
#

yeah

#

it's working just fine

#

and some of the colour scheme is working

#

but most of it isn't

#

I'm talking about the editor, just the editor, the rest is fine

errant geyser
#

I've never touched datapacks, is there a list somewhere of all the keywords/constants?

jovial warren
#

if you go in to editor settings -> color scheme you can see thingys to do with highlighting

hot hull
#

@prisma wave Is this proper naming for a package which contains all the format objects?

#

Or should it be named something more significant?

prisma wave
#

could call it format or something?

hot hull
#

Gonna be introducing inventory objects as well, so I guess I can just subpackage it

heady birch
#

follow NLR principle

hot hull
#

NLR?

heady birch
#

Niall left right

onyx loom
#

im more of ARL guy

#

arabic right left

heady birch
#
Niall Left Right Naming Principle
--------------------------
Left      Right

SomeObject
    Object
    ObjectManager

Left- Implementations of the object
Right- Owners or users of the object.

Examples:

BukkitPlayer
SpongePlayer
      Player        <-- Concrete interface or abstract object
      PlayerManager
      PlayerHandler
#

Can an admin please add this to the FAQ

#

Also- my findings

#

You cannot make your own packets, it doesnt like that

prisma wave
#

well yes

heady birch
#

But you can implement IChatBaseComponent, I'm about to run tests now

prisma wave
#

there's no registration on the client for them

heady birch
#

I tried extended PacketPlayOutScoreboardTeam

hot hull
#

FileManager or FileLoader
(All it does it load files into objects)

heady birch
#

loader

#

or

#

ObjectSource ๐Ÿ˜Ž

#

final ObjectSource source = new FileObjectSource()

hot hull
#

Niall, slightly annoyed, smh

heady birch
#

Frosty, dont care, follow NLR, thank you

#

Frosty

#

Can you add to the FAQ?

old wyvern
#

wtf is NLR

onyx loom
#

nothing

heady birch
#

scroll up

onyx loom
#

dont worry about it

heady birch
#

dont erase it from history!

hot hull
#

I can't no, if it had actual arguments to it, then I would, but since it's a meme nah

heady birch
#

It aint a meme

prisma wave
#

@onyx loom what's the syntax for your expansion?

heady birch
#

Kind of disrespectful

onyx loom
#

wym?

prisma wave
#

is it %random%?

onyx loom
#

%rng_blah_blah%

prisma wave
#

ah ok

onyx loom
#

verified ๐Ÿ˜Ž

hot hull
#

I mean provide actual arguments and I'll ask Piggy if it's valid enough to be added

heady birch
#

what are arguments

#

also I made it up

#

Not sure if it actually exists

#

Ok

#

I just broke grounds on 1.16

#

Everything teaches you wrong

#

Unless I'm wrong lol

#

Oh my god

#

Yep I'm wrong LOL

errant geyser
#

@onyx loom u ready yet?

jovial warren
#

fixed your bin katsumag

errant geyser
#

Thanks

#

It still doesn't actually save, u know why?

onyx loom
#

yea sorry, 2minutes. i promise this time xd

errant geyser
#

kk

jovial warren
#

probably haven't configured it lol

errant geyser
#

That would probably be the issue

jovial warren
#

lemme do it

#

also did you design these hover thingys on your portfolio?

#

the reason why you couldn't save btw is because the default is memcached and you need to install that, I've changed it to redis so it should be working just fine now

errant geyser
#

also did you design these hover thingys on your portfolio?

#

Wdym @jovial warren ?

#

Also thx for fixing that

jovial warren
#

np

#

still got one last thing to do though and that's install redis to node

prisma wave
#

some kotlin wrappers for mf-gui

frail glade
#

What benefits does it provide?

prisma wave
#

being slightly nicer to look at mostly

#
  gui(somePlugin, title = "Test") {
            items[3] = createItem(Material.STONE).toGUIItem {
                isCancelled = true
            }
        }
#

indentation messed up lol

#

don't expect anyone to use it but I said I'd give it an experiment so here we are

errant geyser
#

Ima use it next time around

prisma wave
#

aight cool

errant geyser
#

also did you design these hover thingys on your portfolio?
@jovial warren what do you mean by this?

jovial warren
#

the thingys that pop out slightly when you hover over them

errant geyser
#

Yeah I did

#
.featured-categories img:hover {
  transform: scale(1.1);
}```
hot hull
#

@prisma wave Imagine not using my fork which adds in inventory types, pfft

prisma wave
#

soz

#

forgot it existed

hot hull
#

:c

obtuse gale
#

imagine using a fork from a 1.8 user

errant geyser
onyx loom
#

how do i update an expansion?

#

ecloud

prisma wave
obtuse gale
#

๐Ÿคฎ

onyx loom
#

๐Ÿ™‚

obtuse gale
#

smh barry

#

not good enough

ocean quartz
onyx loom
#

i hardly use 1.8 anymore, but i just dont think theres anything wrong it ๐Ÿ™‚

#

GREAT FORK

#

i dont see a button on how to update the file ๐Ÿ˜ฆ

hot hull
#

smh Matt

onyx loom
#

only the descriptions and stuff

prisma wave
#

you don't

#

you let it decay forever

onyx loom
#

โ˜น๏ธ

errant geyser
#

Kaliber you have to release a new version and upload the file iirc

prisma wave
#

into the entrenching pit of legacy software

hot hull
errant geyser
#

There should be a versioning page somewhere

onyx loom
#

frosty should know ๐Ÿ˜ฆ

hot hull
#

I've no clue when it comes to the ecloud, soz

onyx loom
#

rip

prisma wave
#

@hot hull you don't need the / and I'm pretty sure there's something for getting the name without the extension but otherwise good

onyx loom
#

ill just upload the jar to GH for now, release it on ecloud tomorrow

hot hull
#

Yea there is, I just can't remember what, I know kotlin has a nice method for that

prisma wave
#

yea

hot hull
#

Not seeing the class KM

prisma wave
#

FilenameUtils?

#

it's in spigot i'm pretty sure

#

oh it's in commons-io not commons-lang

onyx loom
#

ok @errant geyser ready to play? ๐Ÿ˜„

errant geyser
#

yeah sure

#

Inv me, ur not online for me

hot hull
#

Slight debate when it comes to using the logger, do I have a static logger instance, or do I just pass in my plugin instance via DI just for that?

heady birch
#

Pass the logger instance

#

Or make it static

jovial warren
hot hull
#

Which is more logical, this

ItemStack item = new ItemStack(material, itemSection.getInt(path + ".amount"), (short) itemSection.getInt(path + ".data"));

or having two methods depending on the version

ocean quartz
#

What would you guys name a scroll method? Yes still stuck on this
Currently I am just using the paginated gui stuff, so it's gui.nextPage
I thought about either gui.scrollForward or just gui.next but idk which one sounds better

hot hull
#

gui.next

errant geyser
#

gui.next

hot hull
#

Since scroll could be missinterpreted

ocean quartz
#

Ooh what about gui.scrollNext and gui.scrollPrev?

errant geyser
#

gui.next gui.prev is what I'd go for

#

The scroll bit is just extra bytes

ocean quartz
#

Fair

#

I wish you could override a parent method and make it private

hot hull
#

Anyone got console and an IDE opened?

#

Could use a quick Bukkit.getServer().getClass().getPackage().getName() printout

prisma wave
#

it'll be org.bukkit.craftbukkit.version.CraftServer I think

ocean quartz
prisma wave
#

surely it should be a List<Value>

#

bc of the contract of requireNotNull

heady birch
#

@ocean quartz Lol

#

Your turning into me

#

Go with the most extensible

#

scroll(ScrollDirection.LEFT) e.g

ocean quartz
#

I'm horrible with names
And that sounds terrible to use though

#

That'll need checks if it's horizontal or vertical gui and a bunch more stuff, i think a simple one sounds nicer

hot hull
#

I mean in the given case you can only have a back and next

#

So it makes sense..

ocean quartz
#

Now to think about how to add horizontal scrolling

hot hull
#

Wait, you mean actual scrolling?

ocean quartz
hot hull
#

Is that clicking or?

ocean quartz
#

I mean yeah you can't really scroll

hot hull
#

Yea I thought you meant actual scrolling :p

prisma wave
#

@hot hull i would use a configurationsection instead of lots of string concatenation

heady birch
#

In that case

#

If a menu can only be either horizontol or vertical

#

And not both

#

I'd use next() and previous()

hot hull
#

Fixed

ocean quartz
#

Oh god, being both sounds complicated xD

hot hull
#

I mean just have a VERTICAL.next/previous,
and HORIZONTAL.next/previous

#

Would probably make sense

heady birch
#

Because then each inventory type can handle implementations of next() previous

ocean quartz
#

Yeah I feel like rename the pages to that too, that way i can just extend paginated gui for the scroll one

heady birch
#

Yeah

#

follow NLR

#
HorizontalPaginatedGUI 
          PaginatedGUI
                   GUI
                   GUIManager
                   GUIEventListener
#

?faq nlr

hot hull
#

eh what?

The embedded resource 'plugins/FrozenJoin/inventories/hub.yml' cannot be found in plugins/FrozenJoin-1.2.1-all.jar

#

Am I missing something or?

onyx loom
#

lol bad

hot hull
#

:c

prisma wave
#

send your getResources call

errant geyser
#

Code mr Frost man?

hot hull
#

wdym getResources, using this

saveResource(getDataFolder() + "/inventories/hub.yml", false);

#

Is that not what I should be using thonking

prisma wave
#

saveResource mb

#

and no it's not

hot hull
#

Enlighten me kind sir

prisma wave
#

it should be saveResource("/inventories/hub.yml", false) I believe

#

you don't include the data folder

hot hull
#

ah

errant geyser
#

saveResource("/inventories/hub.yml", false)

#

Yeah no datafolder

prisma wave
#

2 speedy 4 u

errant geyser
#

๐Ÿ˜ฆ

hot hull
#

katsu, now all I'm waiting for is you .c

#

:c*

errant geyser
#

PR or shut up

hot hull
#

Is it Java?

errant geyser
#

:))

#

Yeah it is rn

hot hull
#

link

remote goblet
errant geyser
remote goblet
#

we're yet to find out where the other items are

#

or why the lore is in italic

#

but one day we will find out

hot hull
#

If it's 1.16

#

That's normal :kek:

remote goblet
#

Are lores now

#

always

#

italic?

hot hull
#

Yea

#

It's fucked

remote goblet
#

FUCK

#

italic looks dumb as hell in minecraft

hot hull
#

Gotta wait for those idiots to fix it

remote goblet
#

Mojang is fucking dumb

#

like

hot hull
#

I know the paper team had a meeting today with them iirc

remote goblet
#

can the paper team tell them to add hex support Everywhere

old wyvern
#

they had a meeting with whom?

hot hull
#

Dipshits at mojang

old wyvern
#

Damn

heady birch
#

Everyones still using legacy text

#

ยง format

#

It's all changed

old wyvern
#

Wait so now the client by default uses italic always?

hot hull
#

Seems like it (atleast in menus)

old wyvern
#

ah rip

heady birch
#

Everything chat related is an IChatBaseComponent

#

Ever since 1.8 it's been taking over the old strings

hot hull
obtuse gale
#

thinking of changing Fuck1.8

#

instead of it shutting down the server

#
class FuckYou : Listener{
    @EventHandler
    fun onJoin(event:PlayerLoginEvent){
        if (Bukkit.getServer().version.contains("1.8")) {
            event.player.kickPlayer("The owner is a fuckhead and accidentally uploaded the wrong version ยฏ\\_(ใƒ„)_/ยฏ")
            throw RuntimeException("Fuck you :))")
        }
    }
}```
heady birch
#

while (true) {
throw runtime exception
}

obtuse gale
#

them make that also call FuckEvent

#

If i didnt catch the exception that made the code return in past

old wyvern
#

Why not create a new process to delete the jar โ˜ ๏ธ

remote goblet
#

Why not make it just delete the entire server

heady birch
#

Managed to achieve a good improvement with hex colours

#

~12x improvement

#

Pinnacle of performance

jovial warren
#

๐Ÿ‘

ocean quartz
#

@topaz bay Would you say it's a bad idea to have package-private fields on a class?
Example:

//gui class
Inventory inventory = ..

// paginated gui extends gui
inventory.addItem()..

Or would you say package private getter and private member instead?

//gui class
private Inventory inventory = ..

// paginated gui extends gui
getInventory().addItem()..
heady birch
#

Make it protected

ocean quartz
#

I think package-private would make more sense though, since it's in the same pacakge
Just don't know if it'd be right to do it or not

hot hull
#

Time to coop your nbt class Matt >:)

ocean quartz
#

Do it ;p

topaz bay
#

@prisma wave requireNotNull returns the non nullable value

prisma wave
#

But the contract implies that the value isn't null

topaz bay
#

That is true

#

But youre also using the method wrong

#

It implies that the returned value isnt null

#

Are you using the normal inference, or the new inference?

prisma wave
#

Normal I think

#

I was on 1.3.72 at the time and not using any compiler flags so

jovial warren
#

okay Alt+Enter doesn't seem to work now on this Material UI thing

#

no idea what I did to it but it seems fucked

topaz bay
#

works fine for me

prisma wave
#

Yeah that's why I was thinking it's a bug

topaz bay
#

If thats a map and youre running the map functions on the entries, why are you calling back to the original map

#

instead of getting it from the entry?

prisma wave
#

I don't even remember the code

#

Hold on

distant sun
#

what's value ^map?

prisma wave
#

It means there's an implicit return@map

jovial warren
#

just tells you that it's returning that value to the map yeah

distant sun
#

mkay

jovial warren
#

value is the value it'll automatically return

#

it's a Kotlin thing

#

anyway, time to re-install IJ lol

prisma wave
#

@topaz bay because params is a different map to signature.params

topaz bay
#

gross

jovial warren
#

sounds bad

prisma wave
#

Not really

jovial warren
#

naming thingys the same when they're able to interact with eachother

prisma wave
#

Params is the provided parameters, signature params is the expected ones

topaz bay
#

You should have done keys.mapNotNull(params::get)

prisma wave
#

Fairly sure I can't do that for some reason

#

I changed the code anyway so

topaz bay
#

delete.

prisma wave
#

Quoi?

topaz bay
#

tous

prisma wave
#

Absolument pas

topaz bay
#

mais pourquoi

onyx loom
#

parce que......

prisma wave
#

Il tout travail

topaz bay
#

marche

#

I remember making that exact same mistake in the 9th grade

prisma wave
#

Je comprends pas

topaz bay
#

travail is work like a job

prisma wave
#

Oh yeah

#

I was thinking it wasn't right

topaz bay
#

marche is work like functioning properly

old wyvern
#

Pourquoi tout le monde parle franรงais maintenant?

prisma wave
#

Ahh I see

#

literal translation bad

old wyvern
#

๐Ÿ˜‚

prisma wave
#

@old wyvern pourquoi pas?

old wyvern
#

uhh

#

one sec

prisma wave
#

Lol

old wyvern
#

back to google translate

topaz bay
#

I remember specifically my teacher asking me if the printer was working

#

And I couldnt figure out why she was asking if it was walking

#

And she explained this to me

old wyvern
#

Et pourquoi pas?

prisma wave
#

I see I see

topaz bay
#

OH WOW

prisma wave
#

I would've guessed "rรฉussir" for "works properly" but obviously not

old wyvern
#

Oh reversing that translation comes out wrong

topaz bay
#

I just realized this is the same sort of thing as something "running"

prisma wave
#

wow

#

WOW

topaz bay
#

Thats kinda cool

#

Languages are fun

prisma wave
#

clever french people

topaz bay
#

Very clever

old wyvern
#

En effet

topaz bay
#

ew wtf

#

we dont do that here

old wyvern
#

Do what?

topaz bay
#

VRAIMENT!!!

old wyvern
topaz bay
#

Words have multiple meanings

#

lol

old wyvern
#

Vraiment means somethign else?

topaz bay
old wyvern
#

Oooooo

topaz bay
#

Words have meanings based on context

onyx loom
#

languages ๐Ÿ™„

old wyvern
#

Yes I have barely even heard french like once if at all

topaz bay
#

If someone was questioning something I said, I would respond with vraiment

#

In the affirmative

old wyvern
#

lol

oak raft
#

Hey, I'm getting into plugin development and notice that people have me.<username>.<plugin name> as something which I don't know the name of, it also could be a website aswell. What is that and why is it formatted that way?

onyx loom
#

package names

old wyvern
#

Convention

#

Plus it helps if there are conflicting class names

jovial warren
#

also since when could you put functions INSIDE of functions in Kotlin?

#
fun function() {
    fun insideFunction() {
        fun insideInsideFunction () {
            // do something
        }
    }
}
#

apparently that's well within Kotlin syntax

onyx loom
#

it is

#

a thing

jovial warren
#

no idea when that was introduced

prisma wave
#

Since always afaik

#

they are very occasionally useful

old wyvern
#

local functions have been around since the start

#

Supposed to be used when you have recurring code that isnt needed elsewhere

onyx loom
#

yeah i think it wouldve said which version it was introduced in if it wasnt from the beginning

prisma wave
#

indeed

#

It also saves polluting the scope

#

Which is nice

old wyvern
#

true

jovial warren
#

I'd call them embedded functions but idk what they're actually called

old wyvern
#

They are called Local functions

prisma wave
#

^

jovial warren
#

ah okay

prisma wave
#

damn 2018 me was a dumbass

#
 for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
            if (plugin.getDescription().getDepend().contains("KnightzAPI")) {
                dependent.add(JavaPlugin.getProvidingPlugin(plugin.getClass()));
            }
        }```
#

just found this work of art

#

catch (NullPointerException e) ๐Ÿ˜ฌ

onyx loom
#

๐Ÿ˜•

topaz bay
#

Such a massive disappointment

prisma wave
#

truly

#

i was actually braindead

topaz bay
#

was?

prisma wave
#

i put half the code for a commission in a public api

#

was

onyx loom
#

and at that point u wouldve been coding for like 2 years?

prisma wave
#

yeah about that long

onyx loom
#

smh my head

prisma wave
#

slightly less

onyx loom
#

i expected better of u

topaz bay
#

I didn't

#

๐Ÿ˜ˆ

onyx loom
#

but, forgive me and i can forgive u ๐Ÿ˜

prisma wave
#

ah but I have an excuse

#

oh ffs what is this

#
    public static User valueOf(OfflinePlayer root) {
        for (Map.Entry<OfflinePlayer, User> entry : users.entrySet()) {
            if (entry.getKey().equals(root)) {
                return entry.getValue();
            }
        }
        return new User(root);
    }

#

uses a hashmap in O(n) time like a boss

old wyvern
#

๐Ÿ˜‚

prisma wave
#

my excuse is that I was a self taught dumbass

#

lol

onyx loom
#

๐Ÿค”

old wyvern
#

Welp

#

I had a dumber period. I started with VB so I had a period where I used a label with the visible flag set to false for a variable

#

๐Ÿ˜‚

prisma wave
#

WHAT

onyx loom
#

visual basic ๐Ÿ™

old wyvern
#

Yup

prisma wave
#

that's worse

old wyvern
#

obviously

prisma wave
#

Set<T> list = new HashSet<>(); ๐Ÿค”

old wyvern
#

I was like 10 or something

#

Wait what?

#

What was that a reply to? @prisma wave

prisma wave
#

oh just more of my shitty code

old wyvern
#

oh xD

#

Set<T> list

prisma wave
#

I've seen at least 2 api keys just casually committed

old wyvern
#

lol

cyan wagon
#

I'm trying to register my own placeholders but I'm getting this error:
https://mcpaste.io/5844523b6e6e10d0

The issue is caused by a NPE in my hook class CDPAPIHook.java from calling my getCooldown() method in the class AppleListener.java, here is my return code in the hook class:

 @Override
 public String onPlaceholderRequest(Player player, String identifier) {

     if (player == null) {
         return "";
     }

     if (identifier.equals("cooldown")) {
         return apple.getCooldown(player);
     }

     if (identifier.equals("combattag")) {
         return plugin.getConfig().getString("combattag", "value doesnt exist");
     }

     return null;
 }

Then the getCooldown() method and Objects or methods that it refers to:

    public Map<UUID, Long> cooldowns = new HashMap<UUID, Long>(); // this stores the UUID of the player and when they ate the apple.
    cooldowns.put(p.getUniqueId(), currentTime); // this line is run when a player eats a gapple and does not have a cooldown already.
    public boolean hasCooldown(Player p) {
        
        long currentTime = System.currentTimeMillis();
        
        if(cooldowns.containsKey(p.getUniqueId())) {
            if(cooldowns.get(p.getUniqueId()) <= currentTime - (plugin.getConfig().getInt("Cooldown") * 1000)) {
                cooldowns.remove(p.getUniqueId());
                return false;
            }
            return true;
        }
        return false;
    }
    public String getCooldown(Player p) {
        final long currentTime = System.currentTimeMillis();
        if(hasCooldown(p)) {
            final long cooldown = ((plugin.getConfig().getInt("Cooldown") * 1000) - currentTime + cooldowns.get(p.getUniqueId())) / 1000;
            return String.valueOf(cooldown);
        }
        return "0";
    }
#

Any help would be greatly appreciated! ๐Ÿ™‚

hot hull
#

@obtuse gale Was it you who asked something about Map<String, String, String> ?

obtuse gale
#

er

#

yeah

hot hull
#

Use a table?

obtuse gale
#

a what

hot hull
#

Table<String, String, String>

obtuse gale
#

oof still cant fix this bungee thing'

hot hull
#

rip

obtuse gale
#

Just giving me this cannot conenct to a default or fallback bullshit lol

hot hull
somber tulip
#

Looks like me after I introduce 15 bugs alongside one new feature

hot hull
#

Just for that 1 class I need it in ;C

obtuse gale
#

oof

heady birch
#

What's the class?

hot hull
#

Action

#

:)
[08:48:11 INFO]: Loading inventory: example
[08:48:11 INFO]: Loading inventory: hub

#

Ayy it works

topaz bay
#

gross log

heady birch
#

[22:18:27 INFO]: [net.kitesoftware.board.KiteBoardPlugin] [KiteBoard] Registered criteria 'PERMISSION'

remote goblet
#

My dude

#

you all straightup ignored that guy asking about placeholders SadCat

#

oh he gone

wintry sphinx
obtuse gale
#

dont post in multiple channels

wintry sphinx
#

Sorry I just saw the channel.

old wyvern
remote goblet
#

it'll be legit

old wyvern
#

damn

hot hull
#

Imagine posting something fake

#

pfft

old wyvern
#

I mean I initially assumed he just did it for the memes

#

lol

hot hull
#

Can't wait for that to be on spigot

old wyvern
#

lol

#

Imagine making a youtube video player like that xD

hot hull
#

Nah use maps for that

old wyvern
#

lol

hot hull
#

It's better resolution

pallid gale
#

raid shadow legends ad in chat

old wyvern
#

lmao

hot hull
#

Oh god

#

Before you can continue playing, here's todays sponsor! Raid Shadow Legends

signal tinsel
#

@heady birch that scoreboard is awesome

heady birch
#

Thanks

#

A pain to get working

#

Had to write my own IChatBaseComponent implementation to improve performance

#

And now I need to fix normal chat colours ๐Ÿ˜„

signal tinsel
#

Whats with the normal one

heady birch
#

Well for whatever reason my parser is a little broken

#

So the colours are in the wrong position

#

&aGreen&cRed&9Blue

#

Green would be red and red would be blue, blue would also be blue

hot hull
#

Niall, show the parser

#

The fuck

heady birch
#

What

remote goblet
#

frosty

#

i wish you never asked

hot hull
#

So do I

heady birch
#

Fine it's gone now ๐Ÿ˜ฆ

hot hull
#

Sorry for bullying, confused as to why you're so over complicating it

heady birch
#

Uh

#

Maybe because I don't want 25% cpu being spent serialising and deserialising JSON.

#

EnhancedIChatBaseComponentFactoryProvider

ocean quartz
#

@old wyvern That is legit yeah, the code is on GitHub
Imma try make it read straight from YouTube next

hot hull
#

Only fans in chat

heady birch
#

Haha I got the parser working, finally ๐Ÿ™‚

#

Now I gotta change this:
[net.kitesoftware.board.KiteBoardPlugin] [KiteBoard]

onyx loom
#

Only fans in chat
this

heady birch
#

What

jovial warren
#

๐Ÿคข
@hot hull object is a Singleton ๐Ÿ™‚

#

this is why Kotlin > Java

#
public class Singleton {

    private static final Singleton INSTANCE = new Singleton();

    private Singleton {
    }

    public static Singleton getInstance() {
        return INSTANCE;
    }

    // methods here
}
```becomes:
```kotlin
object Singleton {

    // methods here
}
heady birch
#

Beautiful

jovial warren
#

Why thank you kind sir

#

isn't there other ways you can do singletons in Java?

old wyvern
#

Yes

jovial warren
#

I swear there's a way where you instantiate the instance somewhere else

old wyvern
#

Enums

jovial warren
#

technically though, enum != Singleton

old wyvern
#

Singleton is a pattern not a type

jovial warren
#

since enums don't have any instances, they're just representations of static constants

old wyvern
#

Enum singletons are also ussually considered better than defined by the static getter

jovial warren
#

idk never really used enum singletons before

old wyvern
#

since enums don't have any instances, they're just representations of static constantsValues present for each value of the enum are separate

jovial warren
#

and I rarely use enums as it is lol

old wyvern
#

Saying this again, Singleton is a pattern

jovial warren
#

and yeah true

old wyvern
#

Not a type

jovial warren
#

both true

prisma wave
#

Enums compile to instances

jovial warren
#

didn't know that

jovial warren
#

also if they're instances can I set their values?

prisma wave
#

no

#

enums compile to constants

jovial warren
#

okay

prisma wave
#

that are instances of the enum class

jovial warren
#

ah okay

#

because I'm working on Octo and I want the messages for commands to be optional and to be able to be changed

prisma wave
#

Material.STONE for example compiles to ```java
public static final Material STONE = new Material(2);

jovial warren
#

probably wondering what Octo is lol

prisma wave
#

using enums for dynamic data doesn't seem like a good idea

#

I assume some command framework or something

jovial warren
#

yeah kinda though I plan for it to do more than that

#

I want to make messages customisable but then not have to get an instance, doesn't sound possible to me

heady birch
#

Anyone here used guice for MC plugin?

#

What logger did you use, inject the Plugin Logger?

old wyvern
#

@jovial warren you can still set the values stored inside a enum instance

#

I assume you were planning something like

enum Message {
  MESSAGE_1("default msg 1"),
  MESSAGE_2("default msg 2");
  
  private String message;
  Message(String def) {
     message = def;
  }

  public void setMessage(String replacement) {
     message = replacement;
  }

  public String getMessage() {
    return message;
  }
  
}
hot hull
#

Ew

old wyvern
#

yes?

hot hull
#

Very ew

old wyvern
#

What would you suggest different about that?

hot hull
#

Not using an enum at all

old wyvern
#

Why not?

hot hull
#

I'll show you what I use and you'll judge when I get home

old wyvern
#

Sure

#

๐Ÿ‘Œ

quiet sierra
#

@heady birch To make that rgb stuff better all the colors should be consistent

#

Like an rgb keyboard

#

Instead of each line having a different color scheme

heady birch
#

Oh yeah I was just showcasing that it doesn't have to be a rainbow

hot hull
#

It's just a showcase so it don't really matter does it

errant geyser
#

Python has legitamate use cases and is a valuable language for small, lightweight programs. I wouldn't use it for anything major, but for quick mockups its undeniably great

quiet depot
#

It's concept is undeniably great, it's execution is awful though. And for that reason alone, I say that other scripting languages with a similar concept, and better execution, beat out python.

#

a perfect example of a language that fits my criteria, is lua

#

I'm no expert though, and even though I glorify lua, I haven't actually put as much research into it's flaws, as I have python's

#

it too, could be greatly flawed in it's execution

old wyvern
#

Julia maybe

quiet depot
#

Never used it or looked at it

prisma wave
#

julia is quite nice

quiet depot
#

julia is supposed to be speedy right?

prisma wave
#

it's very speedy

#

faster than C in some tests

#

apparently

quiet depot
#

yeah no lol

old wyvern
#

yes

quiet depot
#

their benchmarks are just badly made

old wyvern
#

It is

prisma wave
old wyvern
#

It is faster

#

But in specific cases ofc

quiet depot
#

that's impossible

prisma wave
#

not impossible

quiet depot
#

well

old wyvern
#

You can read up on it

quiet depot
#

yeah

#

my bad

#

not impossible, forgot that you can actually go a bit lower than c

old wyvern
#

Only this julia is lacking rn that python has would be libraries for a lot of things

#

But its comin up

prisma wave
#

yeah it's good

quiet depot
#

I'd bet that the benchmarking software used for their c tests is just badly implemented though

prisma wave
#

the only thing that annoys me is that / is different to รท

#

so you have to copy and paste the symbol from somewhere

old wyvern
#

/ still divides tho

#

รท just truncates it to int

prisma wave
#

indeed

old wyvern
#

also that character would be alt + 0247

quiet depot
#

setup a macro

old wyvern
#

mhm

#

I have 6 extra keys so that works for me

obtuse gale
#

IntelliJ thinks all my macro keys are the same

wintry sphinx
#
 switch(e.getCurrentItem().getType()) {
                case DIAMOND:
                    if(player1.getInventory().contains(Material.GOLD_NUGGET)) {
                        boolean done = false;
                        int amount = 0;
                            if(item1.getItemMeta().getDisplayName().contains(Utils.chat("&c&lFRAGMENT &8(( &7Tier I &8))"))) {
                                for (ItemStack item : player1.getInventory().getContents()) {
                                    if (item != null && item.isSimilar(materials.getFrag()) && done == false) {
                                        item.setAmount(item.getAmount() - 9);
                                        done = true;
                                    }
                                }
                                e.setCancelled(true);
                                player1.getInventory().addItem(item1);
                                player1.sendMessage(Utils.chat("&aCongratulations!"));
                                break;
                            } else {
                                player1.closeInventory();
                                player1.sendMessage(Utils.chat("&cDon't have funds!"));
                                break;
                            }

                    }

ERROR: the currency "gold nuggets" cannot be used with the SHOP GUI, I used a contains() to parse through the item name, but now I can't use it as it says (don't have funds).

hot hull
#

What's the move hotbar slot event called again? I keep forgetting

versed ridge
#

PlayerItemHeldEvent?

hot hull
#

Yup, thanks

errant geyser
#

yeah

wintry sphinx
#

Is there a way to stop a process if the Item meta data of both items don't match?

errant geyser
#

return?

wintry sphinx
#

no like

#

a comparison?

#

how do we do dat?

#

so like item1 metadata = item2 meta data then pass through

#

but else

#

stop

errant geyser
#

else return;

wintry sphinx
#

how about the comparison?

#

how do we do the if?

#

of the items.

hot hull
#

item.equals.item

wintry sphinx
#

let me show you the code.

errant geyser
#

ItemStack#isSimilar(ItemStack)

hot hull
#

or compare the data

wintry sphinx
#
case DIAMOND:
                    if(player1.getInventory().contains(materials.getFrag())) {
                        boolean done = false;
                        int amount = 0;
                        for (ItemStack item : player1.getInventory().getContents()) {
                            if (item != null && item.isSimilar(materials.getFrag()) && !done) {
                                item.setAmount(item.getAmount() - 9);
                                done = true;
                            }
                        }
                        e.setCancelled(true);
                        player1.getInventory().addItem(item1);
                        player1.sendMessage(Utils.chat("&aCongratulations!"));
                        break;
                    } else {
                        player1.closeInventory();
                        player1.sendMessage(Utils.chat("&cDon't have funds!"));
                        break;
                    }

The 2 items are normal golden nuggets, and then nuggets with lore / and custom name, i dont want them to be using normal nuggets to execute this.

#

I use the isSimilar

#

but it still does let me use the GUI with normal gold nuggets.

errant geyser
#

Ima let Sx or BM roast you.

wintry sphinx
#

why .-.

#

Is it bad .-.

#

im sorry i just started..

errant geyser
#

And yeah its not great

#

But anyway

wintry sphinx
errant geyser
#

You should make a method return a boolean for if the items match. If it was in kotlin you could make an ItemStack extension function, but you're using Java so make a method that compares if the ItemStacks are similar, then the lores, then the names, and whatever else u wanna compare. If it matches, return true and carry on ur code

wintry sphinx
#

where should this method be in?

#

just before the for?

errant geyser
#

You can't have a function inside a function

wintry sphinx
#

Oh I see.

#

so It has to be outside the case right?

errant geyser
#

Outside of your entire function

wintry sphinx
#

okay.

ocean quartz
hot hull
#

Why :c

#

And it's an enum