#dev-general

1 messages · Page 348 of 1

prisma wave
#

But yeah if precision was really important using floating points probably isn't the best idea

jovial warren
#

I guess

forest pecan
jovial warren
#

the problem with floating point isn’t the standard, it’s binary

frail glade
#

Bardy, how's the plugin manager going in your Kotlin stuff?

jovial warren
#

working

#

there are commands and events

frail glade
#

Awesome!

#

Is the end goal just a learning experience or do you plan to use this for something? I was thinking it could be a cool limbo-like system depending on how light-weight it was.

half harness
#

sus link

forest pecan
#

how is it sus

half harness
#

._.

jovial warren
half harness
forest pecan
#

wdym

frail glade
#

Ahh alright that makes sense.

jovial warren
#

I mean, it uses coroutines so it should be alright

#

Plugins and commands use their own scope with twice the amount of available processors and the amount of available processors in threads respectively

frail glade
#

Coroutines just helps you thread switch, right? I don't think I've used those natively in Kotlin yet

jovial warren
#

Coroutines are asynchronous subroutines

#

On the JVM they use thread pool executors

#

But I am probably the worst to explain how coroutines actually work lol

#

@prisma wave maybe you can do a better job

#

Or one of you other Kotlin wizards xD

hot hull
#

Would having static registries be acceptable when dealing with a larger project

#

As in teams, arenas, upgrades etc, so it doesn't become big mess

#

Ping pong cause am in class

old wyvern
jovial warren
#

yeah coroutines are basically a frontend for a messy web of callbacks

frail glade
#

Ahh okay so like thread hopping

#

Kinda like TaskChain or whatever

jovial warren
#

the way you write coroutine code is in a blocking fashion

frail glade
#

Ahh

jovial warren
#

Oh btw, Krypton API in DocDex coming soon™️

#

will also probably add official Kotlin documentation whilst I’m at it as well

#

and LuckPerms Krypton also coming soon™️

#

maybe FAWE Krypton as well

#

and any other plugins that have a large enough abstraction layer that I can make an implementation for Krypton without rewriting the whole plugin

#

FAWE should work really well on Krypton as well, as concurrency is built into Krypton’s design

half harness
#

don't the plugins need to be in kotlin tho?

jovial warren
#

yeah, but calling Java from Kotlin is easy

half harness
#

hmmm

jovial warren
#

well, they don’t need to be in Kotlin, but you will have a much better day using Kotlin

#

and some things, like commands, won’t even work in Java, since the execute method is suspending

#

you would need to define all commands using Brigadier’s argument builders

forest pecan
#

add a brigadier extension to krypton kekw

#

/s

jovial warren
#

There is one

#

Admiral is in Krypton

#

Oh also, Glare, you should join the Discord server 🙂

#

It’s in the README

hot hull
#

Is that advertising!

jovial warren
#

stfu

#

no one asked for your input xD

hot hull
#

Answer my question hoe

jovial warren
#

er... does that really count?

hot hull
#

Not this, the one I asked earlier

jovial warren
#

also, what do I have to gain from Glare joining the server?

#

lol

jovial warren
jovial warren
#

wdym by static registries

hot hull
#

Static map accessors

#

Because there's no way to cleanly DI the entire thing

jovial warren
#

if you mean singletons, ew

hot hull
#

Ew you, should I just have a registry class and have that static so everything else doesn't have to be

jovial warren
#

anyway, I’m in English lol, cya later

hot hull
#

Mf.

dawn hinge
#

Lmao

jovial warren
#

I mean, just make it work and fix it later

#

it’s what most of us here do I think

#

you could have the best looking code in the world, but it’s pretty useless if it doesn’t work

hot hull
#

Well yea duh

#

But why not spend a litle more time from the start and have less ugliness to fix later on

prisma wave
#

Coroutines*

#

In that a coroutine is a "micro thread", usually running on some thread pool that can be paused, cancelled, or rescheduled later

#

Because a coroutine can be paused (or "suspended"), you can write multithreaded code that looks blocking

#

Your coroutine makes a web request on another coroutine / thread, pauses, and then resumes when that request finishes

#

A coroutine itself is a lot more complicated than that and I don't really know enough about them to explain but that's the main principle

half harness
#

|| Goroutines ||

prisma wave
#

Goroutines are an actual thing

leaden cloud
#

does anyone know a plugin that allows wheat to work on its own like on a hypixel skyblock

half harness
#

wot

#

not everyone here plays skyblock ;-;

leaden cloud
#

did you ever played on hypizxel sb?

half harness
half harness
forest pecan
#

i ahve lol

half harness
#

that's why i said not everyone

#

bc some ppl do

leaden cloud
#

okay

half harness
#

like pulse and efe

leaden cloud
half harness
#

1.5k > 1,5k

leaden cloud
#

yea i know but no way there is no pl for that

#

i dont know what to search

hot hull
#

Hypickle wheeet plooogin

half harness
#

🍴

leaden cloud
#

pls someone help 😦

#

i can find plugin 😦

obtuse gale
ocean quartz
#

You're in the wrong channel

leaden cloud
#

i alredy send help

stuck harbor
ocean quartz
#

Then wait

obtuse gale
#

I wonder if

ocean quartz
#

And don't expect people to know

obtuse gale
#

:(

stuck harbor
#

saaadge

obtuse gale
#

No /

stuck harbor
#

bm fix ur site

prisma wave
#

No

#

Maybe

half harness
#

lol

half harness
onyx loom
prisma wave
#

yes

onyx loom
ocean quartz
#

Yes someone put it there and Aikar accepted, totally

frail glade
#

There's already so many 😦

#

Almost have to make a website to track the latest download of each fork.

onyx loom
#

isnt that purpur a fork of tuinity too

prisma wave
#

barack obama once went out and saw a young boy crying on the street. "Why are you crying boy?" He asked. The boy explained that he just found out how inefficient and unoptimised bukkit was. Obama thought for a second, and then said to the boy "you know son, bukkit is open source. PR or shut up".
That boy grew up to be md5 and saved minecraft

stuck harbor
#

why md5

#

good until the end

onyx loom
#

"saved"

prisma wave
#

Many intelligent people have compared md5 to jesus

onyx loom
#

"intelligent"

prisma wave
#

When you do the research there are a lot of similarities

stuck harbor
#

questionably real

#

very contentious

jovial warren
#

I mean, I have a lot of respect for md_5 for the time, effort and dedication that he has put into the Spigot project over the years

#

to keep it running

hot hull
#

Md bad

jovial warren
#

I mean, he has some... questionable programming practices, but I can't really hold that against him, as that's primarily personal preference

prisma wave
#

There have been multiple studies done

onyx loom
#

please cite the sources exactly with links to these sources

prisma wave
onyx loom
#

ah fair enough in that case

jovial warren
#

I got F#!

half harness
onyx loom
half harness
#

they should have forked purpur

prisma wave
jovial warren
half harness
#

fork of a fork of a fork of a fork of a fork of a fork

ocean quartz
half harness
half harness
#

maybe i added too many forks

#

or missed one

#

🍴

ocean quartz
#

Let's make a fork called Forkkit and have people fork it, to make the most forked fork

half harness
#

;-;

prisma wave
#

Oh my god

#

Why I have I not seen this before

half harness
ocean quartz
#

Oh really?

half harness
#

wot

#

imo

#

yes

frail glade
#

There is another one of these out there, I'll have to find it.

half harness
#

lol

prisma wave
half harness
#

uh

prisma wave
#

u might start some real controversy with that!

half harness
#

ur saying spigot > paper?

prisma wave
#

ive never met anyone else that thinks paper is better than spigot!

ocean quartz
half harness
#

ah yes

#

yatopia > everything

dawn hinge
#

Yatopio > purpur, change my mind!! (With no tags)

prisma wave
#

Fefo said yatopia is bad so it's bad

#

I think gian said the same thing

onyx loom
#

gian said same about purpur iirc

prisma wave
#

probably

onyx loom
#

gian knows what hes talking about, surely 🙃

prisma wave
#

what happened to good old tuinity !!

ocean quartz
#

How can it be bad? It's a mix of all the forks! Plus, it's made by the one and only Ivan

half harness
#

wot

onyx loom
#

o nvm then

prisma wave
#

oh my bad

#

I forgot combining everything is always good

lunar cypress
ocean quartz
half harness
#

i have a question

compact perchBOT
#

There is no time to wait! Ask your question @half harness!

prisma wave
#

smh

onyx loom
#

is this open source too? im sure they merge conflicts too! because a PR is still a PR right? must be good!

prisma wave
#

Tier 4 and still asking to ask

half harness
#

how does paper and tuinity and stuff apply optimizations on every new release?

onyx loom
half harness
#

i didn't ask to ask

prisma wave
onyx loom
#

patches

half harness
#

no i didn't

ocean quartz
half harness
#

i said "I have a question"

prisma wave
#

Aikar made a script that can optimise any version

half harness
#

not "I have a question?"

half harness
#

seriouslyyy

#

actually

#

i gtg

#

but

#

plz ping me with response

#

🙂

#

thx

prisma wave
#

well there is a reason paper takes a few days / weeks to update

ocean quartz
#

Hope one day we'll see dkim talking in just one sentence

prisma wave
#

They just ... Do it

onyx loom
#

hope one day well see dkim ask a question then not expect people to give him an answer after he says "i gtg"

frail glade
#

You should've seen the team when 1.16 came out. We sat in a Discord call on and off for like 5 days straight with minimal time in-between and they just round robin working on the patches.

ocean quartz
#

That was awesome i remember the voice channel was always full

prisma wave
frail glade
#

@ocean quartz

onyx loom
#

oh my god

frail glade
#

I think we hit even more at one point but that was just like day 1.

ocean quartz
#

Can't wait for 1.17 ;p

old wyvern
onyx loom
#

im gonna assume most of those guys are muted because of how hectic that would be 😂

old wyvern
#

Wait is glare on the paper team?

frail glade
#

I'm just a mod.

old wyvern
#

Oh

static zealot
#

just a mod

#

nothing much

#

just a mod

old wyvern
#

lol

half harness
#

i thought there was a way to like... idk, apply the patches

jovial warren
#

oh yeah, Glare, I'm at home now, so I can explain a bit more about how the API works

#

the registration is kinda the same, it instantiates the class for you, but you can write your own constructors

#

I mean init blocks

#

you have to take PluginContext as a parameter in your constructor, and that has to be the only parameter it takes, but apart from that, you have much more control than say Bukkit gives you

#

commands are fully asynchronous because they can be

half harness
#

how do patch files work?

jovial warren
#

I remember that

prisma wave
#

They're just like commits in a file

#

They store the changes and you can apply them

jovial warren
#

you basically make changes and git can convert them into summary files

#

patches basically tell git "this is what you need to change"

manic lance
#

I've got a quick question regarding some spigot methods if anyone is familiar with the following:

#player.playSound() <-- Plays a sound that only that player can hear, from what I can tell based on the javadocs. (this is ideal, if thats the case).

#player.spawnParticleEffect() <-- Spawns a particle but ALL players around can see this particle effect. Does anyone know if theres a simple way to flag that particle to only get seen by a specific audience? Or is this going to involve going into packets.

#

I've been doing some testing but I'm getting some weird results and its bundled into a much bigger plugin with other factors, so I want to make sure if anyone has worked with these and understands them a bit better.

steel heart
#

new javadoc conventions?

#

Maybe packets if you just wanna send a particle for a specific player

obtuse gale
#

as far as I know those methods are bound to that player only (playSound, sendTitle, sendActionBar, showParticle, sendBlockChange, etc etc)

static zealot
half harness
#

ye i saw that a few days ago

#

👀

obtuse gale
#

The only thing this proves is the ultimate supremacy Python imposes over other lowling D tier languages

jovial warren
#

lol

oblique heath
#

you right 😂

#

thank you for pointing that out

jovial warren
#

is that project just a really simple socket wrapper?

oblique heath
#

yes

jovial warren
#

ah

#

anything wrong with Netty? just the size?

#

or just a fun side project?

oblique heath
#

well a bit of both

#

netty has a lot of customization to it which is nice but also daunting to people that just want their plugin to work

jovial warren
#

yeah

#

Netty also requires a lot of reading and setup

#

like understanding how the pipeline works is a pain lol

oblique heath
#

yup 😂

#

i tried to get this to need as little mucking about in wikis and guides as possible to get working

jovial warren
#

but once it works, it just kinda works, and it works god damn well

half harness
#

btw is the pub key safe to hardcode?

#

ivan

jovial warren
#

public keys are fine to be public

oblique heath
#

i wouldn't recommend it

jovial warren
#

I wouldn't recommend hard coding anything though

#

no matter what it is

#

getting out of that habit now is important

half harness
#

ok

#

thx

jovial warren
#

yw

half harness
#

y r there 2 keys?

jovial warren
#

oml

#

lemme explain this one

oblique heath
#

read up on RSA encryption

jovial warren
#

my turn

#

right, so you have two types of encryption

#

symmetric and asymmetric

#

in symmetric encryption, you use the same key for both encryption and decryption

#

this is generally used in places where you want very fast encryption, and don't rely on the key being public

#

then there's asymmetric encryption

#

in asymmetric encryption, you have one key for encryption and one key for decryption

#

if you encrypt something with your private key, it can only be decrypted by your public key

#

and the same applies for the other way, if you encrypt something with your public key, it can only be encrypted with your private key

#

make sense?

half harness
#

sorta

jovial warren
#

or do I need to dkim it a bit more

half harness
#

;-;

oblique heath
#

i have to admit i'm not actually using asymmetric to its full potential in my project

jovial warren
#

asymmetric encryption is nice

#

oh btw, you know there's two ways of establishing a shared secret?

oblique heath
#

o.o

jovial warren
#

one is of course diffie-hellman, which just about anyone who knows cryptography knows about

#

and the other is just encrypting the shared secret with the public key

#

which is actually what Minecraft does funnily enough

prisma wave
#

It's like using hibernate for a single table

jovial warren
#

yeah

#

well, using Hibernate at all unless you also use something like Spring or don't care about size at all is overkill

#

but I get your point lol

#

Yugi what was that

old wyvern
#

uh

#

assignment

#

had to mvoe from mobile to pc

jovial warren
#

ah right

#

could've just DMed it to an alt or something lol

old wyvern
#

I dont have an alt xD

prisma wave
old wyvern
#

This was on the top

#

Actually

#

I know what my next project is going to be

prisma wave
#

if you have windows + android there's the Your Phone app

old wyvern
#

ohh

#

Ok that works then

hot hull
#

@jovial warren How did english class go

half harness
#

lol

heady birch
errant geyser
obtuse gale
#

@errant geyser uwu

errant geyser
#

Holarino babes

obtuse gale
#

ily

heady birch
#

I have the perfect image for this

errant geyser
errant geyser
obtuse gale
hot hull
#

I got home at 7 😔

jovial warren
#

oof

errant geyser
obtuse gale
jovial warren
#

gonna start working on adding KDocs into DocDex btw

obtuse gale
#

no

#

stop

prisma wave
#

average php user

jovial warren
obtuse gale
#

'cause I said so

#

duh

heady birch
#

I need this meme but "average <cool programming lanugage> user"

#

Average java developer | Average kotlin developer

#

Nice

jovial warren
#

xD

heady birch
#

Average java developer | Average Jython developer

#

Jython developers are saving valuable time

prisma wave
#

jruby

heady birch
#

SuperX++

jovial warren
#

Jython developers are trying to make something that shouldn't run on the JVM run on the JVM

prisma wave
#

🤣

heady birch
#

Cant say the same about O:XML

prisma wave
#

i forgot a court of law decided python shouldnt run on the jvm

heady birch
#

BM

#

Have you seen o:xml?

prisma wave
#

sadly

ocean quartz
#

Jassembly

heady birch
#

The cobol one sounds cool

prisma wave
#

jobol

#

average invokestatic user | average invokedynamic appreciator

heady birch
#

why write java when we can write the bytecode ourselves

#

😮

prisma wave
#

java provides a number of guarantees that bytecode doesnt

heady birch
#

like

obtuse gale
#

such as

prisma wave
#

idk

#

you cannot write public static void main in bytecode

#

java guarantees you can

heady birch
#

.class public HelloWorld
.super java/lang/Object

.method public static main([Ljava/lang/String;)V
.limit stack 3
.limit locals 1

getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "Hello World."
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V

return

.end method

prisma wave
#

why does stack overflow

#

just get more ram

heady birch
lunar cypress
heady birch
prisma wave
#

why are institutions not teaching our kids how to use jython

#

thanks obama...

heady birch
#

democrats 😫

obtuse gale
#

expenses

heady birch
#

Yeah but jython would be quicker to write

#

so less time taken

prisma wave
#

numerous democrats have been quoted saying they "do not care" about the growth of ocaml on the jvm

obtuse gale
#

We should consider teaching Skript

#

lowkey

prisma wave
#

indoctrinate them when they are young

lunar cypress
#

ok but hear me out

#

average jython fan | average clj-libpython enjoyer

prisma wave
#

ok thats the worst one

#

by far

heady birch
#

why would clojure ever need to bind to python

prisma wave
#

why wouldnt it!!

heady birch
#

when it could have been written in jvm JYTHON anyway?

#

Isnt Clojure JVM as well

#

Win win

#

JavaScript (or Java, for short) is the top programming lang....

lunar cypress
#

because jython is slow

#

slow as fuck

prisma wave
#

a small price to pay

lunar cypress
#

also barely any interop

heady birch
#

it runs on jvm

prisma wave
#

a bigger price to pay

heady birch
#

interop with all jvm language

prisma wave
#

just use reflection

lunar cypress
#

that's not how it works lol

prisma wave
#

name a language that doesnt support good old Class.forname... go on, ill wait...

heady birch
#

qeubec

#

Quarkus

#

what the

prisma wave
#

you just made that up

heady birch
#

Ive forgotten what its called

#

The php jvm

prisma wave
#

hell

heady birch
#

Quercus

prisma wave
#

god is dead

heady birch
#

<?php

$a = new Java("java.util.Date", 123);

echo $a->time;

?>

#

new Java

prisma wave
#

oh dear... it would seem you have forgotten about new Java("Class.forName", "me.BristerMitten.Main)

#

try again

heady birch
#

rust

#

😎

prisma wave
#

JNI

#

checkmate

heady birch
#

😐

prisma wave
#

why dont we make all java methods native

#

would bne faster

heady birch
#

I already add native to all my methods so they are faster 🙃

prisma wave
#

sounds like james WANTS java to be one of the slowest languages

#

it is a pity that java devs must sacrifice memory even something as simple as a variable

old wyvern
#

Casting exists in bytecode right?

#

like for the method tables?

#

Yes!!

prisma wave
#

amazing game

heady birch
#

I want to play minecraft that looks like real life

#

I also want cars in it

lunar cypress
old wyvern
#

Like when you cast to a different type, its supposed to try to use that class's vtable or something right?

#

I remember something along that lines from a course

heady birch
#

what does graalVM do

obtuse gale
#

ur mum

obtuse gale
#

That was always the case, that is the "default implementation" (that is overridden) because md_5 is dum dum and doesn't know abstract classes are a thing

#

It's like that even in base Spigot ever since that was introduced

onyx loom
#

never knew that was a thing since it was introduced, ofc its overriden but just seeing that is pretty funny

obtuse gale
#

Yeah lmao

ocean quartz
#

Omg dynmap uses .txt for config

old wyvern
#

um what

#

apply needs to be captured??

lunar cypress
#

not in the same way as in the language

#

you can invokevirtual anything on anything and it's still legal bytecode

#

what casting does is really just insert a CHECKCAST instruction

old wyvern
#

Just a thought, Does it provide anyway to handle checkcasts?

lunar cypress
#

I mean it makes sense because every Java class just becomes the reference type in the JVM

old wyvern
#

As in respond to that instruction. I'm guessing its not really possible, but that would have been interesting

#

Is there anyway to hook into the jvm natively maybe?

lunar cypress
#

not as far as I know, it's really just "throw class cast exception if the reference doesn't match the type"

old wyvern
#

ah

jovial warren
#

anyone else here agree that KDoc generation is a bit whack?

#

like it turns Java methods into their Kotlin function equivalents

#

also puts abstract in front of interface functions

#

and shows you the verbosities of the internals

#

e.g. open override fun (another converted Java method)

old wyvern
#

I mean why are you using kotlin docs for Java?

jovial warren
#

this isn't Java

#

this is Kotlin code

old wyvern
#

converted Java method

jovial warren
#

just it's taking Java methods from Java interfaces extended by these Kotlin interfaces and turning them into Kotlin functions

old wyvern
#

You wanted it to show Java methods separately in the docs?

obtuse gale
#

@jovial warren native NPCs support when

jovial warren
#

I think it should maybe do what Javadocs do, where it just links to them

jovial warren
obtuse gale
#

k

jovial warren
#

gonna start doing that now

#

any suggestions, open an issue

jovial warren
#

did that really take you 3 attempts

old wyvern
#

Oh god

#

well...

#

god damn arrow

jovial warren
#

welcome to Kotlin DSLs

#

oh btw, what's ioScope?

old wyvern
#

Im just gonna make the vcard outside

obtuse gale
old wyvern
obtuse gale
#

not my fault

jovial warren
#

didn't know there was an IO scope

old wyvern
#
private val ioScope = CoroutineScope(Dispatchers.IO)
jovial warren
#

since Dispatchers.IO implements context

old wyvern
#

This was just what sx recommended when using CoroutineScope

jovial warren
#

ah

#

now I can show you what I mean

#

wait did I copy it half finished

#

-_-

#

lemme try that again

old wyvern
jovial warren
#

#bestdocumentationever amirite

old wyvern
#

deffo

#

Idk what I would have done to know what that did without that comment

jovial warren
#

right, uploading the new docs now

old wyvern
#

aight

jovial warren
#

hopefully it has everything this time

#

oh btw, look at navigation.html lol

#

no idea what's going on there

#

seems like the CSS just doesn't render

#

oh also, turned on browse so you can just go and see all the files in /var/www/docs lol

#

one of the cool things you can do with Caddy

old wyvern
lunar cypress
jovial warren
#
docs.kryptonmc.org {
    import hsts

    tls /etc/letsencrypt/live/docs.kryptonmc.org/fullchain.pem /etc/letsencrypt/live/docs.kryptonmc.org/privkey.pem
    root * /var/www/docs
    file_server browse
}
```my config for Caddy lol
jovial warren
old wyvern
jovial warren
#

I purposely excluded any singleton shit though

steel heart
#

krypton spigot but actually good?

jovial warren
#

pretty much Conclure

#

well, the API is

old wyvern
#

If someone had done a Bukkit 2, the perfect name for a 3rd iteration would just be 3ukkit

jovial warren
#

it's Bukkit but useful

steel heart
#

cant wait

jovial warren
steel heart
#

srsly

jovial warren
#

can't wait for Krypton to actually function properly?

steel heart
#

true

frail glade
jovial warren
#

also, it should be more than just me working on it now

#

Nicole's now part of the core team

steel heart
#

I cant kotlin that well so wont be able to pr and cba to learn

obtuse gale
#

Rockstar thanks GTA Online player who fixed poor load times
Rockstar be like "Oh why thank you!" and say good day lmao

steel heart
#

I mean I know stuff like Unit -> Unit etc

jovial warren
#

oh btw, Fefo, did you notice?

steel heart
#

but not good enough

jovial warren
#

the issue templates

obtuse gale
#

ye

jovial warren
#

what do they look like

#

who's did I totally not at all completely 100% steal and give 0 credit to

obtuse gale
#

The suggestion one is.. well... I mean not much to it lol

jovial warren
#

may or may not have nicked those from LuckPerms

obtuse gale
#

It did look familiar lol

jovial warren
#

lol

#

wonder what implementing KDocs into DocDex would be like lol

#

since they're literally completely different

#

with Javadocs, everything is on a single page, but KDocs splits things up inside of the page into types, functions and properties

#

and the languages have minimal similarities

#

also, why tf is the sidebar not rendering ffs

#

oh btw, what should I make next guys?

onyx loom
#

1.8 pvp /s

jovial warren
#

we (almost, waiting on BM to get his shit together and approve the changes) got particles now, courtesy of Nicole

#

cough @prisma wave cough

#

get on it 🙂

#

oh btw, did I actually mention that logging to files is now a thing?

prisma wave
tranquil crane
#

particles are the only important part of a server implementation

#

without particles there is no joy

obtuse gale
#

Can't agree more

errant geyser
obtuse gale
#

Yeah Bardy, add a Smith & Wesson Model 29, that will bring me happiness once I get to use that happiness machine on myself

errant geyser
#

I'll take that too

#

Though I'd much prefer a Sig Sauer p226

obtuse gale
#

Modern, I like it

unkempt tangle
#

Dafuq

#

It's happening

#

Rockstar admit bullsh*t

obtuse gale
#

Scroll up like 50 messages

half harness
steel heart
#

is it even possible to prevent ddos such that it wont work regardless how big the botnet may be?

obtuse gale
#

Yes, get an even bigger network setup

half harness
#

get the $1000000000000000 antiddos plan 🙂

unkempt tangle
#

lol

craggy osprey
#

Is Oracle virtual box even good?

unkempt tangle
#

okay-ish

steel heart
oblique heath
#

why does cloudflare suck

steel heart
#

Idk

#

I asked them in their support

oblique heath
#

cloudflare's been really nice for me personally

#

though i never dealt with support

steel heart
#

they told me I should go with their "premium plan"

#

:[

#

or like

#

it could help

quiet depot
#

whats wrong with cloudflare?

steel heart
#

nothing wrong but I got hit with something that broke even cloudflare

#

or the server I help

quiet depot
#

doubt

#

your server probably just got hit directly

oblique heath
#

did they hit the mc server?

#

because cloudflare doesn't proxy non webserver ports with their free plan

steel heart
#

hmm perhaps, faction servers are a toxic community so doing scetchy stuff like ddos isn't to rare of a sight

quiet depot
#

if the ddos went to cloudflare itself it wouldn’t of got through

#

it’s just not realistic

steel heart
#

yeah you're probably right piggy

#

I wonder tho how then

quiet depot
#

well, like ivan said, cloudflare doesn’t protect mc servers on free

steel heart
#

that may be it then

quiet depot
#

just sites iirc

regal gale
#

Factions be like

#

It was me who raid them lol

ocean quartz
#

@hot hull You'll be happy to know i'm being pressured to finish triumph chat, so i'll be working on it xD

oblique heath
#

o.o

#

what has life become

ocean quartz
oblique heath
#

this is um.. dev related? maybe

#

i develop using that

tropic mountain
#

Hey, so I have this test server for new plugins, but every time I join with 1.7.10, and after a couple of seconds I get disconnected for io.netty.handler.codec.EncoderException: io.netty.handler.codec.DecoderException: The received a byte array longer than allowed 61696 > 32767. While I'm on 1.8, it works fine and there's no problem.

#

Sorry if this is the wrong channel

#

I have 2 plugins, Worldedit and protocolsupport-1.8

prisma wave
#

Probably because you're using 1.7.10

#

Unholy spawn of satan

steel heart
#

using a 6+ years old software

lunar cypress
#

this discord server whenever it finds a new language

steel heart
#

lol

jovial warren
#

lol

#

so true

prisma wave
#

depends on the language

#

If it's Modern we will try and indoctrinate everybody

#

The "clojurer" clearly discovered pure (real) functional programming

stuck harbor
#

we need a new paradigm

#

uhhh

prisma wave
#

no we don't

#

Functional does it all

stuck harbor
#

but functional needs functions

#

impure

prisma wave
#

what

stuck harbor
#

I'm going procedural bois

#

no functions

#

no loops

#

no data

lunar cypress
#

👏🦍

stuck harbor
#

just logic

prisma wave
#

hmm

jovial warren
#

it literally gives you a warning when you download it saying there’s no support

tropic mountain
#

I got it to work

#

Thanks anyways

steel heart
#

is an empty method call slow?

#

like void x() {} for instance

prisma wave
#

Not really

steel heart
#

ok good then

#

how much slower at the worst?

#

1ms?

lunar cypress
#

god no

#

but also

#

no general answer to that

#

because it completely depends on your machine and what the jvm is doing

#

if you call an empty method often enough most vms will simply get rid of it I think

#

but yes there is overhead to method calls if that was your actual question

prisma wave
#

yeah there's a very small amount of overhead

steel heart
#

yeah, I guess its negligible just curious

lunar cypress
#

it's not something you optimise in Java because most JVM implementations are smart enough to do this for you, but in other language you do optimise stuff like that

steel heart
#

oh okay, ty then 😄

old wyvern
#

"I want YOU to fix it, yes YOU! Do it Mister!!"

prisma wave
#

man looked at WW1 propaganda for inspiration

jovial warren
#

lol

jovial warren
#

I still gotta make a roadmap for Krypton at some point, that’s gonna be a pain

#

anyone here got any tips or methods on how to make good roadmaps?

stuck harbor
#

just buy one from the ordinance survey

#

or use Google maps

#

simples

unkempt tangle
#

Senpai

#

Rockstar is about the fix the json issue.

#

The reverse engineer get 10k

#

dollares

jovial warren
#

No way

#

Oh my god

#

This just makes Rockstar look really stupid

#

That a single person fixed a bug that their entire development team missed for 7 years

half harness
#

lol

compact perchBOT
#

There is no time to wait! Ask your question @half harness!

half harness
#

edit: nvm

#

(deleted message)

jovial warren
#

Lol

vagrant bobcat
#

whats the best way of getting statistics like Statistic.PLAY.ONE.TICK but for different server versions? i want to implement it into 1 jar so that i can easily update it instead of having multiple jars

half harness
vagrant bobcat
#

yes like Statistic.PLAY_ONE_TICK for 1.12 and below i think then Statistic.PLAY_ONE_MINUTE for 1.13 above

half harness
#

well they're whole different things...

#

oh wait

#

wtf

#

d;spigot Statistic%PLAY_ONE_MINUTE

ruby craterBOT
#
public static final Statistic PLAY_ONE_MINUTE```
Description:

Name is misleading, actually records ticks played.

vagrant bobcat
#

its not

half harness
vagrant bobcat
#

yep lol

half harness
#

interesting

#

You can use modules for that

#

like

half harness
# vagrant bobcat yep lol

a compat module (short for compatibility) with an interface that has like getTicksPlayed(Player), then a 1_13 module or smth that has a class that implements the interface (which uses PLAY_ONE_MINUTE), then like a 1_12 module

#

then you can get the version and do like SomeInterface interface = new 1_13Impl()

#

sorry if u dont know what i mean, i suck at explaining things 😫

vagrant bobcat
#

like how he did it?

half harness
#

uhh are you using eclipse or intellij?

vagrant bobcat
#

eclipse

half harness
#

o

#

then uh you could probably do what he did

#

using the packages and classes

vagrant bobcat
#

alright ill give it ago

half harness
# vagrant bobcat eclipse

just do exactly what he said, but change the class stuff and you only need to do like 1_13 and 1_12

#

since 1.13 - 1.16 is the same

#

(also this is assuming you don't use a build tool)

vagrant bobcat
#

ye ive already added 1.8 and 1.13 jars to buildpath

steel heart
#

intellij fucks up yet again

half harness
steel heart
#

oh my fg

#

it changed keyboard locale

half harness
#

what-

steel heart
#

nothing

forest pecan
#

oof

#

im back to blue

#

my nitro ran out sad_fingerguns

old wyvern
#

blue gang

forest pecan
#

i forgot to ask for a spin

#

🥲

half harness
#

🥲

hot hull
stuck harbor
#

why is there a space

#

i must kno

#

why is it i + =1

#

its fucking i += 1

ocean quartz
#

That spacing is making me want to die

stuck harbor
#

man

#

my old gcse cs teacher

#

assigned variables like

urmum=7
urdad=True
#

like ffs

#

use the spacebar

#

u nerd

hot hull
#

Fucking monster

stuck harbor
#

also, notice python

#

cause the Welsh Joint Education Committee thought we needed python above all else

#

the nerds

vagrant bobcat
half harness
#

in the interface, you can have a getTicks method or something like that

#

then in each of the classes, you can implement that method

lunar cypress
half harness
#

and use the statistc to get it

half harness
#

since spigot just poofed it out

lunar cypress
#

Use Statistic.valueOf

half harness
#

o

#

oop

lunar cypress
#

Extract the current version from e.g. the package name of craftbukkit

half harness
lunar cypress
#

If it's legacy, use one string, if it's new, use the other string

vagrant bobcat
#

so i dont need those extra classes i made?

half harness
#

nope

lunar cypress
#

No, you could follow a multi-module setup but you definitely wouldn't need one for each version

#

And since it's just for one enum constant it's kinda pointless

vagrant bobcat
#

ye all i need it for is for the ticks / minutes

#

i have no idea why they changed it ;/

lunar cypress
#

1.13.2 changed a lot

#

spigot actually has automatic conversion for Material but not for Statistic I think

#

here's an example of how you might check for legacy

forest pecan
half harness
#

?

half harness
#

.................

forest pecan
#

you didnt delete

#

or make private

half harness
#

well u guys told me to unprivate

forest pecan
#

i thought yu left it private

#

lol

#

nvm lmao

hot hull
onyx loom
#

"since high school"
left high school 2 months ago

hot hull
#

Kek

stuck harbor
#

ive been programming since the womb

vagrant bobcat
#

this is confusing me lol

static zealot
#

still in highschool*

forest pecan
#

when cocatenating strings

#

is String#join fine?

#
  public static boolean checkMapBoundaries(@NotNull final CommandSender sender, final String str) {
    final String message;
    final long id = checkLongValidity(str);
    if (id == Long.MIN_VALUE) {
      message = "is not a valid argument!";
    } else if (id < 0L) {
      message = "is too low!";
    } else if (id > 4294967296L) {
      message = "is too high!";
    } else {
      return true;
    }
    sender.sendMessage(
        String.join(
            " ",
            ChatColor.RED + "",
            "Argument",
            "'" + str + "'",
            message,
            "(Must be Integer between 0 - 4,294,967,296)"));
    return false;
  }

  public static long checkLongValidity(final String l) {
    try {
      return Long.parseLong(l);
    } catch (final NumberFormatException e) {
      return Long.MIN_VALUE;
    }
  }

(part of utilities class)

hot hull
#

I'm triggered by those variable names

half harness
#

lol

#

whats wrong with it

forest pecan
#

well the l

vagrant bobcat
# lunar cypress And since it's just for one enum constant it's kinda pointless
    private int TicksPlayed(Player p) {
        stat = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
        if(stat.equals("v1_8_R3"))
            return p.getStatistic(Statistic.valueOf("PLAY_ONE_TICK"));
        else if(stat.equals("v1_13_R1"))
          return  p.getStatistic(Statistic.valueOf("PLAY_ONE_MINUTE"));
        return p.getStatistic(Statistic.valueOf("PLAY_ONE_TICK"));       
    }``` like this?
half harness
#

o

half harness
forest pecan
#

i just named it that cause i wanted to see if i could parse a long

half harness
lunar cypress
#

you only check 2 specific versions there

#

see the example I linked

half harness
#

#split("_")[1]

vagrant bobcat
#

i had a look but looked confusing haha

lunar cypress
#

what about it looked confusing?

forest pecan
#

is there a way to do

        for (final MapImage image : images) {
            if (image.getMap() == id) {
                images.remove(image);
                break;
            }
        }

in streams

#

im trying to fix a ton of my loop code

#

obviously, streams cant do everything a loop can do

half harness
#

yes they can

forest pecan
#

but its a pretty common one

#

well, nested streams

#

smh

obtuse gale
#

What is images and what does remove do

forest pecan
#

images is a set

#

so i can call stream()

#

directly on it

vagrant bobcat
obtuse gale
#

You'll get a ConcurrentModificationException

obtuse gale
#

^

#

Wh..

half harness
#

lol

obtuse gale
#

Dkim what

half harness
#

😂

#

to my defense

#

i barely use streams

forest pecan
forest pecan
#

lmao

steel heart
forest pecan
#

lol

half harness
#

flavormap?

forest pecan
#

is there a way for removeIf to break after the first ocurrance?

obtuse gale
#

Don't think so

forest pecan
#

rip

#

streams need to be able to support that

obtuse gale
#

If you want to break use Iterator

forest pecan
#

yea ik

lunar cypress
#

or use a stream

forest pecan
#

that exists?

obtuse gale
forest pecan
#

actually imma use iterator

#

prolly better

#

in this case

obtuse gale
#

ifPresent(images::remove) :^)

half harness
#

hi

ocean quartz
#

ih

half harness
#

hows ur day

ocean quartz
#

It's been alright, woke up too early

half harness
#

ok

steel heart
#

who cares about readability anyways

#

not like trump will read your code anyways

hot hull
ocean quartz
#

From 7am to 1pm

hot hull
#

As in you woke up at 7am?

ocean quartz
forest pecan
#

@obtuse gale

obtuse gale
#

@forest pecan

forest pecan
#

do you know how to get a specific argument

#

in brigadier

#

lol

#

like for ex

#
    private int resetMap(@NotNull final CommandContext<CommandSender> context) {
        final CommandSender sender = context.getSource();
        final long id = ChatUtilities.checkMapBoundaries(sender, ?????);
        if (id == Long.MIN_VALUE) {
            return 1;
        }
        final Iterator<MapImage> itr = images.iterator();
        while (itr.hasNext()) {
            if (itr.next().getMap() == id) {
                itr.remove();
                break;
            }
        }
        MapImage.resetMap(getLibrary(), (int) id);
        sender.sendMessage(
                ChatUtilities.formatMessage(
                        ChatColor.GOLD + "Successfully purged the map with ID " + id));
        return 1;
    }
#

the question mark

#

it should be the last argument

#

of the command

#

for example, /map reset map [ID]

iron apex
#

what is this server for?

obtuse gale
#

It's based on the argument you defined when building the tree

forest pecan
#

and i wanna fetch [ID]

#

o

steel heart
#

brigadier lol

forest pecan
#

yes

obtuse gale
#

context.getArgument(name, type)

steel heart
forest pecan
#

i just dont know type

obtuse gale
#

Or something like that

forest pecan
#

ik name

#

but type is a class

steel heart
#

yeah

hot hull
steel heart
#

the class will infer the type

iron apex
obtuse gale
#

Well did you define it as a StringArgumentType? An IntegerArgumentType? Etc

forest pecan
#

Ah

obtuse gale
#

It's what it'll return basically

iron apex
#

💩

steel heart
#

instead of

Type t = (Type) getArgument("haha")

we have

Type t = getArgument("haha",Type.class)

#

never used brigadier

#

but ye

#

cloud is the way to go

forest pecan
#

so I get a LongTypeArgument

#

or i meant

#

LongArgumentType

#

how would I fetch that value?

obtuse gale
#

You can either LongArgumentType.getArgument(context, "name") or context.getArgument("name", long.class)

forest pecan
#

oo

#

I see

obtuse gale
#

The first one is more of a convenience method

forest pecan
#

Yeha I see

#

brigadier is a bit complex at first

#

but holy shit

#

its so damn clean

obtuse gale
#

i really like it

stuck harbor
#

doesn't support python 3

#

basically dead

forest pecan
#

choco isnt a fan of shading brigad in the plugin tho

#

lol

prisma wave
obtuse gale
jovial warren
#

Kotlin collection extensions good streams bad

obtuse gale
#

It is, after all, a command library

jovial warren
#

declarative good imperative meh

prisma wave
#

public static <T> Stream<T> >>=(T -> Stream<T> fun)

steel heart
#

choco is a spigot karen

#

of course he uses default command system before brig

jovial warren
prisma wave
#

who reacted with a nauseated face

#

Show yourself

hot hull
half harness
#

frosty

steel heart
hot hull
#

Cloud?

steel heart
#

yes

hot hull
#

Link

prisma wave
steel heart
jovial warren
#

I think he’s trying to say Admiral trash

#

also, Cloud good for Java bad for Kotlin

hot hull
#

Haven't seen admiral yet so idk

jovial warren
#

Krypton’s commands are nice

steel heart
#

its basically acf but he advocates both annotation based and object orientation style

#

and then supports so many platforms

#

I drowned in happiness when it released

prisma wave
#

Brigadier but with monads

steel heart
#

lol

prisma wave
#

Now that would be good

steel heart
#

how predictable you would be the one to say something like that

prisma wave
#

of course

jovial warren
#

Admiral is just a Brigadier DSL

prisma wave
#

You know me too well

#

I tried to make a lexer in F# earlier

#

Surprisingly tricky

#

Couldn't figure out how to consume multiple characters

steel heart
#

when is the LexerParadigmFunctionalObject compiler for H#a#s#k#e#l#l coming?

prisma wave
#

🥴

#

Might ask for assistance when I get home

#

I got to a point where it Stackoverflowed which was nice

steel heart
#

lol

forest pecan
#
        builder
                .requires(super::testPermission)
                .then(literal("reset"))
                        .then(literal("map"))
                            .then(argument("id", StringArgumentType.word()))
                                .executes(this::resetMap)
                        .then(literal("all")
                            .executes(this::resetAllMaps))
                .then(literal("set"))
                        .then(literal("map"))
                            .then(argument("id", LongArgumentType.longArg()))
                                .then(argument("mrl", StringArgumentType.word()))
                                    .executes(this::setImage)
                        .then(literal("dimensions"))
                                .then(argument("dim", StringArgumentType.string()))
                                    .executes(this::setDimensions)
                .then(literal("rickroll"))
                    .executes(this::setRickRoll);
#

then

#

when i format it using google code formating

#

the fucking tree structure

#

turns into a hierarchy

#

sucks

half harness
#

lol

vagrant bobcat
#

@lunar cypress can i use that in my plugin ill give you credit on spigot

lunar cypress
#

my code is your code comrade

forest pecan
#

our helpchat

stuck harbor
#

our discord

distant sun
#

use what?

vagrant bobcat
#

whats your spigot name ill credit you

hot hull
stuck harbor
# hot hull our code*

Karl Heinrich Marx (German: [maʁks]; 5 May 1818 – 14 March 1883) was a German philosopher, economist, historian, sociologist, political theorist, journalist and socialist revolutionary. Born in Trier, Germany, Marx studied law and philosophy at university. He married Jenny von Westphalen in 1843. Due to his political publications, Marx became s...

lunar cypress
#

I don't care for that just use the snippet as you please

lunar cypress
#

it's just a couple lines of code

hot hull
#

We all serve the union here

stuck harbor