#dev-general

1 messages · Page 48 of 1

inner umbra
#

Not really comparing... they both have sperate use cases. The use case I'm speaking about however corresponds to both.

#

I really don't like the structure of sql anyways.

rotund egret
#

2mb being too big is crazy, you on a floppy disk?

#

Also Mongo if you're using json already tbqh

#

I'm not sure how your use case is both relational and non relational, but I trust you know better

#

690 kb is too much?
Jesus floppy disk won't come out of the pc and can't afford another huh?

inner umbra
#

2mb being too big is crazy, you on a floppy disk?
Never posted a resource on spigot huh?

ocean quartz
#

Can't Spigot go up to 4.5MB? 2 is nothing

inner umbra
#

Last I checked its limited to 2mb

#

If it has changed let me know.

remote goblet
#

i remember it being 4.5mb

ocean quartz
#

Just uploaded a 2.8MB as a test and it worked, I believe it has been 4.5MB for years

inner umbra
#

Oh nice.
That works for my plugins then lol. Not for base java though.

rotund egret
rotund egret
inner umbra
#

As in not a plugin.

rotund egret
#

Ok?

#

Actually nvm, if you're not problem solving I'm not wrenching answers out

inner umbra
#

I think you were misunderstanding the conversation anyways.
To clarify though I was saying like just a normal jar not a spigot plugin.

rotund egret
#

Yeah no shit

twilit sparrow
brazen ether
#

make your own

humble prism
#

130 kb

inner umbra
#

It would but read 11 messages ago

humble prism
#

ah

crude cloud
#

that's not a driver

#

you still need a driver for whatever engine you're running, hikaricp is a condom that wraps the driver

rotund egret
#

They only need floppy disk sizes for their regular jar now

twilit sparrow
#

im not an artist at all for that matter

rotund egret
#

Sheesh that's crazy must be hard work

twilit sparrow
#

My bad i chose a different career path?

brazen ether
#

probably one of the most braindead things imaginable

#

download blender

#

look up 10 minute youtube tutorial

#

render

#

done

twilit sparrow
#

Could say the same things about minecraft plugins and yet theres people paying me half their rent

brazen ether
#

that's not really that much at all

#

and in this case, moving around a rig in blender isn't that difficult

rotund egret
twilit sparrow
twilit sparrow
barren ledge
#

It is

twilit sparrow
#

wdum it is no it isnt

#

not with a plugin

#

that would either be a custom texture pack with custom items or a mod

barren ledge
#

I asked a another user and he said it is not impossible but he can't do it

twilit sparrow
#

plugins dont posess the ability to add new resources to the game

barren ledge
#

Do you know how use cpm

#

To

twilit sparrow
#

cost per mile?

#

no clue what that abbreviation is

#

@barren ledge maybe you are mistaking plugins with mods

barren ledge
#

And

#

Also can you make a plugin that adds tails horns and ears

#

Or onky on mods

#

Only

twilit sparrow
#

you can do that with resourcepacks

#

not with plugins

#

take a look at hypixel skyblock

#

thats about the most you can do with just plugins

barren ledge
#

How with resource packs

twilit sparrow
#

you can make so called „server resourcepacks“ that get downloaded when you join a server

#

there you can change textures or add new textures to existing things

#

for example you could make different stone varients

#

or horns if you please

#

but they would essentially just be other items with a new texture

barren ledge
#

I dont think that would work i made some resource packs

twilit sparrow
#

yes it would

#

this is my job you can believe me xd

barren ledge
#

Can you make me please

#

Idk how

twilit sparrow
#

theres countless tutorials online

barren ledge
#

Okay

twilit sparrow
barren ledge
#

Ik how to do that

#

I have one installed

twilit sparrow
#

the what exactly is your question

barren ledge
#

U said u can add horns and tails to resource packs

twilit sparrow
#

yh

#

take a random item and turn it into horns

#

and put it on someones head

barren ledge
#

Like a pumkin

twilit sparrow
#

u can use any block

#

all of them can go on heads with commands/plugins

barren ledge
#

How

twilit sparrow
#

you

#

set it as their helmet

#

lol

#

p.getInventory().setHelmet(itemstack);

barren ledge
#

And the tail

twilit sparrow
#

the same way

#

u could also modify the player model itself

barren ledge
#

Idk yet i am not that skilled

twilit sparrow
#

im sure u can find existing trxtures and models for that online

#

otherwise

#

tutorials

inner umbra
#

JDK-22```java
public class RunTest implements Runnable {
@Override
public void run() {
System.out.println("Ran...");
}
}

public static void main(String[] args) {
Thread.startVirtualThread(new RunTest());
}

prisma wave
#

virtual threads are daemon threads i believe, i.e. the jvm won't wait for them to complete

inner umbra
#

So if I want it to wait for them I should join?

prisma wave
#

yeah

inner umbra
#

👍

oblique heath
#

weird that they would do both and also name them differently 😔

potent nest
#

what

#

vthreads are always daemon threads, platform threads only when configured as such

prisma wave
#

Yeah they’re different things

sour bone
#

he got hacked, not sure what yall want to do with him

stark niche
sour bone
#

haha yep thought it looked cool I don't play val though

rotund egret
#

meatballs

obtuse gale
#

Why did this stop working after adding requiremenets and left click commands

ocean quartz
obtuse gale
#

sorry

ocean quartz
#

No worries

sour bone
#

maybe I'll click it next time 💀

rotund egret
#

Discord has both a block and report feature 😮

opaque willow
#

anyone wanna help me with mineresetlite? Plugin itself works fine, but when i try to create a mine it says internal error occurred.
My worldedit is up to date and on my version

potent nest
#

for starters you could share your logs

opaque willow
#

[15:26:11 WARN]: Legacy plugin MineResetLite v$version$ does not specify an api-version.

potent nest
#

you still didn't share your logs

opaque willow
#

Sorry

#

But my next question I would like to know if there is a way to disable players pvp with just a command?

#

like /pvp

tawdry monolith
#

If you have deluxecombat try /togglepvp all

woeful flame
#

Is there any good and secure way to hide the username and password in a spigot plugin? As we give the username and password to the database when using JDBC to connect to a database? I know hardcoding it into the code is not very nice, and anyone can access the database. The plugin is required to read and write in my database, so I can't even let people configure it via the config.yml. I heard about some Java script restful endpoints, but I'm not really familiar with Java script.

rotund egret
#

Why can't they use a config...?

#

Oh like it's a singular non configurable database?

cinder flare
#

Yeah sounds like you need some kind of API backend to cover this database

woeful flame
woeful flame
safe crescent
#

@torn birch you disiliked in #showcase , i just wanna know is there anything i can improve on? or add onto?

#

sorry if i seem like pestering

lament crescent
#

How can i make my items adder furniture
so that normal player cannot break it. only players with a specific perm can break

torn birch
safe crescent
#

hm i see

#

what part is specifically too detailed, the cap badge or the beret

torn birch
#

Hmm the beret

#

Its probably better to have a cube tilted or something

#

But the badge is hard because it needs detail to be recognizable

opaque willow
#

Anyone know why I can't open enderchests?
It's not worldguard, because it doesnt say anything

ivory crow
#

Whats a good design website/software for websites? I'm looking for one thats free and lets you download files.

oblique heath
#

html 😏

#

jk um i think figma is the popular one, not sure if it is free

ocean quartz
#

Figma is free yeah

crude cloud
#

me resisting the urge to say figma balls dviperSweat

sly sonnet
#

Ahahhah

flint wagon
#

Hey guys, someone know if there is any event (minigame) plugin for 1.20 servers? Like few events that starts at a specific time of the day and everyone can join for rewards. (Spleef, tnt run etc etc)

ocean quartz
flint wagon
#

yeah my bad

opaque willow
#

How to fix "invalid player id"? some people cannot join on my server

oblique heath
#

are you using bungee (incorrectly)?

brazen ether
brazen ether
#

AI is gonna replace developers, the AI:

wind patio
#

funny how it "realizes" the word has 2 r's

#

when in reality it's basically just repeating what you said

brazen ether
#

really awesome how we've poured trillions in this technology

inner umbra
#

"Glorified autocorrect" is all GPT is lol

brazen ether
#

yes

stark niche
brazen ether
#

only if you define "smartness" as something completely devoid of thinking

#

AI can't even count to 3

brazen ether
stark niche
#

Gabe can't count to 3 too

brazen ether
#

most special needs people could probably do logic exercises better than a gpt

rotund egret
#

hahaha most funny joke thats a decade old

#

Managed to store the Entities UUID on the player for retrieval, so it works as a select system effectively yeehaw

wind patio
#

what now

#

isnt it just target.getPersistentDataContainer().set(<some-foo-namespaced-key>, PersistentDataType.STRING, "bar")?

rotund egret
#

That looks like shit, I'm implementing this in Sponge though, so no.

#

player.offer(key,UUID) :^)

wind patio
#

when something looks like shit, you make a method
SomeWeirdUtilClass.set(player, "key", "val")

rotund egret
#

uhh okay?

#

Happier not having to I guess

wind patio
#

me when I have to do something extra that takes like 10 seconds -> 😠

rotund egret
#

I don't know why you're being hostile, I'm not using bukkit so it's kinda moot?

wind patio
#

nah it's all good

#

I just haven't had my coffee yet

inner umbra
#

Sips Green Zero Sugar Monster Energy Drink

rotund egret
remote goblet
#

thats so swaggy

brazen ether
wind patio
#

singleton my ass

#

(sorry)

oblique heath
#

ngl util classes are based

crude cloud
#

what if
hear me out
everything was a util class

#

no data

#

just methods

#

functions, even

cinder flare
#

but then where does the data go 😭

crude cloud
#

data?

#

where we're going we don't need data

safe crescent
#

thats just my way of looking at it

#

tho tbh if ai does replace someones job the business should be responsible with paying that worker money to help them live for a bit whilst they find new work

#

and be forced to pay like an ai tax

brazen ether
brazen ether
#

AI will help with boilerplate and repetitive tasks

safe crescent
#

2 pings

elder smelt
#

anyone know someone who’s good at recording videos of a minecraft server for tiktoks?
Like a showcase of my smp
But in a tiktok video?

forest pecan
brazen ether
#

then promptly deleted that

safe crescent
#

no embeds 😭

safe crescent
#

ty

safe crescent
#

:(

brazen ether
#

begone

safe crescent
#

no

pastel imp
#

am I the only one with this issue?

#

I try relogin but it does not work

rotund egret
#

Someone didn't hear about the security issue!

rotund egret
# pastel imp am I the only one with this issue?
The JetBrains Blog

A new security issue was discovered that affects the JetBrains GitHub plugin on the IntelliJ platform, which could lead to disclosure of access tokens to third-party sites. The issue affects all IntelliJ-based IDEs as of 2023.1 onwards that have the JetBrains GitHub plugin enabled and configured/in-use.

pastel imp
#

I already updated lol

#

I will just restart

crude cloud
#

it isn't just about updating lol

#

did you even read the blog post?

pastel imp
#

yeah I already got it working

inner umbra
#

Can you read the current line from BufferedWriter?
I'm trying to see if the current line is blank but can't find a way to check it.

potent nest
#

it's a Writer, not a reader

inner umbra
#

Also a ... "buffer" lol
Was hoping I could just do lastLine() or something.

potent nest
#

yeah and the buffer might be empty without any knowledge what the previous line was

pastel imp
wintry plinth
#

It’s on the agenda but a lot of things happening

pastel imp
wintry plinth
agile galleon
#

Why can I build my project from the command line, but when using the reload button within IntelliJ, this happens?

half harness
#

¯_(ツ)_/¯

#

did you try restarting IJ?

pastel imp
agile galleon
pastel imp
#

for instance, my "secret" project indirectly is improving already exiting tools while it also has some new things tbf

half harness
wintry plinth
pastel imp
wintry plinth
rotund egret
#

I loved when apple improved on the C connector by making it less accessible, truely the best version

pastel imp
wintry plinth
brazen ether
#

that moment where it is actually useful to create an AbstractProviderFactory

wind patio
#

they are so quirky

kindred hatch
pastel imp
wintry plinth
kindred hatch
agile galleon
pastel imp
#

why tf does gradle act like a bitch

#

having issues with it now too

#

lol

agile galleon
#

It's not Gradle afaik

#

because it works in the CLI

pastel imp
#

for me it seems to be

agile galleon
#

it's just IJ messing w me

desert horizon
agile galleon
#

What version are you using?

#

I'm still on the 2 year old 4.1.2

#

Which is the latest

desert horizon
#

Don't ask me

pastel imp
#

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65 I swear I changed everything to java 21 already...

#

fking bitch

agile galleon
pastel imp
#

I swear I am gonna kill someone

agile galleon
#

yeeeeeeeeeeees

#

just upgrade to gradle 8.8

pastel imp
#

bruh

#

gonna try that but I think 8.8 will break some stuff on my build.gradle lol

#

love gradle 8.8

#

💀

#

works on 8.5 but not in 8.8, does not specify what's wrong just says it can't be created

#

like

agile galleon
#

update your plugins bruh

pastel imp
#

tf

#

I did

#

jokes on you

#

even with 8.8, still getting the same issue 😭

#

issue only happens when I use the shadowjar task

#

🤔

#

It appears to be a problem with FancyHolograms api?

cerulean ibex
cerulean ibex
agile galleon
#

no way

cerulean ibex
#

?

#

whyd you ask?

pastel imp
#

any reason why there is a fork of it?

#

lol

onyx loom
#

original plugin is going to be discontinued

ocean quartz
#

Did anything ever happen to moving it to the gradle org? I know they mentioned a possibility of that happening

woeful flame
tired meadow
#

@lone viperyou need developer

crude cloud
#

lol

pastel imp
#

lol

tawdry monolith
#

Hi guys

#

Is someone willing to make me an free plugin a_skulldead

#

It's just a plugin which sends some action bar upon typing some command

static zealot
tired meadow
#

@knotty steeple You need beta tester?

pastel imp
#

I am getting pissed at FancyHolograms' API

#

fking hell

#

tried everything but nothing updates the holograms.... (trying to move an hologram programatically)

wind patio
#

idk its open-sourced if it's not working modify the code to work

pastel imp
#

that does no help lol, I need to specifically use the exact public version

#

can't just go an modify whatever I want lol

rotund egret
#

Use display entities, super easy to move :^)

pastel imp
#

can anyone quickly explain how papi expansions work? IE how papi loads external jars without the need for them to be a plugin. Is it with reflection or...?

inner umbra
pastel imp
inner umbra
#

Just to get an idea.

Basically you just run the expansions "main" method.

#

For example spigot runs the onEnable method. (As well as others but yeah)

rotund egret
#

Java programs when they have an entrypoint 🤯

cinder flare
#

then yeah it just scans for classes that implement PlaceholderExpansion or whatever and loads em

rotund egret
#

Event filters are super dope

somber tulip
rotund egret
#

SpongeAPI provides it for their events

somber tulip
#

Oh that’s awesome wow

rotund egret
#

Yeah I've used Root and First for awhile, but Has and Supports are pretty dope too.

wind patio
#

anyone here familiar with apache pulsar? When I restart Spring application, unconsumed messages from topic X all go to retry topic. Is this normal behavior?

fierce ember
#

Hello anyone knows thier way around vulcan? i need help optimising it

potent nest
#

you mean Vulkan?

half harness
#

probably vulcan

#

if it's vulcan then probably ask in their discord

placid rose
#

Offered me 150$ for a project then blocked me when I was close to finishing

stark niche
static zealot
pastel imp
#

the 5$ guy?

#

if he went from 5 to 150

#

quite obvious scam

#

lol

placid rose
placid rose
pastel imp
#

same goes the other way ofc

placid rose
#

So its justified?

pastel imp
#

justified? Eh not really ethically

#

Is what israel is doing in palestine justified? I don't think we need to go deeper into the conversation

placid rose
#

To waste someone's time and resources just because you don't like what his country is doing?

pastel imp
#

this is not a political server anyways

pastel imp
#

it's his choice after all

placid rose
#

Just saying that this guy isn't reliable

pastel imp
#

Yeah totally fair

#

as Blitz said, you can just dm barry and provide proof

#

and it will be handled

placid rose
#

This is discord, not politics

placid rose
#

I already reported him in the past

pastel imp
placid rose
remote goblet
#

i appear to have a doppleganger sniff

placid rose
#

I see discord as a neutral place where no controversial topics or politcal discussion should be raised, especially in a minecraft server

remote goblet
#

whatever reason they did it is quite irrelevant to be honest in this case

#

unless there was malpractice on your end which Shruge wasn't involved dont know

ocean quartz
remote goblet
#

the actual answer to their request is super simple

#

/paper dumplisteners is a wonderful command

pastel imp
pastel imp
#

If it indeed was for that exact request, the other guy should probably report him then, asking 150 bucks for something like what was asked is hella scam

remote goblet
#

i feel like the actual probable case is that they said 150 and someone was like yo you're charging like way too much for this lolxd

pastel imp
remote goblet
#

yeah thats true

pastel imp
#

if it was, and he actually asked for 150 bucks, then tbh hella deserved

#

lmao

remote goblet
#

although that dude has a super strange bio

pastel imp
#

the other Ori or the request guy?

remote goblet
#

request guy

wind patio
#

💀

#

chop em off

#

dev general arrrghhh!!!

pastel imp
#

wth

placid rose
#

He wanted a full gem plugins, designed and fully custom

#

It wasn't a joke at first he really needed it

placid rose
#

I sold it to some other studio after he abandoned me but I was still lost overall

rotund egret
#

RIP

safe crescent
#

anyways, plugin devs i wanna know to what extent are boats codeable in 1.19.4 paper mc

im not an experienced plugin developer in any way nor do i understand minecrafts limits so im sort of hoping to hire someone to make me a plugin that can take custom modelled boats from blockbench and put them in my server

#

i just gotta know how doable is it

pastel imp
#

doable

safe crescent
#

ah ok

pastel imp
#

just like helicopters

#

and planes

#

works in a similar way

safe crescent
#

is it possible to like have it so if the player is in the boat theres like a way they can control boat weaponry

pastel imp
#

questionable

#

I mean, tanks exist

#

does smt like that

#

sadly not open sourced

safe crescent
#

ah i see

safe crescent
#

ah i see

#

ill have a look

#

ty

ocean quartz
#

Wrote my own language highlighter and it turned out pretty well, will parse the string and spit out html ready to be formated, here is an example PepeHappy

#

Just realized the for loop on the kotlin example is wrong PepeHands

pastel imp
#

very nice

#

was probably a fun project

#

I assume

#

xD

ocean quartz
#

Quite fun if you ignore some annoying cases, for example trying to differentiate between function and keyword, and stuff like that, I just made it validate after parsing, if both tokens are present take only the higher priority, which in this case would be a keyword

#

It's not very complex, but it doesn't need to since it's just for small documentation

pastel imp
#

how did you code it?

#

vanilla js or what?

ocean quartz
#

Kotlin :)

pastel imp
#

why am I not surprised

#

xD

ocean quartz
#

Though that is not live highlights, I mean I could compile it to Kotlin Js if I needed it to be live, but in this case the html is created when the markdown is parsed and then stored and served when needed so no js bundle or anything at all needed on the browser side

crude cloud
#

vanilla js 💀☠️ ⚰️ 👻

sturdy zinc
#

is there a way to get world name without UUID

crude cloud
#

huh

sturdy zinc
#

after I hit enter it didn' tmake sense, but then I said it it does

#

what I think I need to do is to use a constructor

half harness
#

Bukkit.getWorlds().get(0).getName()

#

that's how you get world name without UUID but I'm not sure if that's what you meant

sturdy zinc
#

yes, but thats hard for me if I'm not sure what I want

#

thanks testing now, hope that fixed it

#

it did not return a world

half harness
crude cloud
#

I'm pretty sure getWorlds will give you the worlds

half harness
#

well that too 🥲

half harness
sturdy zinc
#

I think the issues is where I'm attempting to get the world

crude cloud
#

do you have an error? a stack trace? code to share?

sturdy zinc
#

yes and Bentobox says it's from a null world

half harness
#

what does the uuid represent?

#

in each of the methods

#

is it the player's uuid?

sturdy zinc
#

yes

half harness
#

can you show the code of BentoBoxHook?

sturdy zinc
#

I think a getter is what I need to use

half harness
#

line 32 - getOwner - is this not erroring?

#

also I don't really know much about your plugin - but the world that you need is whatever world the bento box islands are located, not what I said on line 12 of BentoBoxLevelRequirement

#

so I can't really give a direct solution for that

sturdy zinc
#

that works as long as I name my world Bentoboxhook like this private String islandWorld = "askyblock";

half harness
#

as long as it's always named askyblock

#

not sure if that's what you want though - to have the world name hardcoded

oblique heath
#

may i propose

Bukkit.getWorlds().stream().anyMatch(e -> e.getName().equals("name"));
sturdy zinc
#

that was temp code to make it work, I never really firgure out how to make it work for what ever others name their world

half harness
#

🥲

oblique heath
#

idk

half harness
#

are you the developer?

#

are you armar?

#

👀

#

genuine question btw

oblique heath
#

oh wait you want to get the world name ic

sturdy zinc
#

yes, took over from Starrtvin and the codes is crazy to understand, I have fixed some but other sections I have ignored due to I break it when I try to fix it

half harness
#

oh so you're not the original developer

#

that makes things a bit more difficult

sturdy zinc
#

armar was the first coder

half harness
#

is there like a config option?

sturdy zinc
#

yes, very difficult

half harness
#

oh wow you responded quickly
config option to config the world name?

#

if so, you'll have to use that to get the world name instead of what is currently there (in the paste)

#

but I can't give the exact code for that since I don't know how the plugin is structured

sturdy zinc
#

String.valueOf(Bukkit.getWorlds().stream().anyMatch(e -> e.getName().equals("name"))); this has not errors in code I will see if Spigot likes it

half harness
#

noooooo

#

spigot will not like that

#

I can guarentee you

#

I know spigot's tastes

sturdy zinc
#

ok, back to a test I was thinking about

#

if I was to get the world name and I have the UUID this should work right String.valueOf(Bukkit.getWorld(uuid))

half harness
#

never do String.valueOf on the world

#

or toString

#

use getName()

#

but

#

no that won't work because you told me that the uuid is the player uuid

sturdy zinc
#
        String islandWorld = Bukkit.getWorld(uuid).getName();
        UUID owner = BentoBox.getInstance().getIslandsManager().getOwner(world, uuid);
        return owner == null ? null : BentoBox.getInstance().getAddonsManager().getAddonByName("Level").map((l) -> {
            return ((Level)l).getIslandLevel(world, uuid);
        }).orElse(1L);
    }```
#

then use in the other class

half harness
#
String islandWorld = Bukkit.getWorld(uuid).getName();
```this line can be removed
#

it again uses the player uuid instead of the world uuid and the variable is never used

#

sometimes it can help to rename the parameter

#

to like playerUUID

sturdy zinc
#

I thought I could get world info from player UUID, guess I was wrong

half harness
#

wait I didn't really look much into the code until now

#

what is getIslandLevel supposed to do?

#

is that something in BentoBox?

sturdy zinc
#

retrn a number

#

yes

half harness
#

wait

#

no im dumb

sturdy zinc
#

that code the developer of Bentobox helped me a year or so ago

half harness
#

yeah sorry I misread the code

#

whoops
does getOwner not error tho?

sturdy zinc
#

a addon in Bentobox called level

#

which is island level in skyblock, acid world one block, etc

half harness
sturdy zinc
#

yes

half harness
#

we need to know where to get this world name

#

besides checking every world

sturdy zinc
#

I need to know the current world player is in and I think this may work public Long getIslandLevel(World world, UUID uuid) { String islandWorld = world.getName(); UUID owner = BentoBox.getInstance().getIslandsManager().getOwner(world, uuid); return owner == null ? null : BentoBox.getInstance().getAddonsManager().getAddonByName("Level").map((l) -> { return ((Level)l).getIslandLevel(world, uuid); }).orElse(1L); }

#

it does return a string of current world name

#

nope, still getting name from who knows where

inner umbra
#

Does HashMap no longer support null values? More specifically ConcurrentHashMap

inner umbra
#

It does not 🤦

potent nest
#

CHM never did

inner umbra
#

Yeah, just assumed it did cause HashMap does. I can just work around it.

prisma wave
ocean quartz
#

In what situation would you want a null value instead of just not having anything in the map?
Genuine question btw, don't think I have ever encountered a situation where I needed null values before

wind patio
#

well there may be scenarios where you need to explicitly indicate that the key exists but has no value

#

or initializing the keys for the map but they have no values yet

oblique heath
#

Optional moment

inner umbra
#

In what situation would you want a null value instead of just not having anything in the map?
In my case I didn't want to make a second variable to "finalize" my changing variable.
I didn't want it to be linked to the object (or current class) or static either.

rotund egret
#

Which ordinarily wouldn't matter so much, but when the api uses optional, converting to nulls for easier handling feels silly

distant sun
#

What do you mean by better support?

half harness
#

I'm not really sure what it could have though

crude cloud
#

it could have a rice cooker

rotund egret
#

Elvis operator for none would be cool

#

Or empty I guess is what it is in java

#

Nullable ?: action
Optional ?: action

#

Or the ? Operator if it is empty

#

I could probably write extensions for it, wouldn't be the same operator, but that's aside the point

#

But most apis don't use optional a lot that I've seen, so outside of sponge I'm not sure of it's actual scope of use

wind patio
#

so is Optional a monad or not???!

brazen ether
rotund egret
#

@prisma wave can elaborate if it fits the technical definition probably, but it AFAIK It is a monad yeah

crude cloud
# wind patio so is Optional a monad or not???!

The concept of whether Optional is a monad can be a bit nuanced, but generally speaking, in the context of Java and functional programming, Optional is considered to be a monad.

What is a Monad?

A monad, in a programming context, is a design pattern that allows for a way to handle computations in a sequential manner. It must satisfy three core properties:

  1. Unit (or return): There must be a way to wrap a value in the monad. For Optional, this is the Optional.of or Optional.ofNullable method.

  2. Bind (or flatMap): There must be a way to chain computations on the monad. For Optional, this is the flatMap method.

  3. Associativity: The order in which monadic operations are applied should not matter.

How Optional Fits the Monad Pattern

  1. Unit (Optional.of and Optional.ofNullable): These methods allow you to wrap a value into an Optional.

    Optional<String> opt = Optional.of("Hello");
    
  2. Bind (flatMap): This method allows you to apply a function that returns an Optional and flatten the result.

    Optional<String> opt = Optional.of("Hello")
                                   .flatMap(s -> Optional.of(s.toUpperCase()));
    
  3. Associativity: The chaining of flatMap operations should follow the associative property, meaning the grouping of operations does not affect the final result.

Example

Here’s a simple example demonstrating these principles:

Optional<Integer> opt = Optional.of(2)
                                .flatMap(x -> Optional.of(x * 2))
                                .flatMap(x -> Optional.of(x + 3));
System.out.println(opt); // Optional[7]

In this example, Optional is used to chain computations where each step returns another Optional.

Conclusion

Yes, Optional can be considered a monad in Java. It provides the necessary methods (of, ofNullable, flatMap) to meet the criteria of a monad, and it allows for functional-style operations on potentially absent values. However, it's important to note that while Optional fits the monadic pattern, Java itself does not formally define it as a monad in the way languages like Haskell do.

rotund egret
#

Thanks AI emily

half harness
#

oh no

#

has Emily turned into a 🤖

civic cairn
#

for some usecases optionals are really convenient

#

but at some, you just hate yourself because you chose to use them instead of simple nulls

#

user.clan().flatMap(clan -> clan.member(uuid)).ifPresent(member -> {}) cool
But what if you also want to use clan in the scope?

Optional<Clan> opt = user.clan()

if(opt.isEmpty()) return;

opt.get().member(uuid).ifPresent(member -> {})..

crude cloud
#

user.clan().ifPresent(clan -> clan.member(uuid).ifPresent(member -> {
// clan & member are available
}));

or if I need to return something
user.clan().flatMap(clan -> clan.member(uuid).flatMap(member -> {
// clan & member are available
}));

#

not dismissing your point, just, this is what I'd do in that situation, I see what you mean

pastel imp
#

tbh I have never went much into Optionals, are they worth learning?

crude cloud
#

things I wish Optional had:

  • zip
#

that's all

full anchor
#

Anybody have any knowledge of Mythic Mobs?

crude cloud
#

maybe, but not me

full anchor
#

maybe.. but not you?

#

xD

crude cloud
#

maybe there is someone

#

but that ain't me

full anchor
#

Ohhh I see what you mean lol

#

We have a few mutual friends Emily lol

crude cloud
#

a few 😭

pastel imp
#

lmao

full anchor
#

oh i thought I saw snowcone lol

#

that was probably there mutual friend lolol

#

And Hello Mr Afonso~

pastel imp
#

random question, How can I get the "me.mrafonso.bgems" with gradle? Is there a variable for that?

#

I know there is one for group id, but my group id is just "me.mrafonso"

full anchor
#

I have no idea 😌

.. Sorry

rotund egret
#

you could append the project id, not sure if there's a preset var for it

#

ofc neither of those actually gets the file structure

crude cloud
#

yeah I mean gradle doesn't really know what your base package is, not that a "base package" is necessarily a thing either

pastel imp
#

I could in theory put group id + the name of the project in lowercase

#

is it even possible to put it in lowercase?

#

I mean... is it even a problem if there are uppercased letters?

#

for the destination of a relocation for instance

#

is it a problem if it's like me.mrafonso.HeLlo.libs.smt?

crude cloud
#

I don't see why it wouldn't be

rotund egret
#

string manipulation is impossible in groovy/kotlin everyone knows this

pastel imp
#

I assume the convention is always lowercased though?

rotund egret
#

of packages? yes

pastel imp
#

I suppose I will just have to do it manually

#

¯_(ツ)_/¯

half harness
crude cloud
#

huh

half harness
#

in my project creator project I do group id + project name lowercase

rotund egret
#

me when String#lowercase is impossible 🤯

half harness
#

or actually for this case I'd just hardcode it

#

eh idk

#

it doesn't matter

pastel imp
half harness
#

I'm giving an example of my own that I think is related ¯_(ツ)_/¯

#

but im a bit confused

#

so sorry if it's unrelated

pastel imp
#

I am also a bit confused lol

#

let me clarify my case

#

For instance, I currently use MC Dev plugin in Intellij to create projects, you can specify a group id, etc there, in my case, I usually use me.mrafonso for group id of my projects, but then the main package is always me.mrafonso.NAMEOFPLUGIN, and I am trying to customize the build.gradle template used when creating a project using the plugin, to automatically put the right package on relocation of a few common libraries I use.

half harness
#

oh

pastel imp
#

now that I think about it, is it even wise to use the same group id for all projects?

#

lol

rotund egret
#

That's the point of it?

half harness
#

except that instead of MC Dev I made my own program

pastel imp
#

Also, a good question is, if I relocate the same library, in 2 different plugins, to the same path (me.mrafonso.libs.smt), won't that cause issues?

half harness
#

yes

#

I would suggest groupid.artifactid.libs.something

pastel imp
#

yeah okay so I am correct okay, I was like "am I even right to think this? lol"

#

that's exactly it

#

let me check if I can find a variable for it

#

yeah it's this

#

thanks

#

forgot about the artifact id lmao

#

only single thing that sucks now

pastel imp
#

is that the template is using kotlin but mc dev plugin generates a build.gradle

#

so I have to manually change it to build.gradle.kts

#

which could be worse tbh

#

better than having to make a build.gradle.kts again and again

brazen ether
crude cloud
#

not the server gui 😭

crude cloud
brazen ether
#

actually no

#

but like

crude cloud
#

lmao

brazen ether
brazen ether
crude cloud
#

💀

safe crescent
#

@rotund shadow what do you mean

rotund shadow
#

i cant see it

safe crescent
#

like the image?

rotund shadow
#

you just sent a pic of steve in a jungle and said its a gun ? why

safe crescent
#

we denying entire countries now? jeez

rotund shadow
#

what country ??

safe crescent
#

i respect your opinions but sorry i just dont really have time for it

rotund shadow
brazen ether
#

it really is that simple

safe crescent
#

yeah i get that dw

#

it is what it is

brazen ether
#

indeed

potent nest
#

classic irrational thinking

rotund shadow
potent nest
#

I don't why I blocked this account before, but I guess nothing changed

rotund shadow
#

Im him

rotund egret
#

It's not necessarily that it's Israel, but it is in bad taste given the current events imo.

#

I do have a distaste for guns too fwiw

safe crescent
#

well i cant really control irl events so

rotund egret
#

I'm not asking you to 🙂

safe crescent
#

yeah ik but im just saying

#

cause im trynna add guns from every country to my server

#

so far palastine has only ever made 1 domestic type of gun so who knows ill try adding that too if i can find a country head for it

rotund egret
#

You made the choice to include it and showcase it during this time and I don't think it was a good choice.
I understand your goal and I understand why you feel justified. I just don't find it to be in good taste, as I said.

safe crescent
#

then you do you

rotund egret
#

For sure, no hate. 🙂

safe crescent
#

btw has anyone ever used movecraft

#

the plugin

#

im thinking of adding it to my server

remote goblet
safe crescent
#

guns aint for everyone

#

personally i quite like them

#

rn i have a .177 revolver cause uk gun laws are strict but when i move to america ima try get some better stuff

remote goblet
#

i date someone with an autistic hyperfixation over weaponry and has a vast collection of gun knowledge (he hates valorant weapons) although i think owning them is strange

rotund egret
#

I like shooting them for fun, I don't like the gun control we have in the states

safe crescent
#

i think owning guns is quite important

rotund egret
#

I own a .22 not necessarily by choice, but revolvers and cute weapons

#

Are*

safe crescent
#

i like old fashioned guns

#

lever actions, revolvers

#

colt m1911 is a classic

remote goblet
#

well my bf's main thing is knowledge about how they work and their effectiveness in actually being used

safe crescent
#

nice

remote goblet
#

like are the the handles good, will the stock break your shoulder, will they overheat, etc etc etc

safe crescent
#

tbh to me i just like guns overall, im not a physically strong person and im far from being the best fighter so to me its something i know i can defend and protect myself with

#
  • alot of my ancestry is irish traveller which has a history of being persecuted in the uk so to me the only garuntee that the government wouldnt persecute my people again is if they knew we would be able to fight back
#

sadly theres some people who use guns for bad though

#

and it ruins it for everyone else

rotund egret
#

I'd describe myself as an aspiring pacifist

safe crescent
#

same but sadly war is a matter of reality and just because one may be a pacifist it doesnt garuntee they are safe

#

its like when a country is neutral, i.e switzerland has stuff like conscription and a high funded military

rotund egret
#

If anyone is looking for a good anti-war novel, 'Johnny Got His Gun' was rather compelling.

prisma wave
rotund egret
#

I thought I recalled something like that

prisma wave
#

Yeah I think it’ll be something to do with the behaviour of Optional(null)

crude cloud
#

you are American citizen, I thought you love guns and waffles and freedom and bald eagles

#

and the statue of liberty

rotund egret
#

Waffle House has a lot of American memorabilia up right now, it's pretty cool I guess

potent nest
#

The problem is map(_ -> null) I think

crude cloud
#

and Tom hanks

safe crescent
#

theres something called the waffle house index

#

basically its a code for how dangerous disasters or events are based on whether the local waffle house is opened

#

as waffle house is known for being a place that can survive the worse

#

go to any waffle house and theres probably a fight going on in there

#

i wanna go to a waffle house

#

i went to a chuckee cheese once

rotund egret
#

Just a weird guy that keeps offering waffle sauce

safe crescent
#

remember that one video where someone chucked a chair and the employee caught it and threw it back

rotund egret
#

Yeah that one video really cemented the idea of a Waffle house for you huh?

safe crescent
#

yes

rotund egret
#

They're not as exciting in real life 😦

safe crescent
#

it was a good catch too they caught it like with one hand

rotund egret
#

At best the cook is on meth and the food pops

safe crescent
#

i like waffles

rotund egret
#

They are pretty good. Had a chocolate one the other day

safe crescent
#

imo i like 60s themed diners

rotund egret
#

Foods not good, but the vibe is cute

prisma wave
rotund egret
#

Shut up

pastel imp
wind patio
#

i stopped caring about the 2000 js frameworks years ago

#

I just use what I like and am comfortable with lol

ocean quartz
#

What, you don't like learning a completely new js framework every few months? Pft

distant sun
#

my fav part of web dev

static zealot
wind patio
orchid wyvern
#

Anyone familiar with a custom backup script for linux running always in the background and do on 11:00 and 23:00 automaticly a backup of a given path into another path?

Background: we have a network with more than one server and I want to do these backups without a plugin running on the linux system.

The path is going from server1 world1 into a backup folder outside of the server folder where all servers backup there world like: "server1 world1 path" into "world1_date+time.zip". Like for example = hub_22-06-24_11-00.zip".

Does anyone have experience with that? Please let me know!

#

Also: it should look for max 3 backup .zips of this specific world and after that to delete the oldest one.

#

I was working with chatgpt cause I dont usally programm for our network. Would love if someone can help me. I was trying with chat gpt so far but i dont want to textwall in here lol

#

Would love if someone have time for me! 💪heart

wintry plinth
oblique heath
#

you can use cron or systemd to have a script run at regular intervals

#

and the script itself would simply zip your target directory and move it to the destination, then do some ez logic to delete the oldest backup if they exceed the max count

half harness
pastel imp
wind patio
distant sun
#

Is there any java JPE that addresses the boilerplate of getters & setters?
I hate how long a class gets when you have 20 getters & setters and I don't want to use lombok nolombok
Id love to have something like C#'s Type variable { get; set; }

half harness
distant sun
#

🙉

crude cloud
#

idk if I'm writing java wrong or what but I never end up in a situation where I have getters and setters, lol

remote goblet
#

thats called kotlin :(

inner umbra
half harness
#

🤨

#

lombok v2

#

also lombok uses like an annotation processor or smth (i forget if that's what it's called) where it modifies the actual code (bytecode?) depending on the annotations

brazen ether
brazen ether
brazen ether
#

chat i'm getting started with haskell

#

truly a language

oblique heath
#

main = do get some bitches

#

haskell is fun, the tooling could be better though imo

potent nest
#

you can improve the tooling!

#

I think they're still looking for someone to implement context-sensitive error recovery

distant sun
ocean quartz
#

Immutable entities 😌

distant sun
distant sun
ocean quartz
#
@Entity
@Table(....)
data class Entity(
  @Column(...)
  val key: String,
  @Column(...)
  val value: Int,
)

val entity = repository.find(...)
repository.save(entity.copy(value = newValue))

😌

distant sun
#

Ye but how do I do that with java xD

ocean quartz
#

You probably don't :)
Unless you wanna make overloads for everything, which at that point might as well make it all mutable omega_lul

ocean quartz
#

Wdym? That's just updating a row value, but using immutable entity instead of mutable

ocean quartz
#

That's not exposed

ocean quartz
ocean quartz
cerulean ibex
#

oh maybe its a spring thing

ocean quartz
#

Yeah it's spring

#

From what I have heard jpa without spring is a nightmare

#

But with spring it's quite nice

cerulean ibex
#

does spring not let you use a record

ocean quartz
#

Not sure tbh, I have never used spring with Java

#

Seems like you can't 😔

cerulean ibex
#

unfortunate

prisma wave
#

ask me one billion questions please

wind patio
sly sonnet
#

haskell looks like cancer to write in

wind patio
#

true

potent nest
#

only if you're a weak type

prisma wave
#

haters and losers

brazen ether
# prisma wave YESSSSSS

im currently following an online tutorial, then idk gotta figure out some starter projects

prisma wave
#

Writing your own language is a fun one

#

You can start very simple and build a lot of complexity too

brazen ether
prisma wave
#

Yeah I know

brazen ether
#

hmm

prisma wave
#

I mean make an interpreted language in Haskell

#

It’s really fun

#

Or compiled if you feel really brave

brazen ether
#

I shall try

prisma wave
#

But maybe not the best project for an absolute beginner

brazen ether
prisma wave
#

Oh yeah it’s really really fun

#

But fairly difficult until you have a good grasp of the language at least

#

So maybe don’t literally start there

woven bridge
#

My name is Paul, and I am looking for a reliable and honest USA-based collaborator for long-term work. The work requires good English-speaking skills. If you are interested or know someone who might be, please feel free to reach out to me. Thank you!

obtuse gale
#

@granite sorrel that pixel art looks clean asf.

granite sorrel
#

Thank you @obtuse gale

obtuse gale
granite sorrel
#

Dm me ❤️

vale kraken
#

does anyone know if it's possible to change entities name (text display) and use custom fonts without the usage of packets?

brazen ether
#

just use NMS methods

#

you cand use bungee serializer to convert to nms text

vale kraken
#

Thank uuu

crude cloud
#

Paper customName(Component) 😃

ocean quartz
old wyvern
#

😌

#

Haskell still going strong I see

old wyvern
rotund egret
#

Haskell inspires languages like rust to do better

old wyvern
#

Haskell inspires everyone to exist

wind patio
#

haskell inspires me not to use haskell

rotund egret
#

Immutability is king

wind patio
#

hopefully my state of not using haskell remains immutable

rotund egret
#

Non haskell users are mutable, it's paradoxical

wind patio
#

😩

distant sun
oblique heath
rotund egret
#

I love the unit test

distant sun
oblique heath
inner umbra
#

👀

distant sun
rotund egret
#

The call is coming from inside the house

safe crescent
#

I've found good success in side projects notably on roblox where I sold off multiple groups and have made around £1000 so far

#

Though rn ima focus on c# c++ and programming stuff for drones

distant sun
#

Nice, nice

drowsy kernel
#

Every org.bukkit import is giving me an error.
And the version in this is giving me an error for 1.20.4 but not 1.20.1

        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.20.4-R0.1-SNAPSHOT</version>
        <scope>provided</scope>

Can someone help me?

half harness
#

also do you have the spigot repository?

drowsy kernel
drowsy kernel
#

When I switch 1.20.4 by 1.20.1 it works

#

But I need it for 1.20.1

ocean quartz
#

Try 1.20.5

cedar estuary
#

Yo guys, do you recommend an I9 12900KF and a 4070 Super?

wind patio
#

Isk i recommend 4080ti

brazen ether
cedar estuary
#

Chepest one

safe crescent
#

ah damn muh embed fail

safe crescent
#

Hot take but programmer humour isn't funny and prime time is far from funny

#

Most of prime times comedy is "loud and angry must equal funny"

ocean quartz
#

Who watches prime for comedy? His commentary is just interesting

safe crescent
#

I didn't say anyone did I just say his sense of humour is bland

drowsy kernel
brazen ether
safe crescent
#

same but i kind of just find him annoying

brazen ether
#

fair

safe crescent
#

there only so many "my sexy wife" jokes he can say before it gets old

#

tho he hasnt actually said it in a while

#

tbh call me boring but i just think that most forms of modern comedy isnt funny

#

things like people saying their thoughs out like like

"omg i did not think this will happen!!"

or that stupid internetty humour

brazen ether
#

just Lower your standards

safe crescent
#

no cause i just see humour like that sort of childish

#

like once i was in a conversation with this guy at my college and hes just like "so do you think yoshi doesnt pay his taxes" and im just thinking like cmon man your 17

#

act like it

rotund egret
#

Yoshi commits tax fraud

#

Also 17? Bros a child, let him be one

brazen ether
brazen ether
#

if it's truly harmless, you're the problematic one for judging someone

safe crescent
#

its pretty self explanitory

brazen ether
brazen ether
safe crescent
#

cause its childish

safe crescent
brazen ether
#

children are creative and wondrous

safe crescent
brazen ether
#

can you give an actual explanation?

safe crescent
#

cause...its childish?

brazen ether
safe crescent
#

ok so you know how kids act like kids and young adults have to start maturing

#

yeah

#

thats why

#

👍

safe crescent
brazen ether
#

you still haven't explained why it's bad?

brazen ether
#

I try not to

safe crescent
brazen ether
#

let me rephrase, I don't judge others when it isn't important

safe crescent
#

define important

brazen ether
brazen ether
safe crescent
brazen ether
safe crescent
#

or what if your judging someone who might do something wrong

brazen ether
brazen ether
safe crescent
brazen ether
#

it simply doesn't matter

safe crescent
#

then you are still judging them

brazen ether
#

I don't form any opinions of them

safe crescent
#

yes, yes really

safe crescent
brazen ether
brazen ether
safe crescent
#

you dont realise it

brazen ether
#

let people do what they want when you can't even justify why it's bad

safe crescent
#

but you care to judge my actions

#

and you care to respond

brazen ether
safe crescent
#

so you care?

brazen ether
#

not you specifically

safe crescent
#

your interested

#

you care

brazen ether
#

in the conversation, yes

#

you still haven't explained why it's bad to be childish

safe crescent
brazen ether
safe crescent
brazen ether
safe crescent
safe crescent
#

maybe if you read up a little

#

that might be hard for you tho

brazen ether
safe crescent
#

you do care though

brazen ether
safe crescent
#

you care to question them

brazen ether
safe crescent
safe crescent
brazen ether
safe crescent
brazen ether
safe crescent
#

not sure how i said it violates morals

brazen ether
safe crescent
#

🤔

safe crescent
brazen ether
safe crescent
safe crescent
#

why what?

brazen ether
safe crescent
#

what you want me to change what "bad" means?

brazen ether
#

I want you to define it

safe crescent
brazen ether
safe crescent
#

your whole argument rn is just going "why, why, why, why" your really not doing much other than wanting to go in circles

safe crescent
brazen ether
#

but minimizing harm is one

safe crescent
brazen ether
safe crescent
brazen ether
#

why?

safe crescent
#

duh???

#

your just going in circles

#

cause ive explained

#

multiple times

brazen ether
#

my sense of morality comes from minimizing harm to others

safe crescent
#

and your going "but why!!!" cause you cant listen

brazen ether
#

where does yours come from

brazen ether
safe crescent
#

i dont talk to immature people, i dislike immature people and i happily do stuff to make stuff worse for immature people

#

and i dont feel bad about it

#

i feel pride

brazen ether
#

why do you feel pride from causing harm to others?

distant sun