#dev-general

1 messages · Page 250 of 1

oak coyote
#

But isn’t #equals still better for OOP

ocean quartz
#
something == "something" is something.equals("something") in java
something === "something" is something == "something" in java
ocean quartz
#

Use kt instead of java xD

old wyvern
#

nextChar ?

#

its the exact same as you would in Java

onyx loom
#

i mean u can

#

but if nextChar exists then i suggest that as its cleaner

#

yes

old wyvern
#

same as?

ocean quartz
#

It doesn't have nextChar

onyx loom
#

o

old wyvern
#

are you sure?

onyx loom
#

sad face

ocean quartz
#

Yeah just tested

onyx loom
#

pog

#

another GREAT feature of KOTLIN

old wyvern
#

weird

ocean quartz
#

One of its best features

ripe zinc
#

when creating a kotlin project (in intellij) I'm guessing I pick native?

ocean quartz
#

Jvm most of the times

ripe zinc
#

ah aight

ocean quartz
#

Don't know how stable native is

prisma wave
#

It's stable

ocean quartz
#

But jvm is the one that can interop with java

ripe zinc
#

how important is the java version?

prisma wave
#

Pretty much irrelevant

#

Kotlin was designed to work on java 6

#

Native is harder because it relies on C interop and you don't have any JVM libraries available, also it's made for embedded stuff

onyx loom
#

did someone say that java 15 support was added to kotlin yet?

prisma wave
#

I think it is yeah

onyx loom
#

pog

prisma wave
#

Or coming soon at least

ocean quartz
#

It was added i think

#

On 1.4.30-M1 iirc

prisma wave
#

nice

#

Now do it in elara

#

sure

hot hull
#

Ew

prisma wave
#

use a when expression

#
val result = when(operator) {
  blah
}
hot hull
#

I dissapear again, pce

prisma wave
#

then you don't need to make an uninitialised variable

ocean quartz
#

Ij should have suggested that

prisma wave
#

yea

#

i think you could be even fancier and return println("blah")

#

but yeah

ocean quartz
#

Also println("You got it: --> " + result.roundToInt()) -> println("You got it: --> ${result.roundToInt()}")

prisma wave
#

^

#

it's gonna be pretty much the same

#

JavaPlugin()

onyx loom
#

javaplugin()

prisma wave
#

but yeah

#

kotlin was designed to work seamlessly with java so

#

it's ez

onyx loom
#

: blah() = extends
: blah = implements

#

matt framework 🙂

#

o

prisma wave
#

i hear tornadofx is good

onyx loom
#

yeah

prisma wave
#

possibly a bit advanced tho

#

if you use swing or JFX it'll be pretty much the same as java

onyx loom
#

extension functions and lambdas everywhere in tornado

#

its very cool

ocean quartz
#

Great plugin 10/10

onyx loom
#

whats first and second

prisma wave
#

0.0

ocean quartz
#

Those are nullable iirc

prisma wave
#

possibly

onyx loom
#

how did that compile? 🤔

#

yeah

#

reader

ocean quartz
#

val first = reader.nextDouble() ?: 0.0

onyx loom
#

technically u can do 0 * 0

#

🙂

ripe zinc
#

how would I concat strings?

prisma wave
#

+?

onyx loom
#

$ :clojuremoon:

old wyvern
#

yes

#

You also have tornadofx

prisma wave
#

you can use any java library in kotlin

old wyvern
#

Which is a javafx wrapper for kotlin

#

suppourts typesafe css
has a dsl for view design

#

BUT

prisma wave
#

clojure plugin

ocean quartz
old wyvern
#

Most Importantly!

ripe zinc
#

yeah

#

I just figured it out

#

thats different

old wyvern
#

it breaks Ij when used with Gradle

#

🙂

onyx loom
#

works fine for me yugi 🙂

ocean quartz
#

Yes

onyx loom
#

maven bad, even without kotlin

old wyvern
heady birch
#

You can just use Swing, built into the JRE.

onyx loom
#

tbf ive never actually compiled my tfx app, just ran it using the plugin

ocean quartz
#

Niall get out

old wyvern
#

It will eventually end up not resolving types and gives you random errors

ripe zinc
#

man everything is just there already

old wyvern
#

It still compiles fine tho

#

Just an IDE issue

ripe zinc
#

calling methods directly on a string feels right

old wyvern
#

specific with tfx + gradle

ocean quartz
#

Copy from maven it'll convert

ocean quartz
old wyvern
#

What do you want to do?

onyx loom
#

kotlin dsl 😬

ocean quartz
#

Yeah, shit you have kotlin dsl there

prisma wave
#

kotlin dsl 😬

old wyvern
#

use implementation and specify the groupid, artifact and version

#

in dependencies

#

also yea, you should probably switch to groovy

onyx loom
#

groovy good kotlin dsl bad

old wyvern
#

From what I read here, it has some issues?

#

Never had to use it personally

onyx loom
#

it just looks disgusting imo yugi

old wyvern
#

Looks pretty much the same to me

onyx loom
#

especially in comparison to groovy

old wyvern
#

just diff highlighting

ocean quartz
#
<dependency>
  <groupId>group-id</groupId>
  <artifactId>artifact-id</artifactId>
  <version>1.0</version>
  <scope>compile</scope>
</dependency>

==

implementation "group-id:artifact-id:1.0"
#

Just reload gradle

old wyvern
#

paper right?

ocean quartz
old wyvern
#

The example is still similar

onyx loom
#

whats the error

old wyvern
#

What is the error?
\

ocean quartz
#

What does it say when you hover it?

onyx loom
#

ah yes, the infamous kotlinOptions bug

ocean quartz
#

Likely the solution is to invalidate cache and restart lmao

onyx loom
#

i swear so many people have had this issue and i have no reason why

ocean quartz
#

Yeah invalidate and restart

onyx loom
#

🙂

#

hate it for being too good

old wyvern
#

better than the rest

ocean quartz
#

It's faster, simpler, can do more things than maven

old wyvern
#

still feels like a mess sometimes

ocean quartz
#

^

#

Is it done indexing?

onyx loom
#

@distant sun did u find a solution to kotlinOptions issue?

#

@obtuse gale is ur kotlin plugin in IDE up to date? idk

#

not sdk

#

plugin in IJ

#

so mine is always underlined like this, but it still lets me build anyways

old wyvern
#

Can I see your whole build.gradle rn?

#

yea

ocean quartz
compact perchBOT
#
HelpChat Paste

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

ocean quartz
#

Efe, press ctrl + alt + l please

onyx loom
ocean quartz
#

l not 1

#

Should have fixed your broken indentation

#

What, did you do it on the gradle file?

ocean quartz
onyx loom
#

ah right yeah thats what mine is too

#

very weird that it allows us to build

ocean quartz
#

Just ignore it, it's fine

old wyvern
#

lol

#

o wait nvm

ocean quartz
#

Ye

old wyvern
#

hmm

onyx loom
#

public class 👀

#

u can remove public

#

its defaulted to public final class

ocean quartz
#

Better than in java, because to have the same thing you'd need (@NotNull final CommandSender sender)

sharp venture
#

why use kotlin when you could not?

ocean quartz
#

Yes
is is the same as instanceof

prisma wave
#

except better

#

because smart casting

ocean quartz
prisma wave
#

and also !is

#

you don't need to

#

it gets smart casted

#

try it

#
if (sender is Player) {
  sender.setHealth(0)
}```
#

it gets automatically casted

#

but if you want an actual variable

#
val player = sender as Player
#

might need to pass a double

#

it was just an example anyway

#

also

#

health = 20

#

or setHealth(20)

ocean quartz
#

Yup

sharp venture
prisma wave
#

it doesn't though

#

as efe is proving

#

that sounds like a you problem

onyx loom
#

pog

#

no setters

#

altho, ChatColor.AQUA 😬

prisma wave
#

yes

#

for item cooldowns

#

like ender pearls

onyx loom
#

play around with an externsion function that utilises translateAlternateColorCodes

prisma wave
#

yes

#

it's been there since 1.9 afaik

onyx loom
#

sendMessage(String).color() 🙂

prisma wave
#

because you have an error

#

?di

compact perchBOT
prisma wave
#

idk

#

whats the error

#

yea

#

then how do you know there's an error

#

same thing

#

without the new

#

does it compile?

#

what

#

yeah kotlin won't let you do that

#

it doesn't do implicit toString() calls for anything that isn't a number

#

because of operator overloading

#

either add a toString() to AQUA, or use interpolation

prisma wave
#

Awesome

#

Just making sure I didn't miss anything

#

is it too quiet again?

#

i cant tell lol

#

you'll need shadowJar if you're building a plugin

#

because you need to install the kotlin standard library

#

gradle plugin

#

it's very easy dw

#

well not just me

#

Yea it's pretty much the same as java

#

Although you can use extension functions too

#

Which is kinda cool

#
@EventHandler
public fun PlayerJoinEvent.onJoin() {

}
#

possibly cooler

#

yeah the autocomplete is slightly worse than java's

#

exactly

ocean quartz
sharp venture
#

I didn't say it shouldn't be used

ocean quartz
#

why use kotlin when you could not?
Implies you shouldn't lol

sharp venture
ocean quartz
#

?mf

compact perchBOT
ocean quartz
#

@obtuse gale ^

#

You can't use me

#

It's on the link how to use it xD

#

The latest release is there 2.0.2
But i have a more recent one
You'll need to import it differently though

maven { url = "https://repo.mattstudios.me/artifactory/public/" }
implementation "me.mattstudios:triumph-gui:3.0.4-SNAPSHOT"
ripe zinc
#

yo how do I update gradle in intellij

#

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

#

or downgrade?

ocean quartz
#

I know you can manually edit it in the wrapper, i don't remember the command to update it though

onyx loom
#

extension function PLEASE

#

move the shadowplugin into the plugins block

#

apply plugin is outdated

#

and i think u need a version number for the plugin

half harness
#

its 6.1.0

onyx loom
#

and u need implementation for kotlin stdlib dependency

half harness
#
plugins {
    id 'com.github.johnrengelman.shadow' version '6.1.0'
    id 'java'
}
#

👀

#

matt?

compact perchBOT
half harness
#

ooo

onyx loom
#

use bms mf-gui for kotlin too fingerguns (p.s ive never used it myself)

#

what for

#

we are the tutorial 🙂

onyx loom
#

unused imports? idk

#

what looks weird

half harness
#

prob unused

#

gray = unused

#

o

onyx loom
#

so u mean the yellow part?

half harness
#

the yellow is class

onyx loom
#

i guess it just easily represents the class

prisma wave
#

😐

#

val

onyx loom
#

kotlin good?

#

🙂

#

good video @prisma wave

ripe zinc
#

is my kotlin outdated?

#

👀

onyx loom
ripe zinc
#

is that always necessary?

onyx loom
#

well preferably, dont use ChatColor enums 🙂

prisma wave
ripe zinc
#

oh i must of missed that my bad

prisma wave
#

yes, it's always necessary

ripe zinc
#

I always assumed it was the better option

prisma wave
#

translateAlternateColorCodes

ripe zinc
#

yea

onyx loom
#

create an extension function for translateAlternateColorCodes

ripe zinc
#

i guess

prisma wave
#

or just make some constants of their things

#
val BLUE = ChatColor.BLUE.toString()
``` or something
#

if you really want that

onyx loom
#

fun String.color() = ChatColor.translateAlternateColorCodes(this)

ripe zinc
#

yeah aight makes sense

onyx loom
#

what does display take?

#

uh :what:

prisma wave
#

what

ocean quartz
#

What display?

#

Of?

onyx loom
#

isnt that in the item stack?

ocean quartz
#

ItemBuilder.from(Material.SOMETHING).setName("NAME").asGuiItem()

#

Yes gui items have no concept of name

#

Yes it is

prisma wave
#

?tryandsee

compact perchBOT
prisma wave
#

add shadowjar plugin

#

gradle shadowJar

#

somewhen

#

:)

onyx loom
#

implementation kotlin stdlib

prisma wave
#

dont need that in 1.4

onyx loom
#

wait wha

#

kotlin plugin does that auto?

prisma wave
#

1.4 plugin adds the dependency automatically

#

yea

onyx loom
#

poggers

ocean quartz
#

Could put sender.playSound(sender.location, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1f, 1f) into the open action

prisma wave
#

:)

onyx loom
#

except for the fact that it doesnt affect me, because pdm 🙂

prisma wave
#
        val item = createItem(Material.STONE_BRICKS) {
            name = "Hello"
            lore = listOf("The", "Lore", "Here")
            enchantments {
                ARROW_DAMAGE level 3
            }
            nbt {
                "key" to "value"
            }
        }
#

🙄

onyx loom
#

continue in kotlin

#

ctrl shift alt k

prisma wave
#

how boring

onyx loom
#

sorted

prisma wave
#

it's easier in kotlin

gentle birch
prisma wave
#

ChunkNibbleArrays should be 2048 bytes not: 0

distant sun
prisma wave
#

wdym?

#

the implementation?

distant sun
#

ye

prisma wave
#

yeah ages ago

#

lemme put it on my repo actually

distant sun
#

Oh, nice

prisma wave
#

yeah it's fairly simple

onyx loom
#

ikr

#

disgusting

prisma wave
#

Nothing means the function will never complete

#
while(true){}
``` returns Nothing, throwing an exception returns Nothing
onyx loom
#

o

prisma wave
#

and because something like ItemBuilder.amount is an Int, the get() has to return an Int

Nothing is a subclass of every type so we can use Nothing instead

steel heart
#

So it is basically capable of blocking a thread

prisma wave
#

uh

#

not exactly

#

while(true) would block obviously

steel heart
#

Ye

prisma wave
#

but Nothing is just a type

lunar cypress
#

Nothing is basically Void without the nullability right?

prisma wave
#

that's more like Unit

#

but similar

steel heart
#

efe it’s nice if u wanna compact code Ig

prisma wave
#

the Nothing type is to mark that getting x will never succeed

onyx loom
#

interesting...

lunar cypress
#

Does a while loop naturally evaluate to Nothing? Or is Nothing language space magic to some degree

prisma wave
#

I think it's just a compiler trick

#

if the compiler can infer that the function will never return a value, either because it loops forever or breaks because of an exception, it lets you use Nothing

#

while loops aren't expressions, so I don't think it does anything special there

lunar cypress
#

Halting problem modCheck

#

How sophisticated is that

prisma wave
#

it's clever

onyx loom
#

u only scratching the surface of kotlin 🙂

prisma wave
#

also, things like val x = listOf(null) evaluate as List<Nothing?>

lunar cypress
#

Nothing is a class that can't be instantiated, correct?

steel heart
#

nope

#

collab

lunar cypress
#

Then Void is more like Nothing than Unit

steel heart
#

and the others barely know kotlin

ripe zinc
#

how would you set up the gradle build jar to go into another directory?

steel heart
#

Project#libsDirName

#

or smtng

onyx loom
ocean quartz
#

Was wondering why i kept getting a deprecated value in my code, vault adds in bukkit 1.13.1 wtf

steel heart
onyx loom
#

it is, u can say the same for any language

#

not for why kotlin is worse than java

ocean quartz
#

It's just a minor inconvenience at most

onyx loom
#

why the frick is vault shading in bukkit thonking

steel heart
#

relocate 'org.bukkit', package

ocean quartz
onyx loom
#

disgusting 😔

steel heart
#

and everyone knows it more or less well

onyx loom
#

adapt, innovate, overcome

steel heart
#

hard when ya got a deadline

ocean quartz
#

That is a very weak argument conclure, "why use something better if you can keep using the old one?"

steel heart
#

thats not my argument but ok

onyx loom
#

lets keep using mc 1.8 🌝

#

then what is ur argument?

steel heart
#

read above?

steel heart
#

no lol

ripe zinc
steel heart
#

the argument isnt because I can keep using the old one

ripe zinc
#

any ideas as to why?

onyx loom
#

but because its fine?

ocean quartz
steel heart
#

its because everyone in the team knows java and since we got a deadline using kotlin and enforcing every developer in the team to learn kotlin isn't a plausible option in this case

#

its not the same nor equivalent to keep the old one because we can use the old one

steel heart
#

no its not minor

ocean quartz
#

This is dumb, Conclure is arguing at why he and his team won't use kotlin, while we're talking about something completely different lol

onyx loom
#

still doesnt paint a picture as to why kotlin is worse

steel heart
#

never said kotlin is worse

onyx loom
#

yeah just in general, why is kotlin worse than java, i just want a valid point lol

ocean quartz
#

kotlin>java // We're talking about this
arent u using kotlin // Conclure is talking about this

#

Lmao

steel heart
#

kotlin is better than java in terms of developer convenience although it comes with its "grokkability" ig

prisma wave
#

why is assembly better than java? collab, not everyone knows java

onyx loom
#

:clojuremoon:

mystic cradle
#

Oh look it's conclure

steel heart
#

yes

#

its redempt as well 😮

mystic cradle
#

And it's another server that doesn't let me use external emotes 😒

obtuse gale
steel heart
ripe zinc
#

once ive created it

ocean quartz
ripe zinc
#

ah i did just do that

#

perfect

#

thanks

ocean quartz
#

Something like build copyJarToBin or shadowJar copyJarToBin

mystic cradle
#

This server doesn't even allow image posts

#

Unless I just need some role to do it

onyx loom
#

yes

ocean quartz
#

?imgur

compact perchBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.

onyx loom
#

to stop spam

steel heart
#

tier 2 or smtng

mystic cradle
#

Very lame

ripe zinc
steel heart
#

yes

ocean quartz
#

Yeah, just create a custom configuration for it

ripe zinc
#

oh wtf completely forgot about that

#

thanks

steel heart
#

either
build.finalizedBy myTask
or
myTask.doLast build

#

or smtng like that

obtuse gale
#

In here you just need to be tier 2 instead

onyx loom
prisma wave
#

i did yea

#

me.bristermitten:mf-gui-kotlin:1.0-SNAPSHOT

onyx loom
#

awesome

#

ty

prisma wave
#

np

onyx loom
#

🙂

#

arraylist 😬

#

liskov

#

but val list = arrayListOf() prob

ocean quartz
#

No

#

mutableListOf is the same as a normal list in Java
While listOf is immutable

onyx loom
#

i cant remember if specifying the type is necessary?

ocean quartz
#

It is unless you're initializing values

onyx loom
#

ah

#

yeah makes sense

lunar cypress
onyx loom
#

wha-

lunar cypress
#

just like in java?

#

block the thread with something

prisma wave
#

while loop?

#

or recursion

lunar cypress
#

Kotlin is no that much different from java

#

you know you're still on a java thread

#

with the exact same semantics

prisma wave
#

but yeah as the guys mentioned earlier, you rarely use actual types in kotlin - it's much more idiomatic to use setOf(), mutableListOf, mapOf, etc

lunar cypress
#

If the main thread terminates the program is over

#

well... a loop

#

any loop, really

#

just make it infinite

onyx loom
#

for i in Range

#

?

#

so wrap ur code in the for loop

#

that way itll repeat until the for loop has finished

#

is readLine not a String?

#

a nullable String (String?)

#

id recommend adding an elvis operator such as val input readLine() ?: (doing something here if readLine is null)

#

that way u dont have unnecessary toString()s

lunar cypress
#

You could remove the toString()s even if you didn't do that

onyx loom
#

yeah, with the addition of ?

#

spotify

ocean quartz
#

Why 10000? You could while (true) it

onyx loom
#

btw coins will be reset every time the loop iterates

#

idk if thats what u want, prob not

prisma wave
#

unlikely

#

i have no idea what's going on anyway

#

you're just switching from 0 to 5 and then printing the balance

onyx loom
#

🙃

prisma wave
#

java 11

#

is more strict about reflection

#

intellij uses it to run the scratches ig

#

it's just a warning though, you can ignore it

onyx loom
#

🙄

lunar cypress
#

I wonder how much will break in that future release

prisma wave
#

you'll have to wait and see 🙂

#

surprised JB haven't found a way around it yet tbh

lunar cypress
#

Literally nobody seems to care

#

I feel like every other library emits that warning

prisma wave
#

EVEN pdm does it!

#

🙄

#

actually

#

i need to check that PR james made

frigid badge
lunar cypress
#

Not possible tragically

prisma wave
#

strictfp

jovial warren
#

it seems to build just fine in IntelliJ, but Jenkins can't seem to do it

ocean quartz
#

package net.coreprotect.database.lookup does not exist I'm going to assume that the path to core protect is on your maven local, so it's reachable on your pc but not by jenkins

jovial warren
#

it's not on maven local, it's on a public repo that's in the build.gradle

ocean quartz
#

Not sure then

obtuse gale
#

Also, does that repo hold spigot jars?

prisma wave
#

illegal

obtuse gale
#

It does 😬

ocean quartz
#

Yikes

viscid charm
#

Yo u guys know whyt this is giving me salmon someitmes?

                Item caught = (Item)e.getCaught();
                caught.setItemStack(godlyfish());```
#

like it gives me that item stack only if it's a normal fish

steel heart
#

CCE 😮

obtuse gale
#

If player has fished successfully, the result may be cast to Item.

Returns:
Entity caught by the player, Entity if fishing, and null if bobber has gotten stuck in the ground or nothing has been caught

steel heart
#

ClassCastException :p

#

oh

#

then maybe not

obtuse gale
#

why doesn't it return an Item lol it already says you can cast to an Item

ocean quartz
#

Bukkit fingerguns

#

I mean it makes sense to not be itemstack, it's an entity

#

Yes

obtuse gale
#

PlayerFishEvent

#

d;spigot playerfishevent#getcaught

ruby craterBOT
#
org.bukkit.event.player.PlayerFishEvent#getCaught
@Nullable
public Entity getCaught()```
Description:

Gets the entity caught by the player. If player has fished successfully, the result may be cast to Item.

Returns:

Entity caught by the player, Entity if fishing, and null if bobber has gotten stuck in the ground or nothing has been caught

steel heart
#

d;spigot Item

ruby craterBOT
#
org.bukkit.entity.Item
public interface Item
extends Entity```
Item has 8 methods, 1 extensions, and  7 super interfaces.
Description:

Represents a dropped item.

steel heart
#

d;methods spigot Item

ruby craterBOT
#
org.bukkit.entity.Item
Methods:
org.bukkit.entity.Item#getOwner
org.bukkit.entity.Item#setItemStack
org.bukkit.entity.Item#setOwner
org.bukkit.entity.Item#setPickupDelay
org.bukkit.entity.Item#setThrower
org.bukkit.entity.Item#getPickupDelay
org.bukkit.entity.Item#getThrower
org.bukkit.entity.Item#getItemStack```
distant sun
#

d;spigot playerevent

ruby craterBOT
#
org.bukkit.event.player.PlayerEvent
public abstract class PlayerEvent
extends Event```
PlayerEvent has 1 fields, 2 methods, 1 extensions, and  48 sub classes.
Description:

Represents a player related event

#
org.bukkit.event.Event
public abstract class Event
extends Object```
Event has 4 methods, 1 extensions, and  15 sub classes.
Description:

Represents an event. All events require a static method named getHandlerList() which returns the same HandlerList as getHandlers().

distant sun
#

d;spigot handlerlist

ruby craterBOT
#
org.bukkit.event.HandlerList
public class HandlerList
extends Object```
HandlerList has 9 methods, and  1 extensions.
Description:

A list of event handlers, stored per-event. Based on lahwran's fevents.

distant sun
#

What is an extension?

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: java.security.cert.Extension java.security.cert.X509Extension java.beans.Expression javax.net.ssl.ExtendedSSLSession java.awt.event.TextEvent

#

You have disallowed characters in your query. Allowed characters: a-zA-Z0-9.$%_#\-

distant sun
#

Give me the link for handlerlist @obtuse gale im on mobile and it doesnt work for some reason

steel heart
#

extension is something that extends it probably

distant sun
#

Ye

#

All classes have one extension though

steel heart
#

might be Object

distant sun
#

ye same thought

#

d;spigot playerjoinevent

ruby craterBOT
#
org.bukkit.event.player.PlayerJoinEvent
public class PlayerJoinEvent
extends PlayerEvent```
PlayerJoinEvent has 5 methods, and  1 extensions.
Description:

Called when a player joins a server

steel heart
#

d;spigot apply

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: org.bukkit.entity.Player org.bukkit.map.MapPalette org.bukkit.material.Sapling org.bukkit.CoalType org.bukkit.block.data.type.Wall

steel heart
#

d;spigot apple

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: org.bukkit.map.MapPalette org.bukkit.block.data.type.SeaPickle org.bukkit.block.data.type.Hopper org.bukkit.entity.Player org.bukkit.map.MapView

obtuse gale
#

d;object

ruby craterBOT
steel heart
#

d;spigot asyncplayerpreloginevent

ruby craterBOT
#
org.bukkit.event.player.AsyncPlayerPreLoginEvent
public class AsyncPlayerPreLoginEvent
extends Event```
AsyncPlayerPreLoginEvent has 14 methods, and  1 extensions.
Description:

Stores details for players attempting to log in. This event is asynchronous, and not run using main thread.

obtuse gale
#

corba smh

distant sun
#

Tf is that fefo

steel heart
#

corba

obtuse gale
#

idk lmao

distant sun
#

It probably refers to "extends Object"

steel heart
#

his favorite package

obtuse gale
#

A CORBA object reference is a handle for a particular CORBA object implemented by a server. A CORBA object reference identifies the same CORBA object each time the reference is used to invoke a method on the object. A CORBA object may have multiple, distinct object references.

distant sun
#

Kinds useless since only one class can be extended

steel heart
#

oh yeah fefo I forgot but need to supply you your daily code

obtuse gale
#

d;jdk java.lang.object

#

oof

steel heart
#

d;jdk Object

ruby craterBOT
distant sun
#

Nah

steel heart
#

d;jdk Object#hashCode

ruby craterBOT
obtuse gale
#

d;jdk java.lang.Object

obtuse gale
#

nighty

distant sun
#

d;extensions playerjoinevent

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: javax.print.event.PrintEvent java.awt.event.PaintEvent javax.swing.event.HyperlinkEvent javax.sound.sampled.LineEvent javax.print.event.PrintJobEvent

obtuse gale
#

d;extensions spigot playerjoinevent

ruby craterBOT
#
org.bukkit.event.player.PlayerJoinEvent
Extensions:
org.bukkit.event.player.PlayerEvent```
obtuse gale
#

i see

steel heart
#

d;extensions object

ruby craterBOT
#

Object does not have any extensions.

steel heart
#

d;extensions factory

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: java.security.KeyFactory javax.xml.soap.SOAPFactory javax.swing.text.ViewFactory javax.sql.rowset.spi.SyncFactory org.omg.IOP.CodecFactory

steel heart
#

d;extensions oliver

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: javax.naming.spi.Resolver java.sql.Driver javax.xml.ws.Holder java.text.Normalizer javax.swing.JSlider

steel heart
#

d;extensions HOBOBOBOB

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: javax.swing.JComboBox javax.swing.ComboBoxModel javax.swing.plaf.ComboBoxUI javax.swing.ComboBoxEditor javax.swing.plaf.synth.SynthComboBoxUI

steel heart
#

d;lolhoblol

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: java.awt.image.ColorModel org.omg.CORBA.LongHolder org.omg.CORBA.FloatHolder org.omg.CORBA.LocalObject java.awt.image.LookupTable

steel heart
#

d;corba

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: org.omg.CORBA_2_3.ORB java.sql.Clob java.awt.Color java.sql.NClob java.awt.Scrollbar

steel heart
#

d;org.omg.CORBA_2_3.ORB

ruby craterBOT
#
org.omg.CORBA_2_3.ORB
public abstract class ORB
extends ORB```
ORB has 6 methods, and  1 extensions.
Description:

A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

steel heart
#

ah

#

ORB ORB

#

d;methods jdk org.omg.CORBA_2_3.ORB

ruby craterBOT
#
org.omg.CORBA_2_3.ORB
Methods:
org.omg.CORBA_2_3.ORB#lookup_value_factory
org.omg.CORBA_2_3.ORB#set_delegate
org.omg.CORBA_2_3.ORB#ORB
org.omg.CORBA_2_3.ORB#unregister_value_factory
org.omg.CORBA_2_3.ORB#get_value_def
org.omg.CORBA_2_3.ORB#register_value_factory```
ocean quartz
#

ORB extends ORB implements ORB

steel heart
#

lol

#

lol ye

obtuse gale
#

I wonder where piggy got his jdk jar from lmao

steel heart
#

Bruh these lombokers in the spigot discord

obtuse gale
#

I don't even read that chat anymore

ocean quartz
#

I mean md5 uses it so expected that more there do

viscid charm
#

yo guys how would I make it so that if someone mines these diamodn ores they turn into bedrock BUT then if the server reboots they automatically turn into diamond ores?

    @EventHandler
    public void PlayerMineMethod(BlockBreakEvent event)
    {

        if (event.isCancelled()) {
            return;
        }

        Player player = event.getPlayer();
        Block block = event.getBlock();

        if (inRegion(event.getPlayer()) && event.getPlayer() != null) {
            if (block.getType() == Material.DIAMOND_ORE) {

                Location loc = new Location(event.getBlock().getWorld(), event.getBlock().getX(), event.getBlock().getY(), event.getBlock().getZ());

                    event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation(), godlydiamond());
                    event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.ORB_PICKUP, 10, 0);
                    event.setCancelled(true);
                    loc.getBlock().setType(Material.BEDROCK);
                    Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
                        block.getChunk().load();
                        loc.getWorld().getBlockAt(loc).setType(Material.DIAMOND_ORE);
                    }, 20 * this.regenerateTime);

                }
            }
        }
    }```
ocean quartz
#

You'll have to save the location of the block to a file

obtuse gale
ocean quartz
#

Nice

obtuse gale
#

can gh count project lines?

quiet depot
half harness
#

?

quiet depot
#

do you have the dependency?

half harness
#

wut

#

if I ctrl + click some of the classes in bukkit

#

I get a billion errors bc of that

surreal quarry
#

if im making a JsonDeserializer for gson what would be null in the deserialize method if the class's field was not provided in the json

override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext)
quiet depot
#

wym

#

d;gson JsonNull

ruby craterBOT
#
com.google.gson.JsonNull
public final class JsonNull
extends JsonElement```
JsonNull has 1 fields, 4 methods, and  1 extensions.
Description:

A class representing a Json null value.

surreal quarry
#

ah so its probably JsonElement#isJsonNull

viscid charm
#

java.lang.NullPointerException I am getting this when i am running a method in my on disable

ocean quartz
#

Hard to tell anything without seeing the method, also #development might be more appropriate

#

@quiet depot Do you sometimes stage files then commit them on GitKraken and right after 1 or 2 new files appear unstaged?

quiet depot
#

yes

#

it's annoying af

ocean quartz
#

Ikr

quiet depot
#

it also happens to me on ij though

#

i don't think it's a problem exclusive to gitkraken

ocean quartz
#

Oh okay, seems like a git thing then

quiet depot
#

tbh I don't usually commit on gitkraken (unless I need to merge)

#

I use it for everything else

forest pecan
#

so i was scrolling on the forums

#

cause i was bored

#

and what the fuck

#

is this code

#
p.sendTitle("NightyNight", "Sleep Well.");
#

Oh hell nah

compact perchBOT
#
📋 Paste Converted!
https://paste.helpch.at/guyamiwusi

A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!

obtuse gale
#

what

pallid gale
#

ah yes my facebook is funnycube#0001

static zealot
#

xD

hot hull
#

Howdy fellas, am back

hot hull
#

No?

prisma wave
#

tfw Object[]#toString

quiet depot
#

bm u any good at regex?

#

i'm in a pickle

prisma wave
#

I can do simple ones

#

Nothing complicated lol

quiet depot
#

the result should be an array of two items

hot hull
#

split by , then proceed, screw regex

quiet depot
#

there's commas in the type parameters

#

that won't work

hot hull
#

That is hideous tho btw

quiet depot
#

blame jda

prisma wave
#

Hmm

quiet depot
#

I wonder what it currently shows

#

d;jda restaction#accumulate

ruby craterBOT
#
net.dv8tion.jda.api.requests.RestAction#accumulate
@CheckReturnValue, @Nonnull
static  accumulate(Nonnull                                                    Collection<? extends RestAction<? extends E>> actions, Nonnull                                                    Collector<? super E, ​A, ​? extends O> collector)
throws IllegalArgumentException```
Description:

Creates a RestAction instance which accumulates all results of the provided actions. If one action fails, all others will be cancelled. To handle failures individually instead of cancelling you can use mapToResult().

Throws:

IllegalArgumentException - If null is provided or the collection is empty

Returns:

RestAction - Type: List of the results

Parameters:

actions - Non-empty collection of RestActions to accumulate
collector - The Collector to use

quiet depot
#

yeah it can't even

#

wait

#

what

#

i'm blind

#

it can

#

oh no nvm that's just from the actual parameter description

hot hull
#

Should I start using java 15 for projects thonking

static zealot
#

hmm no

#

13

prisma wave
#

yes

#

java 15 is hot

lunar cypress
#

As far as I understand your issue, this cannot be solved with regex

#

@quiet depot

quiet depot
#

what do you recommend?

lunar cypress
#

Though I'm wondering what your goal is anyway?

quiet depot
#

it's for docdex, gotta split the parameters up to get their types & names

lunar cypress
#

What's wrong with leaving it like it is in the original?

quiet depot
#

because then to search you'd have to go restaction#accumulate(@Nonnull Collection<? extends RestAction<? extends E>> actions, @Nonnull Collector<? super E,​A,​? extends O> collector)

#

instead of restaction#accumulate(actions, collector)

#

at that point you may aswell just link the javadoc and skip the bot

lunar cypress
#

Just do it without the type params

#

They're not part of the signature anyway

quiet depot
#

ah true

lunar cypress
#

I can look up how I did it later

#

Or take a peek at the jda butler code I suppose

quiet depot
#

jesus butler is just as bad as mine

#

not a fan of their solution

#

it's too tightly coupled to their other functionality

#

I'm not good enough at regex to extract the bit I need

ocean quartz
quiet depot
#

think I've got it under control

#

using a loop with indexes and shit now

ocean quartz
#

Oh okok ;p

quiet depot
#

thanks though

languid musk
#

Probably wrong place to ask but could any dev help me compile some source code into a jar please? I'm having some trouble. Thanks

inner osprey
#

Hi, does any dev here know anything about EFS files, if so, please dm me, its very important

#

(basically cant access any of my University Files)

hot hull
#

@quiet depot I need structure advice

> listener
 > registerable
  - ListenerRegisterable.java
 > base 
  - SignListener.java
 > event
  - RealEstateSignEvent.java
 - RealEstateSignCreateListener.java

This fine, or should the listener itself be in a seperate package itself? (Create listener)

quiet depot
#

that's fine but get rid of that registerable

#

register all your listeners at once

#

via some form of classpath scanning

#

😄

hot hull
#

smh

heady birch
#

KB4 RPF?

quiet depot
#

no

#

rpf isn't ready

flint zenith
#

l

quaint mauve
#

hi

flint zenith
#

hm

#

hi

quiet depot
#

d;spigot servicesmanager#load(service)

ruby craterBOT
#
org.bukkit.plugin.ServicesManager#load
@Nullable
T load(@NotNull Class service)```
Description:

Queries for a provider. This may return if no provider has been registered for a service. The highest priority provider is returned.

Returns:

provider or null

Parameters:

service - The service interface

quiet depot
#

@obtuse gale

#

idk why those links aren't working oof

obtuse gale
#

Lol

hot hull
#

d;spigot Player#getDisplayName

ruby craterBOT
#
org.bukkit.entity.Player#getDisplayName
@NotNull
String getDisplayName()```
Description:

Gets the "friendly" name to display of this player. This may include color. Note that this name will not be displayed in game, only in chat and places defined by plugins.

Returns:

the friendly name

hot hull
#

Did they remove colors on mobile again

old wyvern
#

Might have something to do with embeds

#
public

is that highlighed?

quaint mauve
#

i need help please

quiet depot
#

Feel free to ask your question in the relevant channel

obtuse gale
#

d;spigot servicesmanager#loada

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: servicesmanager#load(class) servicesmanager#load(service) simpleservicesmanager#load(class) simpleservicesmanager#load(service) server#reload()

obtuse gale
#

Oo

#

Server reload mmmm mmlul

#

Wait is that based on parameter name or type?

#

d;LuckPerms UserManager#getUser(String)

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: usermanager#getuser(uuid) usermanager#saveuser(user) usermanager#getuser(uniqueid) usermanager#loaduser(uuid, string) usermanager#getwithpermission(string)

obtuse gale
#

Why are they all lowercase CH_facewhy

hot hull
#

Nop Yugi

old wyvern
#

ah

ocean quartz
#

Was testing what was the fastest string replace util and the results are interesting

Java replace: 0.184038ms
StringUtils replace: 0.092409ms
StringUtils replace: 0.004715ms # This one uses constant placeholders instead
Kotlin regex: 0.045017ms 
#

Surprised that Kotlin's regex replace is very speedy, but string utils damn

distant sun
#

esp second

ocean quartz
#

Esp?

old wyvern
#

What does the kotlin regex compile to?

#

especially*

ocean quartz
#

Oh

#

Yeah

#

Let me check

#

Hmm it just uses Java's normal regex, i thought i'd be something different

onyx loom
#

lol java slow

lunar cypress
#

How did you test

#

Iterations, warmup?

distant sun
#

hard coded means values can't be edited or smth like that

prisma wave
#

? extends Class[] enumConstants; what the fuck

#

i didnt even know you could do that

distant sun
#

lol tf

#

where did that came from

lunar cypress
#

Well... you can't?

#

Bad decompiler or sth?

prisma wave
#

possibly

#

it looks decompiled

ocean quartz
lunar cypress
#

Did you use jbench

ocean quartz
#

Just normal measureTimeNano

lunar cypress
#

You know that on its own is hardly usable

#

If you want a proper comparison you should use a benchmarking tool

ocean quartz
#

Oh yeah this isn't anything usable, just to have some notion

#

Not trying to get anything precise

lunar cypress
#

Well it may be rather misleading

#

Since the order of the tests is significant as well

#

There are a lot more factors to this

#

Even if kotlin ends up winning the fight the proportions may be off

distant sun
#

which jbench johnny?

ocean quartz
#

I can do other tests with jbench though still think commons string utils will be the fastest

distant sun
#

how do I mention a method on kotlin docs?

#

like {@link Class#method}

ocean quartz
#

It's actually great, you just do [Method]

distant sun
#

what if the method is from another class?

ocean quartz
#

I think it'd be [Class.method]

distant sun
#

oh yea

#

ty

#

I assume I can't target a certain method if more than 1 have the same name?

ocean quartz
#

I guess no

distant sun
#

F

obtuse gale
#

imagine not doing Class.method(Type) kek

distant sun
#

??

obtuse gale
distant sun
#

whaaat

ocean quartz
#

KDoc is pretty new

distant sun
surreal quarry
#

lol sx has a comment on that thread

ocean quartz
#

Yeah, someone should take the bullet and PR it

surreal quarry
#

dokka says they cant do anything about it

prisma wave
#

dokka is just the documentation tool

#

this would be a thing in the language spec

#

probably

surreal quarry
#

yea they said JB would need to do something so thats prob right

ocean quartz
#

Yeah, god dammit Andrey

prisma wave
#

yet another TERRIBLE mistake made by the kotlin designers!

#

how much more must PUNISHMENT must developers take?!

surreal quarry
#

its been 4 years since the issue was posted on JB lol

#

it cant be that hard to add that, can it?

prisma wave
#

not at all

ocean quartz
#

I bet ElDocs will have that

prisma wave
#

obviously!

surreal quarry
#

ElDoc >>

ocean quartz
#

El Docs, spanish for The Docs lmao

half harness
#

❤️

#

For vault, is gradle repositories { maven { url = 'http://nexus.hc.to/content/repositories/pub_releases' } } dependencies { compileOnly 'net.milkbowl.vault:VaultAPI:1.7' } and ```gradle
repositories {
maven { url = 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
}

prisma wave
#

jitpack 🤮

ocean quartz
#

JitPack contains the latest prolly

half harness
#

jitpack has only 1.7

#

the top has like every version

prisma wave
#

then use the top one?

half harness
#

ok

ocean quartz
#

You can't import both versions anyways

half harness
#

I was just asking if the 1.7 for both was the same

#

you solved mine tho 🙂

#

whats the problem

loud inlet
#

how do you make it so when somebody drops a feather with a certain name it activates an execute command? any suggestions?

eager fern
#

@loud inlet would require a custom plugin

loud inlet
#

k

#

/scoreboard players set @e[type=Item] OBJECTIVE 1 {Item:{id:minecraft:feather}} i read that you could do it with scoreboard with this command, but it didnt seem to reconize the last part

#

you think i could do it with skript?

distant sun
#

not the s word

loud inlet
#

lol

ocean quartz
#

@obtuse gale No lol

half harness
#

where

#

is that setting

old wyvern
#

Settings > Editor

distant sun
#

wtf is wrong with you efe

half harness
#

ohh

ocean quartz
#

Also, someone posted a skript resource on spigot asking for help lmao

old wyvern
#

Wow

distant sun
#

lmfao what

old wyvern
#

How..

surreal quarry
#

loll

ocean quartz
#

That makes no sense lol

#

Dear lord

surreal quarry
#

yikes

#

that would be so annoying to code with i feel like

old wyvern
#

Rainbow Brackets

surreal quarry
#

javax.imageio.IIOException it looks like

old wyvern
#

What plugin are you using for the background image?

#

Disable it

ocean quartz
#

^

#

Uninstalling would be better

old wyvern
#

You could also try Indent rainbow

compact perchBOT
ocean quartz
old wyvern
#

yea it kinda forces you to use its style unless you wants loads of red indentations xD

#

yea?

#

Its easier to see blocks

#

Yes

#

Makes reading blocks much easier

#

Also kinda warns you about bad indentations

ocean quartz
#

Where is the font?

old wyvern
#

I use Vuesion

ocean quartz
#

I like fira code

old wyvern
#

Vuesion

ocean quartz
#

Atom one dark

#

With custom colors

#

Can you send a screenshot Yugi?

#

Not bad

#

Bright?

old wyvern
#

Which one is that?

#

lol

ocean quartz
#

Why?

#

One dark is literally in material theme

distant sun
#

Oceanic

ocean quartz
#

Tools

old wyvern
#

My internet keeps disconnection

ocean quartz
#

Smh

old wyvern
#

Modem going random

#

It says wireless is off

ocean quartz
old wyvern
#

but its on

#

And randomly just seems to disappear and come back

ocean quartz
#

Also you said mine is too bright but liked yugi's xD
The brightness is almost the same on both, just different hue

old wyvern
#

xD

ocean quartz
#

I have huge glasses

old wyvern
#

What power?

ocean quartz
#

Blindness

old wyvern
#

5+?

ocean quartz
#

I think mine is 5 on left and 4.75 on right

old wyvern
#

Use material icons

old wyvern
#

Probably above 4 by now

#

Havent checked in a year or so

ocean quartz
#

Both myopia and astigmatism, generally fucked fingerguns

surreal quarry
#

matt what'd you do to get the bold font in your editor window

old wyvern
#

Nothin

ocean quartz
#

Nope

old wyvern
#

Yea

surreal quarry
#

may just be that its a different font than me idk

ocean quartz
#

Oh, it's not bold, it's just my font

surreal quarry
#

youtube

ocean quartz
surreal quarry
#

ah yea

ocean quartz
#

It's just thicc

#

It's fira code medium

#

Retina is good too

#

Objects too

onyx loom
#

imagine not knowing avicii 🙄 😭

old wyvern
#

lol

ocean quartz
#

Uh, create a minecraft server implementation

surreal quarry
#

write a hello world program

#

then implement spacex api

old wyvern
#

Take something you wrote in Java

#

rewrite that to kotlin

surreal quarry
#

yea

#

thats how i learned

old wyvern
#

Think of how you can use kotlin specific features to improve it

surreal quarry
#

and its fun to compare how many fewer lines each file is :)

old wyvern
#

Google

#

And look up kotlin docs

ocean quartz
onyx loom
#

🤢

old wyvern
#

Kotlin has everything as expressions

#

Functions that dont return anything meaningful return Unit

#

functions that do no return at all return Nothing

#
Coursera

Offered by JetBrains. The Kotlin programming language is a modern language that gives you more power for your everyday tasks. Kotlin is concise, safe, pragmatic, and focused on interoperability with Java code. It can be used almost everywhere Java is used today: for server-side development, Android apps, and much more. Kotlin is 100% compatible ...

prisma wave
#

there is

onyx loom
#

yes

#

yes

prisma wave
#

basically

#

if it works in java, it works in kotlin

#

oh actually

#

lol

#

nvm what i just said

#

kotlin has a different String class

old wyvern
#

its just replace in kotlin

onyx loom
#

huh

prisma wave
#

:)

#

yeah

onyx loom
#

im pretty sure ive used replaceAll before

prisma wave
#

it's just replace(Regex)

old wyvern
#

mhm

ocean quartz
#

replace("hello".toRegex(), "replacement")

old wyvern
#

KDocDex when?

ocean quartz
prisma wave
#

translate

#

always translate

old wyvern
#

You could also possibly create a helper extension function to translate for ya

onyx loom
#

🙄

prisma wave
#

🙄

old wyvern
#

🙄

surreal quarry
#

🙄

old wyvern
#

🙄

prisma wave
#

wtf

surreal quarry
#

tf

onyx loom
#

no

surreal quarry
#

loll

prisma wave
#

?

onyx loom
#

no

surreal quarry
#

no

onyx loom
#

lol

#

NO

#

ill let u figure this one out chief

old wyvern
#

ChatColor.translateAlternateColorCodes('&', "§") What is the point of this?

prisma wave
#

the semicolons arent the problem there

#

xd

surreal quarry
#

use extension properties

#

since you're in kotlin now

old wyvern
#

no like the second argument is the message

#

yea

onyx loom
#

weird variable name tho

old wyvern
#

also

#

use string templates