#help-development

1 messages · Page 401 of 1

safe ibex
#

It's not exactly hard to read?

echo basalt
#

Working in kotlin limits the amount of people willing to help you by around 90%

safe ibex
#

Are you serious?

echo basalt
#

Yes

eternal oxide
#

Yep, most here dislike kotlin

#

we so zero point in it, especially for plugins

safe ibex
#

But writing java is so much worse because it doesn't have like .filter etc

#

I like functional stuff like that as it's so much fucking easier to write code

echo basalt
#

kotlin here is associated with dellusional people that think kotlin is better

dry yacht
#

There is nothing inherently wrong with it, other than that it only adds more complexity to something which is already more complex than the average plugin developer can handle - the plugin itself.

echo basalt
#

java does have filters and all

safe ibex
river oracle
#

java can do filters to collections and maps :)

safe ibex
#

like x.filter { it.toLower() == "hello" } is much simpler than the verbose having to use for loop version...

#

Unless I don't know Java that much - that's kind of sucky

echo basalt
#

Regardless of what you say... we still don't care

safe ibex
river oracle
#

accept its more verbose which is scary

eternal oxide
#

yep stream filter

river oracle
#
x.stream().filter(Function Here)
safe ibex
#

?

echo basalt
#

myCollection.stream().filter(object -> object.equalsIgnoreCase("hello"))

eternal oxide
#

Stream.of(x).filter(

echo basalt
#

Stream.of(myArray).filter

#

whatever

safe ibex
#

But why do you have to .stream() it?

wispy jasper
#

a quick question: how do i give a player a tag and how to remove? i tried with player.performCommand but you need op for that

river oracle
echo basalt
#

no

dry yacht
#
List<String> data = new ArrayList<>();
List<String> filteredData = data.stream()
  .filter(item -> item.toLowerCase(Locale.ROOT).equals("hello"))
  .collect(Collectors.toList());
#

What's so ugly about that in comparison to your kotlin function? Does it already result in a collection?

echo basalt
#

I still hate the stream api

safe ibex
#

Now I don't mind being verbose, but why the hell do you have to stream it???

eternal oxide
#

I like streams for specific uses, like filtering and map

safe ibex
#

Like what is a stream???

eternal oxide
#

stream is basically iterating the collection

safe ibex
#

If I know that, then I'll instantly switch my codebase just on the basis more people will help

dry yacht
#

So you only love Kotlin because it hides implementation details behind little concise functions for you?

echo basalt
#

It's a transformation wrapper

#

the only reason why 200 collection types won't impl it, is because not everyone wants to use the streaming API

safe ibex
#

Ohhh ok

#

I kind of get it now, actually

safe ibex
echo basalt
#

There are some lambda functions handled by collections, but most of them are part of the streaming api

#

that came with java 8

eternal oxide
#

pretty much everything that you use in kotlin already exists in Java, just not as scripty

echo basalt
#

kotlin replaces verbose code with keywords

brave sparrow
remote swallow
echo basalt
#

and people argue it's better without understanding that java is designed to be verbose

safe ibex
river oracle
#

99% of people here do not use kotlin

safe ibex
#

Oh ok

river oracle
#

there are the weird odballs ofcourse

safe ibex
#

Well

remote swallow
#

only like jantuck uses kotlin

dry yacht
remote swallow
#

only regular ik here that uses it

safe ibex
#

Then gimme like an hour and my codebase will be completely Java - then I can actually solve shit 👍

hazy parrot
#

If you like kotlin more, sorry to say it, but it's stupid to move to java just to get more help

remote swallow
#

wonder if java will solve ur issues

echo basalt
#

pretty sure intellij can do the conversion for you

safe ibex
eternal oxide
#

wether you know kotlin or not, you can;t lose anything learning Java.

safe ibex
#

It's just more concise

safe ibex
river oracle
#

tbf most people here also don't know the hundreds of keywords kotlin has

#

so its difficult and annoying to read

safe ibex
#

But you know, if there's more support in Java compared to Kotlin/more people want to actually help with Java compared to Kotlin then I'll make the switch 💀

echo basalt
#

inline fun

safe ibex
echo basalt
#

companion object

remote swallow
#

something!!.doSOmething?.method

#

like wot

echo basalt
#

i never understood languages calling their functions fun

hazy parrot
echo basalt
#

sure it's short

#

but like

brave sparrow
safe ibex
#

Although I originally am from a completely typescript & python background so I am all for scripty stuff - it's just what I'm used to lmfao

echo basalt
#

most ides can just

#

do stuff

dry yacht
safe ibex
#

I mean it makes it easier to read (for people that know Kotlin) but still

#

ok lemme try and switch this over

hazy parrot
dry yacht
#

It's not about hiding details, abbreviating or being concise, it's about being as simple as possible but as complex as needed.

twin venture
#

spigot-api

echo basalt
#

I miss writing plugin code that actually did stuff

brave sparrow
#

As opposed to?

echo basalt
#

uhh

#

my latest project was an entire image rendering system

safe ibex
echo basalt
#

that used maps & itemframes

brave sparrow
#

That’s doing stuff

echo basalt
#

there's like 10% bukkit code

#

80% graphics abstraction

dry yacht
echo basalt
#

^

echo basalt
#

it's like

#

a ton of database abstraction

#

futures everywhere

#

rendering systems

safe ibex
#

I seriously have to re-write everything 💀

river oracle
safe ibex
#

Whelp

dry yacht
safe ibex
echo basalt
#

you can grab 80% of the code here and make an OS with it

brave sparrow
#

You and I have differing definitions of “doing stuff” then lol

brave sparrow
echo basalt
#

this project compiles to like 800kb and has about 5 listeners and 8 commands

safe ibex
echo basalt
#

no shading

rapid topaz
#

does public void run() only work in my main class?

echo basalt
#

no 🤦

rapid topaz
#

thanks for the emoji 👍

echo basalt
safe ibex
#

for god sake

echo basalt
#

You don't have this?

safe ibex
#

It's greyed out for me

echo basalt
#

hm

safe ibex
#

So god damn annoying

#

I guess it cannot convert because of the vastly different-ish syntax 🤷

dry yacht
safe ibex
#

like e.g. companion objects and null coalescing etc

echo basalt
#

I have a wrapper for the bukkit scheduler

worldly ingot
# safe ibex

Or probably because you're looking at source code so there's nothing to decompile

#

If you compiled that to bytecode and were looking at a class it would probably let you use that option

echo basalt
#

I also have my own version of CompletableFuture that doesn't suck up exceptions

worldly ingot
#

Suck up exceptions?

#

Literally all you have to do is handle exceptions

#

Either whenComplete(), handle(), or exceptionally()

echo basalt
#

You end up having 200 duplicate .exceptionally(thr -> thr.printStackTrace(); return null;}); code blocks

worldly ingot
#

Yeah if you're using CFs incorrectly you will

echo basalt
#

You still need to add handling by default to show exceptions

#

Instead of your code just failing and the exception showing up regardless

#

other useless classes I have include my own time profiling system, that makes fancy graphs in grafana

#

my command system, my placeholder system

#

Skin changing system

#

uh

#

cinematic stuff like transitions, text animations

safe ibex
#

Not too amazing at Java, is a mutable map in kotlin equivalent to the following?

public static HashMap<UUID, Inventory> guiMap = new HashMap<>();

#

Idk if that's the same, that's all I can find online - anyway

echo basalt
#

why is it static

#

Yeah it's mutable

safe ibex
#

ok cool

echo basalt
#

There are multiple map implementations

#

I usually default to ConcurrentHashMap

safe ibex
#

🤦‍♂️

#

10 ways to do one thing

#

oh god

echo basalt
#

Each way has positive and negative aspects

#

For example, you can have an ArrayList and a LinkedList

safe ibex
#

yeah, and in KT you just do mutableMapOf<T>()

#

done

#

boom

#

ok making some good progress ig

#

not much diff, biggest problem is the null assertions and no semicolons

ionic dagger
#

I'm interested in making a character customization-type gui for an rpg server, but i don't know how I would actually store the customizations for the player

#

any ideas?

#

Would I create a config file and store each players decision there?

tall dragon
#

that would be an option. but the best option would probably be a database

ionic dagger
#

how would i go at doing that?

tall dragon
#

first you would choose a database. and then look at documentation regarding interaction with said database

#

and then you interact with it to insert, get your data

desert frigate
#

i currently have a file config

org.shawty.Files.Minions.get().addDefault("Minions", new ArrayList<String>());
                org.shawty.Files.Minions.get().options().copyDefaults(true);
                org.shawty.Files.Minions.save();```
but everytime the server restarts, the defaults get set again so the value is just getting reset every time? how can i fix this?
#

it isnt really a default when it gets reset every time

ionic dagger
#

where would i find a database thats good for the data im trying to store

tall dragon
#

well its largely preference

#

i for example like nosql databases such as MongoDB

ivory sleet
#

there’s both hashMapOf and mutableMapOf

tall dragon
#

but it can be good to do some reseach on them for how much data you are going to insert

safe ibex
ivory sleet
#

however mutableMapOf may not be a hash map by contract

#

Since you know, kotlin can be compiled to other stuff

#

Where the impl may not be the java hash map

#

mutableMapOf is fine tho

#

Its like the same thing with when you use the type ArrayList vs just List

#

does your program actually depend on an array list specifically? Or just a list, where ArrayList happens to be the most accurate implementation to use?

#

This goes under liskov’ substitution principle

dry yacht
dry yacht
# desert frigate anyone know why this happens?

I have no idea what org.shawty.Files.Minions is, but I'd guess that the call to save will just override the config with whatever the current configuration in memory holds. Are you loading the file before the call to save?

desert frigate
# dry yacht I have no idea what `org.shawty.Files.Minions` is, but I'd guess that the call t...

org.shawty.Files.Minions:

public class Minions {
    private static File file;
    private static FileConfiguration configFile;
    public static void setup() {
        file = new File(Core.getPlugin().getDataFolder(), "minions.yml");
        if(!file.exists()) {
            try {
                file.createNewFile();
            } catch(IOException e) {
                Bukkit.getLogger().severe("Cannot create the minions.yml file!");
            }
        }
        configFile = YamlConfiguration.loadConfiguration(file);
    }

    public static FileConfiguration get() {
        return configFile;
    }
    public static void save() {
        try {
            configFile.save(file);
        } catch (IOException e) {
            Bukkit.getLogger().severe("Cannot save the minions.yml file!");
        }
    }
    public static void reload() {
        configFile = YamlConfiguration.loadConfiguration(file);
    }
}
#

and loading, what do you mean?

delicate sluice
#

Don't use static too often...

desert frigate
#

whats wrong with static...

#

i pulled this from youtube..

dry yacht
# desert frigate and loading, what do you mean?

You're loading the configuration from the file in setup, so after having loaded it into memory, a call to save shouldn't override anything, if there were no changes in the mean time. If you edit the file after your plugin has loaded and then call save onDisable or something similar, your plugin is of course not gonna know about the changes you did manually, outside of the system.

delicate sluice
# desert frigate whats wrong with static...

Lol it will mess all your code. Then you change the value of whatever static you assigned, it will literally change every value that was called with the static. Idk how to explain it in simple terms. It breaks the idea behind object orientated programming

#

Just stay away from it as much as possible. You only use static in rare cases. Go watch more videos behind static functions in java

delicate sluice
undone yarrow
#

Most programmers probably wouldnt be here without youtube though

dry yacht
#

And removing static is not going to fix the issue either... my lord.

undone yarrow
#

I have a plugin that's supposed to save some variables, and it does, but it wont load them. Everything works alright, and it makes a file, saves the data and everything, but after a restart it cant seem to open the file and read the data. The only error I get is:

[13:56:55 ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.Location org.bukkit.Location.deserialize(java.util.Map)' of class org.bukkit.Location for deserialization```
 Can someone please help? I've literally been trying to fix this tiny stupid plugin for 3 days now and it's driving me insane! 
Here's the ChestObject class (note, the plugin has 0 things to do with chests): https://paste.md-5.net/lizahekuda.java 
And here's the ParticleHandler class. https://paste.md-5.net/unikatatol.java
Both the chestobject and particlehandler classes have something to do with saving and loading data. Here's the main class just in case
https://paste.md-5.net/rizujaboju.java
If you have any clue on a possible fix, ping me a trillion times because I've already tried everything and don't know what to do anymore
tardy delta
#

average github lurker

desert frigate
desert frigate
regal scaffold
#

Hey, I’m looking into getting better at nms and I have a few questions regarding this. I’m sure a bunch of you know the answer

tardy delta
#

?nms

regal scaffold
#

As I understand. NMS is directly related to a Minecraft server version, therefore, if I want to make my plugin multi version I most likely need to do some adapting regarding nms directly

tardy delta
#

ugh wrong one

regal scaffold
#

I’ve read that anyways

#

I see that many plugins have folders for each Minecraft version, and inside of them specific nms stuff for that version

#

There’s a lot but for this example

eternal oxide
#

multi module

regal scaffold
#

AnvilGUI

#

How does my code know which version to use? How do I make those files? What actually goes in them

eternal oxide
#

google mbaxter github multimodule

regal scaffold
#

Im accepting resources if you have any as well! Greatly welcome

#

I will look at all the stuff you send

undone yarrow
# undone yarrow I have a plugin that's supposed to save some variables, and it does, but it wont...

Coming back to this, I think it has to do with this piece of code. java public static ChestObject deserialize(Map<String, Object> args) { // Get all the variables from the Map, and return them as a ChestObject boolean isLooted = (boolean) args.get("isLooted"); Location location = (Location) args.get("location"); if(location == null) Bukkit.broadcastMessage("Location is null in deserialization method 1"); Particle particle = Particle.valueOf((String) args.get("particle")); int cooldown = (int) args.get("cooldown"); List<ItemStack> items = (List<ItemStack>) args.get("items"); return new ChestObject(isLooted, location, particle, cooldown, items); } I'm sure the order of the new ChestObject is correct, so I'm guessing it has to do with the items. I think there's going something wrong there, when deserializing. What would be a way to check if there something wrong with that?
The error says Could not call method 'public static org.bukkit.Location org.bukkit.Location.deserialize(java.util.Map)' of class org.bukkit.Location for deserialization

ivory sleet
#

Each module implement a separate class behind an interface, then during runtime you have ur main class which fetches the nms version from the package of one of the craft bukkit classes.

#

(And obv u then choose which implementation of that interface to use)

regal scaffold
ivory sleet
#

Ye, in principle

#

Sometimes the versions don’t differ

regal scaffold
#

Now this might sound dumb. But isn’t nms massive? Wouldn’t the file be thousands of lines long?

ivory sleet
#

So you can leave behind a default implementation

#

You can have multiple interfaces

#

Or use reflection and dont have multiple modules

tardy delta
regal scaffold
#

What I mean is, I assume I make each version module depending to my needs regarding nms? It’s not like I make a global NMS for absolutely everything nms has

#

Like, for example, your nms file won’t be the same as mine, even if it’s for the same version

#

Cause we want to do different things

regal scaffold
#

I need to read all these so I’m just asking questions which will probably get answered after I read but just to get more resources

#

Now, he said:

Use reflection and you don’t need multimodules

#

I know what reflection does and how it works. But how does reflection simplify that? Why isn’t everyone using reflection for it

tardy delta
#

reflection is slow asf

regal scaffold
#

Ahhhh gotcha so that’s the main reason

#

Now, I know there’s libraries out there like protocol lib as well

quaint mantle
#

How can I remove the link https://cdn.discordapp.com/attachments/picture.png from a message received in the chat and replace that message with the text "image"? Im gonna use it in DiscordSRV plugin, so the image from discord gonna become clickable text "image" into the chat

tardy delta
safe ibex
#

What's the diff between a hashmap keyset and entry set?!?

#

Oh wait I just do .put to set to a map nevermind

regal scaffold
#

So with nms then. I assume I write everything I need for 1 version first. And then make the handler and expand to other versions with my version as reference?

safe ibex
#

Ah yes, I love writing Java like Kotlin:

Arrays.stream(items).filter(Objects::nonNull).forEach(inventory::addItem);
#

This is exactly what I like 😊

#

Oh wait what the actual hell

#

IntelliJ is smarter with Java than it is with it's own language!!!?!?!?

quiet ice
#

what do you mean there

safe ibex
#

Like it's giving smarter like suggestions and stuff

#

Idk never noticed it with KT compared to Java 🤔

quiet ice
#

probably depends on the settings of your IDE

safe ibex
#

Oh my fucking god

quiet ice
#

People often think eclipse is dumb - but that is only because they let is stay at default settings.
Same applies in your case too most likely

safe ibex
#

I am trying to write Java in the style of Kotlin because that's what I'm used to

#

And I made this abomination:

ItemStack[] itemsToDonate = (ItemStack[]) Arrays.stream(event.getInventory().getContents()).filter(itemStack ->
  !Objects.equals(itemStack.displayName(), Component.text("Donate to Admins")) && itemStack.getType() != Material.ARROW
).toArray();
#

absolutely beautiful 🤌

quiet ice
#

😦

safe ibex
#

LMFAO

#

It's beautiful man

quiet ice
#

at least put the itemstack type comparision ahead of the display name comparision

safe ibex
#

what do you mean?

#

like where sorry?

quiet ice
#
ItemStack[] itemsToDonate = (ItemStack[]) Arrays.stream(event.getInventory().getContents()).filter(itemStack ->
  itemStack.getType() != Material.ARROW && !Objects.equals(itemStack.displayName(), Component.text("Donate to Admins"))
).toArray();
safe ibex
#

So like this?

ItemStack[] itemsToDonate = (ItemStack[]) Arrays.stream(event.getInventory().getContents()).filter(Objects::nonNull).filter(itemStack ->
  itemStack.getType() != Material.ARROW && !Objects.equals(itemStack.displayName(), Component.text("Donate to Admins"))
).toArray();
quiet ice
#

it's slightly faster given that comparing instances is fairly cheap - comparing strings are not.

safe ibex
#

Ohhh ok

#

Fair enough 👍

#

How would you actually write that? I kind of get that that's kind of a piece of shit snippet 💀

quiet ice
#

But performance will be rather shit regardless, so it is kinda pointless that I suggest that to you

quiet ice
#

Streams have a large overhead

safe ibex
#

fack

eternal oxide
#

not so much now

regal scaffold
#

Hey, I need to know

eternal oxide
#

they improved a short while back, in performance

quiet ice
#

Yeah it's okay unless you call it like thousands of times every tick

regal scaffold
#

Like I'm still a bit confused on this nms stuff after reading for a while

safe ibex
#

let's go

regal scaffold
#

Do I only make the nms methods that I need? Do I need a general one for stuff that I won't use?

#

Do I add stuff as I need it instead?

safe ibex
#

idk I just find it easier to read and faster to code if I code the way I already know (pure functional and progressive code rather than object everything)

regal scaffold
#

What if I need something else? Do I need to rewrite the entire interface?

quiet ice
#
List<ItemStack> temp = new ArrayList<>();
for (ItemStack itemStack : event.getInventory().getContents()) {
    if (itemStack.getType() == Material.ARROW || Objects.equals(itemStack.displayName(), Component.text("Donate to Admins"))) {
        continue;
    }
    temp.add(itemStack);
}
ItemStack[] itemsToDonate = temp.toArray(new ItemStack[0]);

Would be a more readable approach

safe ibex
#

Hm

quiet ice
#

(although I'd advise against the List#toArray call if possible - just added it in here to preserve the same code outcomes)

tardy delta
#

ItemStack[]::new 🥹

safe ibex
tardy delta
#

an intfunction

safe ibex
#

Not gonna lie

#

Which I don't really like as much

#

But hey ho

safe ibex
#

What the hell is that

quiet ice
tardy delta
safe ibex
#

it's fine

quiet ice
safe ibex
# tardy delta

so it basically it makes a new thing in the style of a class/object?!?

quiet ice
#

It's a shortcut for (int var10001) -> new ItemStack[var10001]

ocean hollow
#

how can I set cooldown for event? It sends me 2 messages to times per 1 click

tardy delta
#

var10001 🥹

quiet ice
tardy delta
#

and whats that

ocean hollow
#

PlayerInteractEntityEvent

tall dragon
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
tall dragon
#

works the same i believe

orchid gazelle
#

yo does extending CommandExecutor work somehow?

quiet ice
#

Similar thing is with Object:new which is a shortcut for () -> new Object().
Same with stuff like Objects::equals which is shorthand for (var10001, var10002) -> Objects.equals(var10001, var10002)

orchid gazelle
#

I wanna add/modify some functionality of CommandExecutor

tardy delta
#

well what does FF/QF stand for?

quiet ice
tardy delta
#

ah

#

felt that

ocean hollow
graceful oak
#

Would anyone be able to help me with setting a color of a glass pane in an item stack the only thing im finding is the depreciated way of setting durability with the itemstack

eternal oxide
#

colours from durability are pre 1.12

graceful oak
#

Oh wait i realized im an idiot it just is an item huh

#

xD

eternal oxide
#

so long as you have the correct api-version in your plugin.yml it's just a material choice

thorn crypt
#

Yo, I got this error I can't understand how to fix it

safe ibex
#

is List.of performant?

thorn crypt
safe ibex
#

In this context:

List<ItemStack> itemsToStoreInPDC = new ArrayList<>();

itemsToStoreInPDC.addAll(List.of(itemsInDonationPDC));
itemsToStoreInPDC.addAll(List.of(itemsToDonate));
thorn crypt
safe ibex
#

?

#

What?

#

I'm just wondering if that's an OK-thing to do

#

Trying to concat 2 arrays

thorn crypt
#

Tbh I don't see what you mean by concat, English is not my native language, so you lost 😅

safe ibex
#

Concatenate

#

Make a list consisting of all elements of one array, and all elements of other

zealous osprey
#

general warning for List.of:
An immutably list is generated.
Not important for this context, just wanted to mention it in case you ever wonder why you are getting an error.

safe ibex
thorn crypt
zealous osprey
glossy venture
#

it cant find the class

thorn crypt
glossy venture
#

PacketContainer is from protocollib right

thorn crypt
#

Yes

glossy venture
#

what version do you have installed on the server

thorn crypt
thorn crypt
glossy venture
#

tf

safe ibex
cinder spindle
#

Why am I getting this window?

#

I want that default window where I can select which type of plugin I want to create

thorn crypt
cinder spindle
thorn crypt
#

A week ago

#

approximatively

cinder spindle
#

Alright but why am I getting this?

thorn crypt
#

Idk

cinder spindle
thorn crypt
cinder spindle
#

ah

#

I should've not

glossy venture
#

to check if the class exists

#

if it doesnt the class is either coming from some other dependency or you do have a version mismatch

#

otherwise maybe a bukkit/java class loader bug tho i cant imagine that being the case

thorn crypt
#

Okay I think the problem is with protocollib, I setuped another server with protocollib and my plugin and it work perfectly

regal scaffold
#

@lost matrix Are you around

dry yacht
orchid gazelle
#

(which will of course need to do some things on command-execution)

tardy delta
#

acf hehe

dry yacht
tardy delta
#

with pleasure

cinder spindle
#

why am I having this?

dry yacht
# orchid gazelle I wanna change things like automaticly managing permissions

You should just build your own middleware, I guess. I once had an implementation I played around with, where I threw exceptions for things like missing arguments, missing permissions, player not online, unparsable input, etc., which I then caught in the middleware, that mapped these to configurable messages and explained to the user what went wrong. I don't even know how bukkit automatically verifies permissions, as I never made use of that feature.

regal scaffold
#

blvck can I ask you some stuff regarding nms multiversion

orchid gazelle
#

yeah thats basicly what I want

orchid gazelle
#

but what the heck should I use as a basis? That was my idea, extending something like CommandExecutor

#

cannot just throw in my own CommandMap and all lol

tardy delta
#

oh you gotta be kiddin me

cinder spindle
tardy delta
#

oh no no

#

use the maven tab on the right hand side and double click package

dry yacht
# orchid gazelle but what the heck should I use as a basis? That was my idea, extending something...

So you should create a command, like I do with PlayerCommand, that extends Command, and then have an abstract void onPlayerCommand(Player player, String label, String[] args); in your PlayerCommand. Inside that class, you call onPlayerCommand in Command#execute, if applicable. Wrap that call in a try-catch, which then responds to known exceptions by telling the player what happened. This way, you can always just quickly throw in your actual handler and make this "middleware" handle talking to the player.

tardy delta
cinder spindle
#

Where is this???

regal scaffold
#

NMS holograms

orchid gazelle
cinder spindle
orchid gazelle
#

I missed a lot of stuff because I came from 1.12.2 and just converted from that

tardy delta
#

just click view > tool windows > maven

dry yacht
tardy delta
#

its there just click it open

cinder spindle
#

Oh did it

#

Thanks!

dry yacht
orchid gazelle
#

yeah aight gonna use that as a basis then^^

#

but sadly cannot start until tomorrow. Now I gotta learn for the exam tomorrow, and then write a curriculum vitae for the new school c.c

river oracle
#

personally not a big fan of it

orchid gazelle
#

since I did not know it was even a thing I did not bother with it at all lol

dry yacht
#

I automatically register my commands using the AutoWirer, I don't even bother to register anything anymore. Such a pain.

shadow gazelle
#

Is there some way to register permissions without the plugin yaml?

dry yacht
tardy delta
#

reflections my beloved

shadow gazelle
#

Kind of assumed it would be something like that

#

yay

dry yacht
#

I hate registering permissions anyways, I just check them myself. I don't need bukkit to hold my hand on that part, xDD

tardy delta
#

thats some interesting naming convention

dry yacht
vivid skiff
#

How can i check if a player can actually see a another player?

tardy delta
#

.canSee?

#

or isVisible or smth

dry yacht
# tardy delta .canSee?

Isn't that just checking if the other player is hidden? It's not actually checking whether you can see them.

worldly ingot
#

I believe it's canSee(), yeah

vivid skiff
worldly ingot
#

Oh lol

vivid skiff
#

How could i do it?

#

I tried some methods using vectors to check the block but none of them worked

shadow gazelle
dry yacht
tardy delta
#

uh oh

#

what if the player can see through walls

vivid skiff
dry yacht
# vivid skiff Just the head

Then just build a vector from player A's eye-location to player B's eye-location and check for all blocks which that ray intersects with. There should even be a bukkit method for that, I think. Then iterate all results and check if you can see through them.

vivid skiff
vivid skiff
safe ibex
#

When to use arrayList vs List?

#

In Java?

shadow gazelle
#

You can't use List

#

List is an interface

safe ibex
#

?

#

Can I not do this?

List<ItemStack> inventoryGUIItems = Arrays.stream(Objects.requireNonNull(event.getClickedInventory()).getContents()).filter(Objects::nonNull).toList();
shadow gazelle
#

That's not using list

safe ibex
#

Because that seems to work?

shadow gazelle
#

That's saying inventoryGUIItems is equal to something that implements List

dry yacht
safe ibex
#

uhuh...

shadow gazelle
#
@SafeVarargs
@SuppressWarnings("varargs")
public static <T> List<T> asList(T... a) {
    return new ArrayList<>(a);
}
dry yacht
#

Likely just an ArrayList, xD. But it could be any list, like a LinkedList, etc.

safe ibex
#

So use arraylist for a dynamic array

#

got it

tardy delta
#

uhh any docs on how to answer a craft recipe request packet on client side?

shadow gazelle
#

LinkedList has some interesting performance issues, so you probably don't want to use that unless you really need to

tardy delta
#

i see it probably accepts a recipe id but need more info

shadow gazelle
#

That's literally from Arrays

quiet ice
quiet ice
#

Since java.util.Arrays.ArrayList cannot be resized where as java.util.ArrayList can

tardy delta
#

uhm does wiki.vg also cover packets sent by the server?

quiet ice
#

question is to which extend

vivid skiff
#

I used this method to check if a player can seen an another player, but it isn't working


        Vector v = b.toVector().subtract(a.toVector());
        double j = Math.floor(v.length());
        v.multiply(1/v.length()); 
        for (int i = 0; i<=j; i++) {
            v = b.toVector().subtract(a.toVector());
            v.multiply(1 / v.length());
            Block block = a.getWorld().getBlockAt((a.toVector().add(v.multiply(i))).toLocation(a.getWorld()));
            if (!block.getType().equals(Material.AIR) && !block.getType().equals(Material.WATER)) {
                return true;
            }
        }
        return false;
    }```
tardy delta
#

oh wait found it

#

the description goes kinda brr

eternal oxide
tardy delta
#

implementing crafting will be for tomorrow

#

2 hours break in college smh

dry yacht
#

For the most part, it would look something like this. The issue is that there's no available predicate, as far as I can see. So if you hit a block like glass or flowers and the like, it will return you this result, but won't provide any results after that position on the ray.

#

Maybe somebody else knows the API better than me

undone yarrow
#

You guys know that Horse jump bar thingy? is it possible to disable that + disable the jumping ability?

twilit roost
#

Not enought arrows

undone yarrow
#

ooh

#

gimme a sec

dry yacht
#

Damn, those are a lot of arrows. I almost cannot see what they're trying to show me

limpid nexus
#

Instructions unclear needs more arrows

dry yacht
undone yarrow
#

that better?

twilit roost
#

little bit

dry yacht
#

Yes! that's what we're talking about

undone yarrow
#

I guess I can also just remove the texture for the jumping xp bar lmao

dry yacht
analog thicket
# undone yarrow

What am I supposed to look at exactly? im very confused i think i need some more.

twilit roost
analog thicket
#

're

#

right

undone yarrow
#

And how can I rotate an animal in the same direction a player is looking at? So for example, using the Citizens plugin, you can ride any animals using /npc mount. But the thing is, the animals dont rotate with the player bcs the devs were too lazy to add that.

#

So how would I change the animals rot to the players rot

#

But only the animal theyre riding

twilit roost
#

Entity#lookAt
afaik

undone yarrow
#

Then the entity just looks at the player

#

right?

twilit roost
#

yeo

#

oh you mean it like so

#

welp use nms?
change pitch and yaw

undone yarrow
#

The citizens plugin also has a command for that, but when you're riding an animal, it gets confused bcs you're on top of it and it just doesnt work

undone yarrow
#

nms?

#

Im only familiar with no mans sky

twilit roost
#

Net Minecraft Server

dry yacht
twilit roost
#

the rabbit hole of all the pain

undone yarrow
dry yacht
undone yarrow
#

Oh

#

lmfao

dry yacht
#

I guess that the whole thing rotates if you change the yaw, it should

undone yarrow
#

Yeah, it sounds possible

#

My last question (I swear, then I'll piss off): is it possible to add acceleration to animals? So when you're riding them, and you go forward they slowly go faster and faster

twilit roost
#

you can change their velocity

rapid topaz
#

just use orse horse = (Horse) entity;

        // Disable horse jumping
        horse.setJumpStrength(0);
#

to disable horse umping

undone yarrow
twilit roost
#

so via some timers you can accelerate

rapid topaz
#

nah they left

undone yarrow
#

shit man, sorry

twilit roost
dry yacht
rapid topaz
#

yeah 😭

rapid topaz
undone yarrow
undone yarrow
rapid topaz
#

what if it wasnt???????????????

twilit roost
#

*remove that thank you

undone yarrow
rapid topaz
#

and then change velocity

rapid topaz
#

this might work idk: vehicle.setVelocity(vehicle.getVelocity().normalize().multiply(newSpeed));

undone yarrow
#

I need to remember not to add a speed limit

#

Just watch them players fly by

rapid topaz
#

not speed limit?!

undone yarrow
#

Welp now I know everything I want to do is (most likely) possible, Ill get back to dying

tardy delta
#

whats this dude coding in

quiet ice
#

jGrasp?

tardy delta
#

yah looks like that

dry yacht
#

Dude, those names are... one of their kind, xD

worldly ingot
tardy delta
#

some dude sent his coding assignment

worldly ingot
echo basalt
#

congratulations choco you have eyes

dry yacht
#

Surely not this way

worldly ingot
#

SURELY NOT

tardy delta
#

Kittysvars4Lup... 🤔

#

7.java is pretty interesting too

worldly ingot
#

I wasn't aware that was possible

#

I don't actually think it is lol

dry yacht
#

Maybe it's just a compiler check which you can bypass, haha

tardy delta
worldly ingot
#

Well to be fair, file name doesn't necessarily have to equal the class name I don't think

#

Your IDE tries to force that to be the case but I don't think the JVM has any explicit requirement of that

dry yacht
#

Would be interesting if you could - let's say - compile class x7, then patch the binary to substitute x7 for 7 and then load the class using reflection as 7. Maybe it just does not matter if the identifier starts with an alphabetic character.

tardy delta
#

if its a non public class the file name can be different than the class name iirc

dry yacht
tardy delta
#

oh

feral coral
#

Hello guys
anyone know how to fix NAN health problem?

tardy delta
#

show code

#

are you dividing by 0?

feral coral
#
@EventHandler
    public void onRespawn(PlayerRespawnEvent e){
        Double health = e.getPlayer().getHealth();
        if (Double.isNaN(health)){
            e.getPlayer().setHealth(20.0);
        } else if (Double.isInfinite(health)){
            e.getPlayer().setHealth(20.0);
        } else if (health < 1.0D){
            e.getPlayer().setHealth(20.0);
        }
    }
#

e.getPlayer().setHealth(20.0); is't not working

tardy delta
#

man where are yoy i cant see you

#

define notworking, health is never going to be nan tho

feral coral
#
if (Double.isInfinite(health)){
            e.getPlayer().setHealth(20.0);
    }
#

this is working (i have try, use if working send message console)

eternal oxide
#

why are you testing anything? just e.getPlayer().setHealth(20.0)

tardy delta
#

looks like im sending messages to myself

feral coral
#

bruh

eternal oxide
#

silly names

feral coral
#

humm ok bro

#
if (Double.isInfinite(health)){
            e.getPlayer().setHealth(20.0);
    }

this is working (i have try, use if working send message console)

tardy delta
#

💀

feral coral
#

mean is i want make fix player health system

#

but its not work (mean e.getPlayer().setHealth(20.0); line not work)

rapid topaz
#

why not make a variable for e.getPlayer()?

tardy delta
#

bruh whats not working

rapid topaz
#

i dont get it

#

if it is not working it has to be with calling the function in main class

feral coral
rapid topaz
#

why isnt the line working?

tardy delta
#

shouldnt you be modidying event.setDamage or smth?

#

i have no idea whats going on

rapid topaz
#

me neither

feral coral
rapid topaz
#

can you explain

#

pleae

#

please

#

what are you trying to do

tardy delta
#

uhh other plugins?

feral coral
#

fix player NAN health

feral coral
tardy delta
#

plugins modifying it

rapid topaz
#

the only way it can be NaN is if other plugings (or yours) is modifying the health

dry yacht
#

result=Hello, world, class=class 7

System.out.println("result=" + c.getMethod("test").invoke(instance) + ", class=" + c);

Yeah, I guess the JVM accepts classes with the name 7, lol

tardy delta
#

hmm

dry yacht
#

There's no reason not to. It's just a convention because of tokenizer/parser ambiguities, I guess

tardy delta
#

doesnt a mac has screenshots? 💀

analog thicket
#

CMD + Shift + 4 i think it is

tardy delta
#

dude hasnt found it yet

analog thicket
#

-.-

dry yacht
#

4 or 5, yeah

analog thicket
#

and 3

#

i think

dry yacht
#

and 3, yes, for full screen

analog thicket
#

yep

dry yacht
#

4 for area, 5 for recording

analog thicket
#

4 and 5 are kinda the same

tardy delta
#

mac users

dry yacht
#

yeah, 5 is an extension of 4

analog thicket
#

Only using mac for school

#

I just like the way the operating system is for school work

tardy delta
#

world.spawnEntity?

#

use the method that takes in a class and consumer or smth

chrome beacon
#

Yeah as FourteenBrush said use the spawn method that takes a consumer

#

Otherwise you will spawn the firework and then modify it

#

It's better to create the entity that you want and then spawn it

dry yacht
#

The magic can actually be substituted by using the fancy ass builder, xD

terse ore
#

I am forking a plugin but it uses maven, never used it tbh, which command should i use for building it?

dry yacht
#

Yep, it's quite nice to use. I do the same with my reflection handle predicates. I have builders for them. It's a treat.

terse ore
#

ty let me try

#

fuck, error

tardy delta
#

then forgetting one param and regretting

ivory sleet
#

Map<String,Object> :>

terse ore
#

I needed to use clean install

tardy delta
#

still finding out if thats the way to bind an inv to a block or what

#

inventory is probably nbt though

ivory sleet
#

Idk nothing bout minestom tbh

#

Well I used to know some stuff

quiet ice
#

It's been ages since I last touched minestom

rigid drum
#

the fact that so many people talk about that makes me pretty sad

quiet ice
#

Well I did update one of my minestom projects recently, but that is about it

dry yacht
# tardy delta then forgetting one param and regretting

Yeah... that's the one thing I dislike about the builder pattern, which is not the fault of the pattern, it's just the way it works. You're not forced to pass all needed parameters, as dispersion is it's goal, so you need to check your state in the final "build" step yourself. But other than that, they are still great.

quiet ice
#

smh, not having descriptive error messages

ivory sleet
quiet ice
#

It still feels like it's not being used though

#

But I guess that is because almost all fun projects using minestom are closed-source for some reason

rigid drum
#

IMO it's just a shame

#

if they are going to make something so hard to use

#

then at least make it different to nms

#

not a clone

quiet ice
#

I know that you can blacklist the completion of such packages on eclipse - IJ probably can do that too

ivory sleet
#

are they even following the footsteps of nms?

dry yacht
quiet ice
chrome beacon
rigid drum
dry yacht
#

That's how I feel when I get an java.awt.List

#

Or a NMS import when I desired a bukkit class

#

It just hurts...

ivory sleet
# rigid drum yes

maybe, that's a good selling point some extent, like being spigot devs familiar with the api design somewhat

#

but cant tell since I havent worked with minestom, so would just be speculating

quiet ice
#

You pretty much had no autocompletion when working with swing thanks to that

dry yacht
#

Wasn't that list configurable?

quiet ice
#

it was (and still is) - but good luck knowing why some class is randomly missing

rigid drum
dry yacht
#

IntelliJ sometimes just imports stuff on it's own it seems like, that really sucks. What also sucks is when it decides to merge multiple imports into a wildcard import which shadows the member you're trying to import, haha

#

IntelliJ is just a headache, tbh

chrome beacon
ivory sleet
dry yacht
dry yacht
rigid drum
ivory sleet
dry yacht
chrome beacon
dry yacht
#

Alright, no worries, I'll open the G then

ivory sleet
chrome beacon
#

You should be able to search for imports

#

In the settings menu

ivory sleet
dry yacht
#

I entered "intellij disable" and first guess was "intellij disable wildcard imports". I'm feeling watched.

quiet ice
#

Minestom is really only usable for Minigames and stuff. Wouldn't use it for "normal" survival play anytime soon

dry yacht
# ivory sleet yeah, but even so, not ignorable at all

Didn't say that, but people then cannot complain about new software falling into the footsteps of their predecessors if they don't have the balls to finally break the chains and go into the right directions. People who just want to get stuff done and don't care about efficiency or readability wouldn't be my users, if it was my project.

ivory sleet
#

ye

rigid drum
quiet ice
#

The only thing I don't like about Minestom is that they got rid of their integrated Mixin support - which means that I am the only one finding and fixing the bugs that that system had.

rigid drum
#

and I know there are a ton of pitfalls and it's not easy

#

but eve if what I was working on wasn't perfect

#

it was NOTHING like nms

chrome beacon
quiet ice
chrome beacon
#

It works fine

quiet ice
#

Mixin is annoying to use outside Launchwrapper (so annoying that I'm reimplementing it)

chrome beacon
#

Basically you create your mixin classloader and then load minestom using it

dry yacht
# rigid drum and I know there are a ton of pitfalls and it's not easy

I'm already knees deep into so many ideas, projects and research things that I literally cannot afford going into that rabbit hole. Otherwise, it would be something I'd be working on, I think.

I still like to imagine the server as a big state machine, a big packet switch with state, which receives and sends out packets over sockets and just has to simulate the game according to how mojang specified it. That does not at all dictate how the actual control flow has to work out. The developers are still in charge of designing that architecture. We could do so much better than what we currently have.

eternal night
#

mojang code is perfect 👍 stop spreading anti mojang propaganda kappa

quiet ice
#

Other issues are that code modifiers cannot be removed or added while transforming classes (big no-no in concurrent environment), JPMS being ~fun~ (Mixin mandates Launchwrapper AND Java 16+ on that regard - but the fewest care about JPMS anyways), Mixin being a annotation processor that runs by default under maven (you only see issues once you have Mixin annotations in your jar though) and much more

chrome beacon
#

You really should use the spawn method that takes a consumer like we showed earlier

dry yacht
#

Yeah, it's fine, but you're still adding the entity to the world before customizing it. It's not ideal, but it works.

echo basalt
#

oh shit exerosis is here

#

makes me remember the good ol' times

rigid drum
# dry yacht I'm already knees deep into so many ideas, projects and research things that I l...

yeah I agree, I had a system that wasn't based around these big god objects that minestom and NMS have. For example instead of having some huge registry of items, and player.world.everything etc.
An "item" is just a simple data class that inventories care about. The actual logic is not tied to them in any way... instead in order to "construct" one you might call a function like:
val steak = ItemFood(<id for steak>) {
//on consume do whatever.
}
And now in whatever context you called that in, the logic to actually make that item do something is now present and enabled. At the time this particular system was going to be rewritten but here's an example:
https://sourceb.in/KL9PioHkko

So where in spigot you "build down" to make a minigame... cancelling all the default logic and events... in my system (glayve) you would build up... there would be no logic until you specified it. Lets you get closer to a "properly designed" system... better following design principles... but it was well past the limits of java and was pushing what kotlin was able to do as well.... context() would have helped massively but only was added when the project was already dying.

dusty sphinx
#

what is the difference between the fork of Fernflower on Spigot mc's bitbucket and the base Jetbrains Fernflower because I can't build it saying it needs a dependency net.md-5:determiner:0.1

untold jewel
#

I'm having a hard time getting the Player target = Bukkit.getPlayer(args[0]); information into another class. What should I do?

echo basalt
#

Dependency inject

#

?di

undone axleBOT
echo basalt
#

or make a method with params

rigid drum
echo basalt
#

TSC

#

Pretty sure I've never spoken to you in IRC

#

I was an annoying lil kid starting out

#

and pretending I was more mature than I really was

#

and you were there... doing what I do nowadays

#

helping others

#

I was tryna make a server from scratch and didn't even understand what a mask was

#

or how bytes worked lmao

dry yacht
echo basalt
#

I was like

#

13

rigid drum
echo basalt
#

I had no profile pic

ivory sleet
#

exe, r u still in contact with the guy with purple gorilla pfp

echo basalt
#

I also kept talking about how shit my laptop was and how I wanted to buy a new one

#

most of our talks were around 2019 I'd say

#

I was also the guy that made my own schedule builder that was like a copypaste of yours

#

I looked up to you man

dry yacht
# rigid drum yeah I agree, I had a system that wasn't based around these big god objects that...

Sounds like a nice and new approach to things, inversing the "building direction". I personally wonder whether a new implementation should even stick to the original language used - Java. But I'm not aware of any massively better languages, other than maybe Jai, Zig, Rust or the like. I'm not sure if Java really is the limiting factor, or if those limitations would just signal overcomplication to the person running into them. I really have a lot of respect for people who start massive projects like these, as I'd personally just feel crushed by them on my own.

rigid drum
#

I mean in terms of performance obviously other languages like zig (which IMO is too early to use but very interesting conceptually) would probably be better.

#

But I don't think it's the performance of java that's lacking, it's the design.

rare rover
#

what's wrong with this?

@Override
    public void hideHologram(Hologram hologram, Player player) {
        List<HologramLine> lines = hologram.getLines();
        ServerPlayer plr = ((CraftPlayer) player).getHandle();
        for (HologramLine line : lines) {
            net.minecraft.world.entity.LivingEntity entity = ((CraftLivingEntity) line.getArmorStand()).getHandle();
            ClientboundRemoveEntitiesPacket packet = new ClientboundRemoveEntitiesPacket(entity.getId());
            plr.connection.send(packet);
        }
    }```
#

wont remove the entity

#

not sure why

echo basalt
#

If I were to make a server impl I'd probably abuse the hell out of lambdas

rigid drum
#

To go about it the way I was, while following DIP and the other solid design principles... you might end up with something like:

final var item = SomeItem(parentScope, world, players, id, meta, tags, useCallback, anotherCallback)
#

but people hate that, so they start reaching for hackier and hackier solutions, or they start grouping together player and world... player.world, world.players, etc.

#

So they are compromising design for usability

echo basalt
#

I'd probably just

#

abstract it behind 25 layers

rigid drum
#

In kotlin we can make parent scope, world and players a context... so it's passed around implicitly... for me world was literally just this interface:

interface World : Streamable {
    operator fun get(position: Position): Block
    val onChanged: ChangeEvent<Position, Block>
}
interface MutableWorld : World {
    operator fun set(position: Position, block: Block): Block
}
#

But that's ok because other "world responsibilities" can be handled via other contexts.

dry yacht
rigid drum
#

Ultimately if you are clever enough you have something easier to use than spigot... but infinitely flexible by comparison.

#

I haven't ever used Jai, I saw it on hacker news at somepoint and that's it.

dusty sphinx
dry yacht
#

I'd love to have a buildsystem which just uses the same language as the actual code. Maven, gradle, etc... they just suck. Needless abstraction.

rigid drum
#

But I think complexity is very relative thing. It's hard enough to balance design, usability and performance... sometimes it takes a complicated tool to provide a simple developer experience.

dusty sphinx
#

its really clean with both kotlin and java projects

dry yacht
rigid drum
#

I like gradle on the whole, it has issues but it's nice for big micro service style projects... I hate projects with 50 shell scripts 10 build tools etc. Gradle can replace all of that in kotlin

echo basalt
onyx fjord
dry yacht
onyx fjord
#

Even groovy is better

dusty sphinx
dusty sphinx
dire marsh
#

I like kts but kotlin hurts my brain

dusty sphinx
#

i do like writing in java more, but i HATE writing scripts with it

rigid drum
#

Groovy is the real crime here

onyx fjord
#

👎

dire marsh
#

Tried kotlin once, the way you do the type always messes me up

ivory sleet
echo basalt
#

I still use groovy to this day

onyx fjord
#

This is a kotlin free zone

dusty sphinx
#

and kotlin is more robust then anything like python or typescript could be

dusty sphinx
onyx fjord
#

Kotlin is what rust is to c

#

And that's not good

echo basalt
#

great question

rigid drum
#

I agree rust is yuck prefer C

#

but kotlin I like

echo basalt
#

kotlin replaces verbose with keywords

rigid drum
#

certainly if you are arguing groovy is great and kotlin sucks I'll never see eye to eye

onyx fjord
#

I prefer verbose

rigid drum
#

but I can understand only liking java

onyx fjord
#

Because english

echo basalt
#

java is verbose by design

onyx fjord
#

Java feels like English

dusty sphinx
echo basalt
#

kotlin people arguing that it's better because it's not verbose is tomfoolery

dusty sphinx
#

i have never seen it

rigid drum
#

And I like java myself... it lends itself super well to some styles... Just happens not to be mine

dusty sphinx
#

agreed

ivory sleet
#

I feel kotlin is a bit overbloated with semantic features

onyx fjord
#

Even if it's verbose so what, does it matter to compiler?

dusty sphinx
#

at the end of the day you can ship working and maintainable software with many languages it does come down to what you are doing

ivory sleet
#

and interoperability, which kotlin uses as selling point is far from ideal

orchid gazelle
#

Im just getting eye cancer when seing kotlin code lmao

onyx fjord
#

True

hazy parrot
#

🤓

onyx fjord
#

It has some goofy stuff

orchid gazelle
#

It just looks ugly as hell for me

hazy parrot
#

probably only thing you hate is lambda as scope

rigid drum
#

Sure, but it also has features that I find myself dying for in all other languages.

ivory sleet
#

true

orchid gazelle
#

As well as I hate Python Syntax

dry yacht
onyx fjord
#

I would choose bash any time

rigid drum
#

Also I personally think that the people who are sitting there using spring... other hacky compiler extension/reflection based systems

ivory sleet
#

I mean null safety and coroutines being the biggest features Id use kotlin for

orchid gazelle
#

It just has this... unreadability for me

rigid drum
#

don't have a huge amount of room to say that kotlin is bad, ugly, unreadable

ivory sleet
#

yea

rigid drum
#

it's the people who use pure java cleanly and carefully

hazy parrot
rigid drum
#

that I respect not caring for kotlin.

dire marsh
#

I find the way kotlin handles null super weird, but probably just me using it wrong.

orchid gazelle
#

Like I need my clean satisfying well-readable java syntax structure

hazy parrot
#

its so easy to work with them

onyx fjord
#

Java also has better mascot and logo

dry yacht
ivory sleet
#

and then those who use kotlin and lombok

onyx fjord
#

Kotlin has some oversimplified robot

rigid drum
#

Kotlin technically doesn't have a mascot atm

onyx fjord
#

L

rigid drum
#

nobody liked the thing they made

ivory sleet
#

:>

onyx fjord
#

Wow

#

I think the logo is too complex

orchid gazelle
onyx fjord
#

Fr

ivory sleet
#

JavaSkript?

dry yacht
#

Skript

ancient plank
onyx fjord
#

No sql

#

Yes sql

orchid gazelle
#

Yes sql

dry yacht
#

sqeel

orchid gazelle
#

sql sexy

onyx fjord
#

C hashtag

ivory sleet
#

MySqlScript

echo basalt
dry yacht
#

Look... I'd rather have people use Kotlin than C++

#

Less of a crime

ivory sleet
#

well, Rust instead of cpp

orchid gazelle
#

Both is horror

dry yacht
#

Oh no, not that again

orchid gazelle
#

Bro its a nightmare having to use kotlin for me lol

river oracle
#

so its not just me that thinks rust looks cursed

onyx fjord
#

See plus

river oracle
#

what advantage does kotlin offer besides looking funny???

dry yacht
river oracle
#

oh and extension functions

orchid gazelle
#

Nice emojis, discord!

hazy parrot
#

literally my reason why i choose kotlin when i have option

onyx fjord
#

Minimalistic

ivory sleet
dry yacht
#

Sounds like fun

onyx fjord
#

And has no lactose

river oracle
echo basalt
#

kotlin has such little lactose, its bones shatter when going up the stairs

orchid gazelle
#

Guys we probably wanna go to #general lol

onyx fjord
#

I mean it is programming related

echo basalt
#

nah this is character development

ivory sleet
#

yes, but its just to help devs reduce nested stuff

#

like

river oracle
#

I'm getting programming help

ivory sleet
#

player.customMethod()
instead of
customMethod(player)

river oracle
#

on learing why people think kotling is good

ivory sleet
#

so then u can end up doing
x.y()
.z()
.t()

orchid gazelle
#

Well #general does not load for me anyways lol

ivory sleet
#

which is a bit more readable

echo basalt
orchid gazelle
#

Nah but my smartphone screams to go into the trashcan

river oracle
#

I guess you can do functional programming with Kotling too 🤷🏽‍♂️ but I'm too stupid to use functional anyways

hazy parrot
#
object cout{}
infix fun cout.<<(foo: String) {
  println(foo)
}

fun main() {
  cout << "Hello world"
}
#

❤️

orchid gazelle
#

But no $ for a new phone

river oracle
#

I still don't get how you'd code everything without classes 💀

ivory sleet
#

y2k stop

echo basalt
#

I was thinking about buying a new phone today

ivory sleet
#

u use functional stuff so often

dry yacht
ivory sleet
#

dont even try

river oracle
orchid gazelle
ivory sleet
orchid gazelle
river oracle
#

I do? I thought java enforced oop

ivory sleet
#

like how often do u not touch streams

echo basalt
#

I worked like mad last week and got paid a small fortune

ivory sleet
#

yes but java has adopted functional style

echo basalt
orchid gazelle
#

Bro I'd lose my mind when going to school + working

ivory sleet
#

Optional::flatMap for instance being a monad

river oracle
#

💀 I'd die without streams

ivory sleet
#

which is a functional concept

#

and Stream::flatMap

echo basalt
orchid gazelle
#

Already got days without any free time with just school

ivory sleet
echo basalt
#

it's part of life

orchid gazelle
#

I'd have 0 time for hobbies when working

river oracle
echo basalt
#

well

ivory sleet
#

oh

echo basalt
#

you can just

#

work on some days

#

and enjoy hobbies on others

ivory sleet
#

usually u dont have just functions

echo basalt
#

for example, I work on week days

#

and on weekends I do work + go out for walks

orchid gazelle
#

And also imma go get into depression with only things I don't like in my life lol

ivory sleet
#

but consider a category where morphisms are functions and objects are types y2k

echo basalt
#

you'll still get them

#

just not every day

orchid gazelle
#

Not enough

echo basalt
#

listen man I've been doing this shitty 8am - 6pm + gym until 8pm + work until 5am

#

routine

#

for like

#

3 years

river oracle
ivory sleet
#

yes

echo basalt
#

weekends give you a ton of time

ivory sleet
#

implementation inheritance

#

however

river oracle
#

idk How you'd get stuff done without any abstraction

orchid gazelle
#

Whats the point of having money if not having time to spend it?

echo basalt
#

you do get the time to spend it

#

you can always take days off

orchid gazelle
#

Bro im at the point where I only got 1 free day in the week lol

echo basalt
#

instead of working today, I just chilled at home and went out for a walk

echo basalt
orchid gazelle
#

And if I would do even more things I don't like I could not have sanity anymore

echo basalt
#

I'm telling you, you will find time to do hobbies

ivory sleet
#

@river oracle u have type inheritance still

echo basalt
#

You'll just have to learn to manage your time more efficiently

orchid gazelle
#

I would not psychologicly tank the damage

river oracle
echo basalt
#

on moments you're down bad, you cna just... not work

ivory sleet
#

implementation inheritance

echo basalt
#

what's what I do

orchid gazelle
#

I only have 10 hearts

ivory sleet
#

but in true functional programming, no inheritance

river oracle
ivory sleet
#

just functions, types and composition

echo basalt
#

resistance IV

ivory sleet
#

well, think about it

orchid gazelle
echo basalt
#

not really

orchid gazelle
#

For me, always

echo basalt
#

I got paid last friday and already have plans to renovate half my room

ivory sleet
#

In Java people talk about inheritance being one of the main concepts, yet we so often advocate composition over inheritance

echo basalt
#

so imma work less this week, and yeet out half my stuff

#

wakatime lets me graph my mental health fairly accurately

orchid gazelle
#

Imma just not work for 12$/hour in a job I don't like

echo basalt
#

you can just... charge more

orchid gazelle
#

And im just too dumb to be able to market some plugins I create

#
  • illegal
echo basalt
#

I charge 25$/hr+ for development

orchid gazelle
#

And nobody would pay me

echo basalt
#

not with that attitude

orchid gazelle
#

Guess what, nobody would pay me 5$ an hour lol

echo basalt
#

I'm a 17 year old kid earning 4x my national average income / hour

#

Sure you're still learning

#

but so was I like 2 years ago

orchid gazelle
#

And you are actually good enough to market your skills

echo basalt
#

I posted a premium plugin on spigot

river oracle
echo basalt
#

and took it down after 1 year

#

0 sales

orchid gazelle
#

Listen, I am coding for over 5 years now. And im still bad at it

echo basalt
#

I've been coding for over 11 years and only now are things starting to flow

river oracle
#

I've been coding for almost 2 years now I'm happy to say 😭 idk wtf is going on

echo basalt
#

have a lil trust in yourself

ivory sleet
#

I like structural

#

like how typescript works

echo basalt
#

I've met this guy with 0 coding experience

river oracle
#

never used typescript

orchid gazelle
#

Guess what? If I post a premium plugin, the government comes and bonks me for doing that lol

echo basalt
#

Got him to start coding about 13 months ago

orchid gazelle
#

And also nobody would buy it

echo basalt
#

He's now my employee and does most of the code at work

ivory sleet
#

but object orientation is a very nice way of splitting up a problem into smaller problems

#

and solve that big problem bit for bit