#dev-general

1 messages · Page 34 of 1

crude cloud
#

get good

#

(tier 2)

tardy dagger
#

tier?

#

are there levels and tiers?

crude cloud
#

yeah you gain xp by chatting basically

#

1 tier = 10 levels

tardy dagger
#

oh

crude cloud
#

why do i have two tiers

tardy dagger
#

you can give one to me

crude cloud
#

i don't think i can, unfortunately

tardy dagger
#

buildtools be like "does this look correct?"

Hey! You're about to run the following command. Does it look correct?

C:\Users\mfnal\.jdks\openjdk-18.0.1.1\bin\java.exe -Xms512M -cp C:\Users\mfnal\IdeaProjects\buildtools3\target\classes;C:\Users\mfnal\.m2\repository\com\custardsource\dybdob\java-diff-utils-copy\1.0.5\java-diff-utils-copy-1.0.5.jar;C:\Users\mfnal\.m2\repository\com\google\guava\guava\31.0.1-jre\guava-31.0.1-jre.jar;C:\Users\mfnal\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\mfnal\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\mfnal\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\mfnal\.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;C:\Users\mfnal\.m2\repository\com\google\errorprone\error_prone_annotations\2.7.1\error_prone_annotations-2.7.1.jar;C:\Users\mfnal\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\mfnal\.m2\repository\net\sf\jopt-simple\jopt-simple\5.0.4\jopt-simple-5.0.4.jar;C:\Users\mfnal\.m2\repository\org\eclipse\jgit\org.eclipse.jgit\5.13.0.202109080827-r\org.eclipse.jgit-5.13.0.202109080827-r.jar;C:\Users\mfnal\.m2\repository\com\googlecode\javaewah\JavaEWAH\1.1.12\JavaEWAH-1.1.12.jar;C:\Users\mfnal\.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;C:\Users\mfnal\.m2\repository\org\slf4j\slf4j-jdk14\1.7.30\slf4j-jdk14-1.7.30.jar;C:\Users\mfnal\.m2\repository\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;C:\Users\mfnal\.m2\repository\com\google\code\gson\gson\2.8.9\gson-2.8.9.jar;C:\Users\mfnal\.m2\repository\com\formdev\flatlaf\3.1.1\flatlaf-3.1.1.jar;C:\Users\mfnal\.m2\repository\com\jeff-media\javafinder\1.4\javafinder-1.4.jar org.spigotmc.builder.Bootstrap --rev latest --output-dir C:\Users\mfnal\IdeaProjects\buildtools3\. --final-name spigot-1.20.1.jar 

If so, press the compile button already!
#

uuuh i don't know if this looks correct lmao

wind patio
#

better start knowing

brittle leaf
#

yeah they did, 1.8 is when they switched to buildtools, probably due to the dmca stuff

tardy dagger
#

yeah and unfortunately the buildtools wiki article is a huge mess

#

90% of people have no clue how to use buildtools lol

#

hopefully they'll merge the gui

long dagger
#

I am using bcrypt and Next.js for my website. When the user creates an account, their desired password is hashed client side, then sent to the server, and rehashed with a pepper (the hash, plus a secret string, hashed), which is then stored in my db. Then to check the password, I then repeat the same process, and check to see if the passwords match. But, I noticed that when I hash a password it gives a different result each time even if the input is the same. Why?

#

I just found bcrypt.hashpw(), is that the better method?

tardy dagger
#

is there a reason why you hash it client side? I don't remember this to be normal in the first place since obviously you'd be using https anyway

long dagger
#

In my mind sending an unencrypted password over your internet doesnt seem like the best idea, even with https.

drifting aspen
#

You definitely shouldn't hash the password client side

tardy dagger
#

but it's not unencrypted if sent over https

long dagger
#

true, I forget https encrypts everything on its own

tardy dagger
#

the only thing that is not encrypted is the actual domain name IIRC

drifting aspen
#

Yup

#

The path itself is encrypted

half harness
#

speaking of https and encryption, what actually encrypts it?
Is it the browser? or the OS?

#

I never really thought of that

#

and can't find anything online, idk if I'm putting wrong search terms đŸ„Č

half harness
#

actually its prob not the OS

#

seems too high-level for something that the OS would do

prisma wave
#

im pretty sure it's the OS

#

usually by bundling OpenSSL as a library

#

which then the languages call when they want to establish a connection

#

so really the answer is a mix of both

crude cloud
#

i fucking hate certificates

#

in the end, it's nothing but silly encryption

#

not something that specifically requires special care from the kernel

half harness
long dagger
#

but it also hashes server side

half harness
#

ohhh okay

#

nvm then

long dagger
#

I realized how it is useless, and I removed it

half harness
#

I thought you were hashing only client side

long dagger
#

nah, I aint that stupid lol

#

I was looking through how OAuth 2.0 works, and I noticed that Refresh and Access tokens are used. I was curious how this all works. From what I understand, when the user logs in they get an access token, which is used to get a refresh token. the access token (which requires a log in to get) expires in day/weeks/months, where as the refresh token expires in hours/days. But, if the client knows the access token, what is the point in the refresh token? I just dont understand how that all works

agile galleon
prisma wave
#

?

long dagger
agile galleon
#

Idk what you were talking about

half harness
#

because for ex if the database gets hacked, the attacker can just use that hashed password to log in (and skipping the hashing part)

agile galleon
#

Oh holdon

#

I think you only hash on the server

#

Yeah that makes more sense bruh

wind patio
#

manz really thought he cooked by hashing clientside

long dagger
cinder flare
#

And that anyone can use an access token if it gets leaked or something, but to use a refresh token, you need a known secret

#

so if your access token leaks or something, it's not that big of a deal because it'll be gone within 30 min, and they can't get another one even if they also steal your refresh token, since they don't have the server's known secret

long dagger
long dagger
#

I am new to authentication and cryptography, sorry if these are stupid questions

wind patio
#

Google it

#

Access token is, well, for access, short lived
Refresh token is for refreshing the access token, not used for access, its stored on the server, so if the client access token is compromised, the, say, hacker, will have a limited use/time of the access token and wont be able to refresh it

cinder flare
wind patio
#

@wintry plinth hey, is there an easy way to authenticate the user without his password?
use case I have right now is the user links his discord account with his account (the discord user id is stored along with the original login credentials), if the account is linked, he can login without passing his password, only by discord oauth

#

is using Auth::loginUsingId correct?

wind patio
#

is loginUsingId bad?

wintry plinth
#

ive never used it personally

#

I just know typically Auth::login($userModel) is

wind patio
#

$userModel is basically the entry of the database, with the credentials?

prisma wave
#

"the blockchain" lol which one

inner umbra
#

bitcoin

inner umbra
#

Pretty sure my issue is the time and bits. I could be wrong though

agile galleon
#

I feel you

inner umbra
#

?

#

I've been modifying a miner script I found but I want to know how to properly calculate the hashes so I can edit it the way I want.

wintry plinth
wind patio
#

đŸ«Ą

blazing copper
#

Is vod and streams down

#

Any help available

prisma wave
#

?

lavish notch
wind patio
#

must be some devtool quirk

#

tried on edge with various phone dimensions, no horizontal scroll

lavish notch
#

Interesting.

ocean quartz
#

overflow-x: hidden; my beloved

lavish notch
agile galleon
#

"Used by 1000 individuals" hAA

drifting aspen
#

TIL that operagx apparently has a minecraft network

lavish notch
#

I wrote it ages ago and only got back to finishing it.

agile galleon
#

Maybe replace used

lavish notch
#

I am used! salute

lavish notch
agile galleon
#

No

#

Ooooo

#

Your fault Mackenzie:<

lavish notch
#

They hired a anarchy youtuber to promote it for some reason. laugh

viscid gale
#

who can make me a plugin

#

or edit a datapack msg me

agile galleon
#

Read the rules

orchid crescent
#

/jobs and /jobs browse doesn't open gui but everyother jobs command works for toosie config how do I fix it ?

cinder monolith
#

I am trying to understand why in my example here do user-defined values for bot-token and guild-id are not overidden with defaults, but user-defined values for chat.enabled, or chat.channel-id are always reverted back to defaults upon restarts

config.addDefault("bot-token", "your bot token");
config.addDefault("guild-id", "your discord guild id");

ConfigurationSection chat = config.createSection("chat");
chat.addDefault("enabled", true);
chat.addDefault("channel-id", "the channel id to stream messages to");

config.options().copyDefaults(true);
orchid axle
#

how can i change the slots in shopguiplus in the categories not in the main menĂŒ

quaint isle
#

My plugin jar got rejected by curseforge a month ago, because it was using HikariCP which apparently is partly obfuscated (which is against their TOS).
Now suddenly I'm getting an email that my jar was submitted again and got approved.

Didn't know they automatically re-review jars. Very epic.

drifting aspen
prisma wave
#

Tfw you obfuscate an open source library

wind patio
#

@wintry plinth hey, sorry for ping, just a bit confused with models

#

the class extends Model, but there's no such method as where, etc.

#

am I doing something wrong or I'm really supposed to use ::all()->where(...) instead?

wintry plinth
wind patio
#

so ex.

ShoutboxMessage::query()->create([
    'bla' => 1,
    'blah' => 'abc',
])->get();
```?
cinder flare
#

would recommend Laravel Idea / ide-helper

#

you can just have it autogenerate stuff and it works perfectly

wind patio
#

lombok vibes

cinder flare
#

huh lol?

#

lombok does bytecode manipulation

wind patio
#

yeah ik ik

cinder flare
#

ide-helper just does the same thing eloquent does to analyze what your current model and fields are and adds the type completions to your ide

wintry plinth
wind patio
#

💀

#

though Laravel Query?

#

also I've just installed helper

#

figuring things out lol

wintry plinth
#

I’d recommend Laravel idea over ide helper, but ide helper is an option

drifting aspen
#

I'd choose a different framework

prisma wave
#

real

cinder flare
#

laravel idea just uses ide-helper under the surface and does a bunch of IJ-specific intellisense stuff

#

you nowhere near need it or anything lol, it's worked on by the people who make laravel, not JetBrains themselves or anything

ornate lodge
#

can someone help me with understanding the plugin superiorskyblock2 dms please

#

just need help with the border size upgrades

drifting aspen
#

I mean

#

if a framework requires a paid plugin to function

#

well

#

oof

wind patio
#

it doesn't require it to function

drifting aspen
#

*it requires it so you can develop propely

wind patio
#

Depends what you call properly

cinder flare
#

it just makes it more convenient

#

and not even really that much

ornate lodge
#

does superiorskyblock2 not support hex colors?

wintry plinth
cinder flare
#

well yeah it's pretty nice and does some nice stuff, hence the price, but it's nowhere near necessary to do Laravel, as kyngs was implying

wintry plinth
#

It’s an “enhancement” for sure but I’d probably say it’s a “must have” and £26 a year is nothing for the value added

crude cloud
#

this is very peperla

prisma wave
#

That “structural typing” looks very very very very very error-prone

crude cloud
#

you look very very very very very error-prone

prisma wave
#

No I don’t 😩

#

â˜čïžđŸ˜–đŸ„č😔😱

ornate lodge
#

@eager fern srry for the ping but im about to break my head

#

i just need help

#

with this

slate elk
#

JavaFX or JFrame?

#

for a GUI

potent nest
#

(it's called swing)

#

but depends on you, JavaFX tends to be more modern, but it's not included in modern JDKs

wind patio
#

more modern but not in modern jdks

#

real

drifting aspen
#

I never managed to shade it properly 💀

cerulean ibex
#

has anyone here tried compose multiplatform on desktop or flutter on desktop

prisma wave
#

no

slate elk
#

because at the moment i stick to JFrames

#

and etc

#

but its super ugly and not very user friendly tbf

drifting aspen
#

You can set the theme of the swing components

#

To make it less ugly

potent nest
#

IntelliJ uses swing too

drifting aspen
#

IntelliJ is also 20+ years old

quaint isle
#

@drifting aspen @prisma wave I didn't obfuscate anything but my plugin got rejected because some HikariCP class was - allegedly - obfuscated.

prisma wave
inland bay
#

Aujourd'hui j'envoi ce message car je je cherche des personnes qui aurait besoin d'un Développeur Java , Discord , Web .

J'exerce le développement Java depuis 2016 , développement Discord depuis 2021 , et développement Web depuis février 2023 j'ai eu l'opportunité de beaucoup me développer et de me faire connaitre ce qu'il ma donner envie de plus apprendre dans ce Domaine et de développer pour différentes choses .

Depuis mes début j'ai eu environ 350 clients qui ont étaient trÚs satisfait de l'attendu de leur demande que j'ai exercé .

En septembre j'entre en école d'ingénieur en cyber securité et développement java ce qui va pouvoir me permettre de bosser pour de grandes entreprises international .

Pour ce qui est du tarifs dĂ©veloppement java a 60 euros / mois consiste a ce que pendant 1 mois je rĂ©aliserais toutes les demandes m'Ă©tant transmit et meme vous faire un serveur de A a Z . ( le prix peut ĂȘtre nĂ©gociable dans la limite du raisonable car je pense etre le developpeur le moins cher )

Et pour ce qui est du développement discord : Je crée un bot discord qui est directement relié au serveur minecraft ou on peut mettre un salon console pour avoir la console de l'hebergeur directement sur discord , salon chat minecraft on l'on pourra communiqué avec les joueurs ig directement sur discord , salon logs on l'on verra toutes les logs ig ext et des options a rajouté sur demandes . Pour seulement 25 euros

Merci d'avoir pris le temps d'examiné ma candidature et j'espÚre qu'elle vous satisfera et qu'elle correspond a vos attentes .

Cordialement @inland bay

potent nest
#

Bonjour

prisma wave
#

oh wait no

pastel imp
#

my french is a bit rusty

#

but well

crude cloud
#

oui oui baguette

distant sun
#

Croissant

distant sun
#

Are there any new libraries for creating multi platform applications such as jetbrains compose, BUT for java? I have to make a desktop app as my degree project and I would like to use compose, but I can't because it has to be made in java.

sly sonnet
distant sun
#

You have probably missed the part where I said it has to be made in java

#

According to some post, it uses some stuff that doesn't allow it to be used with java shrug_animated and even then, the code would probably be very ugly since it was made for kotlin

onyx loom
#

can u not use javafx?

distant sun
#

Perhaps, I'm just looking for some suggestions currently, ideally smth more modern xD

wind patio
#

um you could probably look into Qt

#

theres Qt for java QtJambi or whatever

#

not sure if thats what you are looking for, though Qt seems to be an alternative to JavaFX

pastel imp
#

I have been using Swing at school, with flatdark theme

distant sun
wind patio
#

its dual licensed

#

havent used it personally but I think theres a free, lgpl or gpl version and a commerial, paid one

drifting aspen
#

I would rather develop in electron than in javafx

distant sun
#

Js đŸ€ą

half harness
#

learn kotlin 👍

pastel imp
#

NO

#

kotlin bad

#

kotlin mean

#

kotlin illegal

#

kotlin inferior

#

kotlin awful

agile galleon
#

shut up

half harness
#

no

#

dont shut up

#

learn rust 👍

agile galleon
#

youre bad mean illegal and inferior and awful

agile galleon
half harness
#

ok learn kotlin then

#

👍

agile galleon
#

yes good

half harness
#

😼

#

see Mr. Afonso

prisma wave
tardy dagger
#

anyone wants to write a huge shell script with me lol

pastel imp
#

kotlin bad

agile galleon
steel heart
agile galleon
#

because it has many features java doesnt have, a nice syntax, nice libraries etc

crude cloud
#

java has nice libraries too

#

i feel like comparing the library ecosystem of any two programming languages is futile in [current year]

#

not to mention that many, many things kotlin takes for granted are from the jdk OMEGALUL if you ever try to do kmp you'll know hard

agile galleon
#

he was asking why not, not why so xD

crude cloud
#

i love the part where coroutines are not implemented at all in kotlin/js and it is a mere wrapper around promises

agile galleon
#

i love the part where java/js doesnt exist

half harness
#

I mean isn't promises basically coroutines in js?
*Disclaimer: never really used JS *

crude cloud
#

i would be ashamed if it did

crude cloud
# half harness I mean isn't promises basically coroutines in js? *Disclaimer: never really used...

no, not really how coroutines work, coroutines are more similar to virtual threads where you can perform "blocking" (suspending)* operations and the carrier thread (the one that performs the scheduling and where the code truly runs on) will switch to another coroutine

* not really blocking operations, on kt coroutines those will still stall the carrier thread, e.g. sleep vs the suspending variant delay

half harness
#

oh

crude cloud
#

promises are, put bluntly, a simple callback system

half harness
#

or at least the async part

agile galleon
#

dkim, kotlin lover, never used kotlin

agile galleon
cerulean ibex
#

virtual threads are better

#

no colored function problem

#

and theyre so simple

crude cloud
#

and the fact it isn't kotlin exclusive either but all jvm language runtimes can so easily benefit from them

cinder flare
#

mmm jdk 21

#

gonna be huge honestly

#

so glad they got em in for an LTS release people will actually likely update to

cerulean ibex
#

i wish they couldve done a full release for unnamed patterns

cinder flare
#

oh is that the like discarding parts of pattern matching with _?

cerulean ibex
#

yea

cinder flare
#

oh is that not out yet, that's kinda sad

#

i figure that would be a pretty simple thing

#

maybe like one preview

cerulean ibex
#

its not just the pattern variables

#

u can basically do anything

#

including lambda parameters iirc

cinder flare
#

oh that's pretty cool

#

like you can do exceptions in catch blocks, variables in try-with-resources, huh

#

what a neat feature

crude cloud
#

finally intellij will stop suggesting to rename a caught exception/"unused" resource to ignored kekw

cerulean ibex
#

or you can disable the inspection

crude cloud
#

hey ey ey, don't be clever, okay?

distant sun
slate elk
#

Or write app via .Net or what it’s not called

half harness
#

wow everyone trying to learn a gui lib now

#

(in this chat)

slate elk
#

Nah dkim I know how to use swing

#

It’s just ugly

#

And not very user friendly

#

Buttons and windows and shit

#

And the way you locate them

#

I don’t like it

half harness
slate elk
#

U can but it’s not simple and headache not user friendly

#

I remember in VS there was like an editor

#

Also like in android apps

distant sun
#

Ig it shows its age

slate elk
#

U just see that in real time and u don’t have to do launch to see how it will look

#

U locate buttons in real time

#

But using swing

distant sun
slate elk
#

U have to read the future

slate elk
distant sun
#

Ah nvm it is for JavaFX I think

slate elk
#

But yeah

#

Also the android app thing

#

Is way more user friendly

#

In editing

#

And has more options

#

Idk I feel like I want to move to native from Java

#

What next app via OpenGL lol?

half harness
# slate elk Also like in android apps

btw note that android moved away from XML (fun fact: JavaFX mainly uses XML as well) and so, by default, that editor no longer exists
uses Jetpack Compose now

#

and you can also use Jetpack Compose on desktop by using Jetbrains Compose

quaint isle
#

When watching video content through a proxy, is there a noticeable difference in performance between http and socks proxy?

wind patio
#

depends

timber oak
#

Would you guys recommend using SparkProfile or timings to check what causes lag?

quaint isle
distant sun
#

Spark

timber oak
#

Anyone got any tips for learning more about development in java generally? Topics to learn etc.
I'm decent I'd say, but not sure where to learn more really

obtuse gale
civic cairn
#

Ye

#

Spring if you want to get a job

sullen coral
#

Hey everyone, how to remove specified message from chat? Like in ChatControlRed

pastel imp
#

don't use chatcontrolred

elder smelt
#

im wanted to make a custom modded minecraft server with curse forge most likely want some furnature mods farming then maybe a simple origins mod is this possible?

brittle leaf
timber oak
civic cairn
#

Rest apis

orchid crescent
#

I Need help, delux menu gui not showing 1.19 spigot

prisma wave
timber oak
#

What's better performance-wise for 1.12.2 compared to 1.17? Creating a minigame event kind of thing, with bosses, and mobs etc. coming in waves
Is it worth updating the version from 1.12.2?

agile galleon
#

either use latest or the version before latest, but 1.17 doesnt bring much to the thing you want to make

#

so imo dont

crude cloud
#

I mean newer versions do work far better than 1.13/1.14 did, those were really bad lol

#

there isn't really a reliable way to benchmark Minecraft unfortunately

agile galleon
#

yeah dont use those

#

but if youre not updating to .19 or .20 you wont gain anything probably

timber oak
agile galleon
#

pretty much yes

crude cloud
#

so is 1.20 đŸ€”

cinder monolith
#

is there a trick to completely darken a player's screen?

#

blindness and darkness potion effects still have visibility on the lower half of the window

ocean quartz
crude cloud
#

so good

#

LOVE mcci

agile galleon
#

matts cool craft island

crude cloud
#

(i never played any minigame and i just messed around lobbies for 10 minutes grand total)

ocean quartz
crude cloud
#

definitely taking advantage of that early access thing kek

ocean quartz
#

We had water guns

crude cloud
#

g*ns

ocean quartz
#

đŸ”«

crude cloud
#

MATT

ocean quartz
#

LOL

crude cloud
#

barry you racist

ocean quartz
#

It IS adorable!

forest pecan
#

Can somebody help me with, zAuctionhouse

cinder monolith
brazen sierra
#

As good as the pixelart looks it is completely unusable to me. too much stuff in your face. can't play like that.

queen saffron
cinder monolith
queen saffron
#

Yup

#

You could always give the player blindness and teleport them to a fully dark room but u know :>

cinder monolith
queen saffron
#

Oh that

#

If you look carefully, the player is in the void

#

At least I believe

cinder monolith
#

they are not. if you completely expand your window when joinign that server super wide, eventually the solid black section drops off and you can see sky/clouds off in the distance

queen saffron
#

Then it's not a natural minecraft thing.

cinder monolith
#

it has to be.

queen saffron
#

You said it yourself, if you stretch the screen it drops off

#

Meaning that it's not an overlay

#

Since those will just strech

cinder monolith
#

it has to a natural minecraft thing, otherwise it wouldnt work on this screen

queen saffron
#

Try opening a chest and then streching the screen

jagged frigate
#

You join a server then black screen happened?

queen saffron
#

It shouldn't fall off, it would be ridiculously stupid if minecraft did this for one overlay but not the other.

jagged frigate
#

What happened? open chest then his mc broken?

cinder monolith
#

it is not a check overlay. i never said it was though

#

no, im just trying to reverse engineer something. trying to understand how it works

#

nothing is broke

#

there are a couple hints i coudl show that might help you understand how its doing .. cant cannot send screenshot in the chat

queen saffron
#

Okay, well, we've ruled out that it's a texturepack, and it's not something normal with minecraft, that leaves blocks, and the void or similar, try joining with a texturepack that will change those things

cinder monolith
#

circled shows a cloud

#

clear cutoff of black ... whatever it is

#

and there's a clear discinction between the 2 dark colors in the drawn box

#

not curious to know how!? cmon

#

if they are teleporting players, how are they handling dead players. I tried it as a test and it all worked fine. Join, die, quit. change resource pack option back to prompt so it shows the message again.. all still works like it should

#

so the player is definitely in the sky, clouds move both above and below (or so it looks like)

pastel imp
#

I saw people using full black maps in itemframes to make the full black effect

#

since coal, etc either has texture or isn't 100% black

forest pecan
#

Somebody knows how to add HEX colors into Essentials/Messages?

#

i found this "§c"

#

Idont know how to add hex colors

half harness
distant sun
#

Ess uses &#RRGGBB, try that

#

Or... the ugly spigot format

wind patio
distant sun
#

&x&R&R&G&G&B&B

wind patio
#

💀

tardy dagger
#

vault api sucks so hard

#

constantly relying on player names instead of UUIDs and not allowing to use completablefutures etc đŸ„Č

pastel imp
#

use Treasury

cerulean ibex
#

and what would u need completable futures for

#

oh the eco api

#

i was looking at chat

tardy dagger
tardy dagger
# cerulean ibex oh the eco api

I'm writing a permissions plugin and if offline player's perms would be requested, it'd be nice to be able to return a future instead

drifting aspen
#

Vault API goes in the path of the Bukkit API

#

- write a bad API and then refuse to improve it cuz backwards compatibility for 10yo unmaintained software

forest pecan
#

Hi guys, can i use colors into spigot.yml?

#

Ive i tried to use colors it wont start my server.

#

How to use colors into spigot.yml

drifting aspen
#

This is not the correct channel

brittle leaf
forest pecan
#

§ Was the answer still thanks.

tame bane
#

hey

#

is anyone able to help me out with cloudflare routing/domain

tardy dagger
#

maybe, what's your question?

tame bane
#

bassicaly

#

just setting it all up

#

it wont link no matter what i do

tardy dagger
#

what do you exactly mean with routing? you wanna point the domain's A/AAAA records to some server's IP I guess?

tame bane
#

yeah and tebex

#

i use godaddy

#

to cloudflare

tardy dagger
#

you registered a domain at godaddy but you want to use cloudflare for DNS?

#

or do you want to keep your DNS servers at godaddy and "only" want to use cloudflare's proxy mode?

tame bane
#

i just want to use cloudflare for routing and then once i switch to my dedi server i'll be able to have ddos protection

tardy dagger
#

Then I guess you want to use cloudflare for DNS and then enable their proxy mode.

In that case, in your cloudflare dashboard go to Websites -> Add new Site -> Enter the top level domain (e.g. example.org) -> choose the "Free" tier (at the bottom) -> it'll now give you two nameserver addresses, in my case "ethan.ns.cloudflare.com" and "sydney.ns.cloudflare.com" - are you at this step already?

tame bane
agile galleon
#

Also, Cloudflare wont protect your server

tardy dagger
#

aight

agile galleon
#

just your website

tardy dagger
#

yeah the proxy mode only works for HTTP(S) unless you pay for their advanced tiers or whats it called

agile galleon
#

ye

tardy dagger
#

so if you wanna use it to protect a game server or similar, you can forget this right now 😛

agile galleon
#

^

#

use tcp shield

tame bane
#

i'll show you

oblique heath
distant sun
timber oak
distant sun
#

until we run out of space iirc kek

timber oak
#

Alright lol, any rough estimate on how long that is? Lol

prisma wave
#

in a few hours once im done pasting my 10 gb logs

timber oak
#

Perfect, thanks

ocean quartz
#

Did you upload something with sensitive information or something like that? xD

tepid rock
brittle leaf
#

if you're on a time crunch then you should probably increase what you are offering to make it seem more worth it

distant sun
tardy dagger
#

funny thing. I wrote two parsers for my PAPI addon, one uses regex, the other parses the string manually. I've did a few benchmarks with JMH and on Windows, the regex benchmark is much faster, but on macOS, it's the other way around

agile galleon
#

okayyyy

wind patio
#

mac đŸ„Ž

agile galleon
#

just check os

#

and then use the appropriate method

potent nest
#

or write code that's always faster

tardy dagger
#

đŸ„Č

sweet cipher
#

Or just hardcode every possible combination of Strings

agile galleon
#

2gb expansion

tardy dagger
sweet cipher
#

I am known for my great ideas

tardy dagger
#

sadge, my previous benchmark was garbage

#
Benchmark                            Mode  Cnt       Score      Error  Units
BenchmarkLoader.benchmarkNaiveLong   avgt   25  134425,654 ± 1882,153  ns/op
BenchmarkLoader.benchmarkNaiveShort  avgt   25    3968,929 ±   50,473  ns/op
BenchmarkLoader.benchmarkRegexLong   avgt   25  161216,016 ± 3800,832  ns/op
BenchmarkLoader.benchmarkRegexShort  avgt   25   14564,255 ±  113,956  ns/op

regex isn't faster, after all

#

that means I did not waste 2 hours today

agile galleon
#

Naive?

#

Regex will always be slower

tardy dagger
#

it's a naive implementation because I wrote it

#

lol

feral notch
#

Can someone please help me

tardy dagger
#

Otherwise, nooone can help you

slate elk
#

hey guys

#

wondering any IOS users here?

#

so i finished my android app

#

and now i also need to work on iOS ver

#

how to install an APP to an IOS

#

without using any fishy 3rd party services

tardy dagger
#

if you don't own any apple device, the easiest way is probably to rent a cloud mac mini and use XCode's iPhone emulator

#

well what language is your app even written in?

slate elk
#

i will use swift

#

on android its java

#

hmm i got about 3 iphones at home o hope they dont charge for an apple devoloper profile u know Apple is like EA haha

tardy dagger
#

nah the dev profile doesn't cost anything, but I only know how it works from within XCode (which ofc only runs on mac)

wind patio
#

developing ios apps is a fuckin nightmare if you don't own a mac

#

so fucking annoying that they need to put a paywall behind that

slate elk
#

so i have to get a macOS

#

to have an interface

#

instead of this

#

C:\Users\zx>swift -help
OVERVIEW: Swift compiler

USAGE: swift

OPTIONS:
-access-notes-path <value>
Specify YAML file to override attributes on Swift declarations in this module
-allowable-client <vers>
Module names that are allowed to import this module
-assert-config <value> Specify the assert_configuration replacement. Possible values are Debug, Release, Unchecked, DisableReplacement.
-clang-target <value> Separately set the target we should use for internal Clang instance
-color-diagnostics Print diagnostics in color
-continue-building-after-errors
Continue building, even after errors are encountered
-coverage-prefix-map <prefix=replacement>
Remap source paths in coverage info
-debug-info-format=<value>...

#

because i was trying to find out via commands on how to even launch it

#

me who about to check second hand lapttops rn

#

hell on earth

wind patio
#

if you'd develop with react native

#

you could use an app caled Expo Go

slate elk
#

imma check itt out

#

eh i hate apple so much

#

good that Eu law gonna force them to move to type-C

#

which is faster then apple charger

#

and transfers data faster and everything

wind patio
#

you basically setup an expo project and have expo go installed on your ios device, you run a server which your expo go app connects to and renders the layout

slate elk
#

probably apple face đŸ»â€â„ïž

slate elk
#

❀

tardy dagger
tardy dagger
slate elk
slate elk
#

cross platform?

#

did i get it right?

wind patio
#

well it works on android devices too

tardy dagger
wind patio
#

Expo Go is a free, open-source client for testing React Native apps on Android and iOS devices without building anything locally. It allows you to open up apps served through Expo CLI and run your projects faster when developing them.

tardy dagger
#

But they dont use react, do they?

cinder flare
#

unironically

#

React itself is very solid and a nicely transferable paradigm, and Expo is just so convenient

#

you just install the app, and can see any hot-reloading update of any of your apps

potent nest
slate elk
potent nest
#

that's not up to type c

#

usb 3 is faster than usb 2, but that's it

#

and apple will likely only provide usb 2 cables for free, so you have to pay if you want usb 3

slate elk
#

not any longer soon they gonna have to stick to type-c cabels in europe ;p

cinder flare
#

you can have usb-c cables in any speed lol

#

you can have a usb 1 usb-c cable

#

that can only transfer at like 5Mbps

potent nest
#

^

slate elk
#

ehhh my bad idk i have read it some where like reasons why they gonna force it to happen and pros and cons

cinder flare
#

the distinction is that usb-c is only a form-factor

quaint isle
#

usb is a confusing mess

cinder flare
#

they are going to force it, but there's no guarantee it'll be faster or anything

slate elk
#

at least we not gonna depend on the expensive cabels anymore

cinder flare
#

oh i mean you probably are

#

they are most likely going to make Apple-approved usb-c cables that have high speed and limit anything else to really slow speeds

tardy dagger
#

yes that's what I read too

#

the whole "usb-c law" is a bit stupid anyway

oblique heath
#

didnt they even already do that lmao

slate elk
#

no.

#

2024 or something not sure

cinder flare
#

anyways yeah, React Native is honestly amazing

tardy dagger
slate elk
#

mfnalex dunno my car charger charges fine not fast as the orginal one

slate elk
#

but i dont use my cellphone so often that i have to charge it haha

tardy dagger
oblique heath
#

i believe

tardy dagger
#

I wish USB-C would finally get established in normal computers/laptops

#

somehow it's still kinda rare / only available on expensive ones

quaint isle
#

except for budget ones, they pretty much all come with usb c nowadays, dont they?

oblique heath
slate elk
#

on my laptop

tardy dagger
#

is that so? I don't know, I have been using macbooks only since 10 years or sth. But my boyfriend got a normal acer without usb-c, my neighbour also got some "pretty average" laptop and that also doesn't have usb-c. and I know nobody with a tower pc that has usb-C

cinder flare
#

need me a mobo with 8 usb-c slots

#

would be huge

oblique heath
#

for tower pc (cases) yeah very few have usb c

tardy dagger
#

my tower pc only has one usb-c and it's at the backside which is basically inaccessible lol

oblique heath
#

but for 13" laptops being charged by usb c is very common now

cinder flare
#

yeah i have one front-panel usb-c and zero mobo ones

tardy dagger
#

if EU makes a law about devices requiring usb-C, i think they should at least make this apply to every device that normally uses usb

oblique heath
#

nah

slate elk
#

nah wont happen

#

apple had a monopol

#

i think its the real reason why they did it

#

not because they care about the enviorment or something

cinder flare
#

a monopoly on what? lol

oblique heath
#

apple had the opposite of a monopoly

quaint isle
#

except for gaming laptops that draw lots of power, I think most consumer devices do usb c these days if you pay 500 bucks or more.
Business notebooks are pretty much 100% usb c

cinder flare
#

there's like at least three relevant Android companies

oblique heath
#

apple was splitting the phone charging cables bubble into two distinct connectors, that's the only reason they were forced to conform to one standard

#

doesn't do anything about a monopoly

slate elk
#

Perhaps Apple could agree to an outside standards body that certifies cables...

oblique heath
#

that's just as bad for apple as switching to usb c

#

apple only cares because they could charge big money to allow companies to use lightning

cinder flare
#

i mean, the weird part is that everything else they produce is already fully usb-c lol

#

the lightning royalties aren't even that big tbh

oblique heath
#

đŸ€·â€â™‚ïž

tardy dagger
#

no clue about their watches

#

my watches don't have any charging port ¯_(ツ)_/¯

cinder flare
#

the magnetic charger plugs into the brick with usb-c lol

#

so, if that counts

tardy dagger
#

oh the funny thing is that macbooks also have the magsafe port, but can also be charged with each of the usb-c ports

cinder flare
#

depends on the macbook

#

my 2020 m1 air only has two usb-c ports, no magsafe

#

they got rid of it for a few years

tardy dagger
#

i got m2 max from 2023 and it has 4 usb-c plus magsafe, and all of them can be used to charge

cinder flare
#

p cool honestly

tardy dagger
#

yeah it's quite nice because sometimes I just forget the charger but can still use any normal usb-c thingy then. and at home, magsafe is great as you can't trip over it

cinder flare
#

yeah magsafe is an amazing charging cable thing, so weird that htey got rid of it for a few years lol

tardy dagger
#

i didnt know they made an air version with m1

cinder flare
#

ofc

#

it doesn't even have a fan

#

which i honestly love

tardy dagger
#

nice! if I'd be still going to university I probably would have gotten an air too, but now I mostly use it at home so I got the 16 inch one lol

cinder flare
#

yeah, only one more year for me

#

soon i'll be free 😌

tardy dagger
#

with university, or what?

cinder flare
#

yup

tardy dagger
#

what did you study/are you studying?

cinder flare
#

computer science!

tardy dagger
#

ah yeah nice, probably like 90% here lol. I also should have went for CS instead

cinder flare
#

oh? what did you end up doing

tardy dagger
#

law, with focus on german tax law 💀

oblique heath
#

information systems đŸ‘»

cinder flare
#

oh man, a certified lawyer in our presence!

tardy dagger
#

yeah but only for german law 😄

#

anyway, I should leave in a few minutes, got a doctor's appointment in 30 minutes D:

cinder flare
#

good luck!

#

or, like, hope it goes well lol

tardy dagger
#

Thanks, have a nice day everyone

wind patio
tardy dagger
#

gradle users who write their scripts in groovy typically code in java, while gradle users who code in kotlin typically also write their build scripts in kotlin, is that right?

prisma wave
#

i think that’s a big overgeneralisation

#

I use kotlin dsl for everything

tardy dagger
#

yeah probably. it's just, I wanna create a repo for new gradle users that has snippets / buildSrc scripts for commonly asked tasks, e.g. "how to copy a jar", "how to create a shaded jar" etc bla bla.
And ofc I wanna do that for both kotlin and groovy. And obviously I wouldn't have a java plugin in the kotlin build.gradle and vice versa

prisma wave
#

And obviously I wouldn't have a java plugin in the kotlin build.gradle and vice versa

Why not?

#

Although if you’re doing something like that it might be wise to only do java. Saves a lot of work & potential duplication, avoids confusion, and anyone that knows kotlin should be able to read java too

tardy dagger
#

yeah that's true on the other hand

tardy dagger
#

hmmm is it normal that I have to import literally anything inside kotlin buildSrc scripts while I don't need that at all in the main build.gradle.kts?

#

and for compileOnly, I only get this weird accessor as import, that can't possibly be correct?
buildSrc/src/main/kotlin/common.gradle.kotlin.spigot-api-dependency.gradle.kts

import gradle.kotlin.dsl.accessors._7758f57c6dd35933dbd9dc8c103ba8e9.compileOnly
import org.gradle.kotlin.dsl.maven
import org.gradle.kotlin.dsl.repositories
import org.gradle.kotlin.dsl.dependencies

plugins {
    id("common.gradle.kotlin.java-conventions")
}

repositories {
    maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") {
        content {
            includeGroup("org.bukkit")
            includeGroup("org.spigotmc")
        }
    }
    maven("https://oss.sonatype.org/content/repositories/snapshots") {
        content {
            includeGroup("net.md-5")
        }
    }
}

dependencies {
    compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
}
ocean quartz
#

Kotlin DSL is just slowly becoming the preferred version
Even on the Gradle slack they are constantly suggesting it over Groovy
It also has way better support on Intellij than Groovy does
There was also a feature which I don't remember anymore that only worked on Kotlin DSL

tardy dagger
#

I'm still wondering whether I need this weird accessor import to be able to specify a compileOnly in a buildSrc script - is that supposed to be like this?

drifting aspen
#

I doubt so

#

Just need to include the java plugin

tardy dagger
#

without it, I get the following error: Unresolved reference: compileOnly

drifting aspen
#

Do you have the java plugin?

tardy dagger
#

here's my java conventions thing:
buildSrc/src/main/kotlin/common.gradle.kotlin.java-conventions.gradle.kts

import org.gradle.kotlin.dsl.java
import org.gradle.kotlin.dsl.repositories

group = "com.jeff-media"
version = "1.0-SNAPSHOT"


plugins {
    java
}

repositories {
    mavenCentral()
}
drifting aspen
#

It's weird

#

I don't have the imports in my java conventions

#

How did you create the Gradle files?

#

I suggest using gradle init

ocean quartz
#

I don't normally use buildSrc
But I'm assuming it works similarly to build logic, it's just Intellij adding it
What I normally do is delete the import and refresh Gradle so it uses the right one
Sometimes you need to even close and reopen it lol

drifting aspen
#

Weird

#

I never had issues with it

ocean quartz
#

It could be caused by the "import on the fly" setting IJ has

drifting aspen
#

It's kinda sus

#

@tardy dagger how did you create those files?

#

Manually?

tardy dagger
#

yes

#

if I delete the import, I get an error message

e: file:///C:/Users/mfnal/IdeaProjects/Common-Gradle-Questions/common-gradle-kotlin/buildSrc/src/main/kotlin/common.gradle.kotlin.spigot-api-dependency.gradle.kts:20:5 Unresolved reference: compileOnly

ocean quartz
crude cloud
#

true

#

I never ended up watching that, lol

ocean quartz
#

I watched all the way to 14 then just a few of the other ones
They become very situational after that

distant sun
#

Matt the gradle god

drifting aspen
#

Use the gradle init command

#

Or create the Gradle project using IJ

ocean quartz
drifting aspen
#

Well it did generate those when I used it to migrate from maven to Gradle

#

Probably doesn't create them on it's own

ocean quartz
#

It generated .. convention plugins when converting from maven?

hexed tartan
#

%checkitem_amt:7,mat:paper......% don't work
all materials work but not Paper why ?

ocean quartz
#

Or are you talking about general build script? Aka build.gradle.kts?

drifting aspen
#

Find the allesiodp Libby repo

#

Clone it

#

And use gradle init to migrate from maven

ocean quartz
#

Huh it does generate a basic one, interesting, well pretty cool they are keeping the generation tool very up to date at Gradle
But anyways, it's fine to make the files manually, IJ has some issues with them sometimes but most of the times it works fine

drifting aspen
#

I just declared everything in the subprojects {} part of the parent build.gradle

tardy dagger
tardy dagger
#

At least on 8.2

#

8.3*

ocean quartz
#

Right, if you keep reading you'll realize that I noticed it does now lok

tardy dagger
#

I'm pretty tired of kotlin dsl ugh. IntelliJ also keeps showing me an error at the top "Failed to load script definitions by org.jetbrains.kotlin.idea.gradleJava.scripting.GradleScriptDefinitionsContributor"

#

currently waiting for rm -rf ~/.gradle/caches to finish... it has half a million files there

#

it's not even working properly for a totally empty settings.gradle.kts file - something's fucked with kotlin dsl somehow? https://prnt.sc/SCjdDcKwQx5h

#

everything works when using groovy

drifting aspen
#

Honestly I have no idea what's wrong with your setup

crude cloud
#

i blame intellij

tardy dagger
#

I'll try again on mac later

crude cloud
tardy dagger
#

Yeah ikr? So weird

#

I‘ll create a new project in IJ on mac now, if it works there I‘ll reinstall gradle and/or IJ on windows

half harness
#

It's in the file menu I think

tardy dagger
#

how the hell can this not work on two different computers

#

but gradle itself does not complain, it's only intelliJ that complains

#

i'm on latest IJ utlimate 2023.2.1

ocean quartz
#

Have you tried just using kotlin-dsl?

wind patio
tardy dagger
ocean quartz
#

Odd

#

I'd say try to invalidate cache and restart on Intellij

tardy dagger
#

is anyone else using this exact IJ version? 2023.2.1 ultimate?

tardy dagger
ocean quartz
#

I'm on the same version

tardy dagger
#

makes no sense to me because gradle build in console works fine

ocean quartz
#

It's definitely an intellij problem

tardy dagger
#

found the problem!

#

intellij's mcdev plugin đŸ„Č disabled that and now it works fine

agile galleon
#

yeah it always makes problems

ocean quartz
#

Lol

tardy dagger
#

yeah indeed

sullen coral
#

How to check if Color is set? Because if player doesn't have color i got error```java
@EventHandler
public void onProjectileHit(ProjectileHitEvent e) {
Entity hitEntity = e.getHitEntity();
if (!(hitEntity instanceof Player)) {
return;
}

if (e.getEntity() instanceof Arrow) {
    Arrow arrow = (Arrow) e.getEntity();
    Color color = arrow.getColor();
    int red = color.getRed();
    int green = color.getGreen();
    int blue = color.getBlue();
    String hex = String.format("#%02x%02x%02x", red, green, blue);

    switch (hex) {
        case "#7ebff1":
            Bukkit.broadcastMessage("Freeze Arrow");
            break;
        default:
            Bukkit.broadcastMessage("Normal Arrow");
    }
}

}

tardy dagger
#

also you shouldn't identify your custom arrows by their color and it's also pretty redundant to turn the color into a string to check it

sullen coral
prisma wave
#

show how you checked

tardy dagger
#

"i got error" is not very useful

#

please paste the entire stacktrace

prisma wave
#

i mean

tardy dagger
#

(is there a bot command for a paste link?)

sullen coral
#

I cant paste here

prisma wave
#

it's NPE surely

#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
‱ HelpChat Paste - How To Use

tardy dagger
prisma wave
#

so

#

only so much useful information to be gained from the stacktrace

#

it's probably more likely that they just did the check wrongly

tardy dagger
#

probably yeah. @sullen coral how did you check if the color is null?

sullen coral
# tardy dagger probably yeah. <@830719561342517348> how did you check if the color is null?
@EventHandler
public void onProjectileHit(ProjectileHitEvent e) {
    Entity hitEntity = e.getHitEntity();
    
    if (!(hitEntity instanceof Player))
        return;
    
    if (e.getEntity() instanceof Arrow) {
        Arrow arrow = (Arrow) e.getEntity();
        Color color = arrow.getColor();
        
        if (color != null) {
            int red = color.getRed();
            int green = color.getGreen();
            int blue = color.getBlue();
            String hex = String.format("#%02x%02x%02x", red, green, blue);
            
            switch (hex) {
                case "#7ebff1":
                    Bukkit.broadcastMessage("Freeze Arrow");
                    break;
                default:
                    Bukkit.broadcastMessage("Normal Arrow");
            }
        }
    }
}
tardy dagger
#

that is correct. so, please send the stacktrace that you get while using exactly this ^ code

prisma wave
#

hm okay

#

yeah that looks fine

sullen coral
tardy dagger
#

what's line 24?

sullen coral
#
Color color = arrow.getColor();
prisma wave
#

oh

#

not NPE

#

interesting

#

that looks like you (or possible another plugin) has set the colour of an arrow incorrectly somehow

tardy dagger
#

huh I can't even find getColor in CraftArrow

#

ah it's in CraftTippedArrow it seems

#

show the code where you set the color

sullen coral
#

All my custom arrows work, only when basic arrow which doesn't have custom color it gaves error

prisma wave
#

oh

#

as in, just a normal arrow? or a plain, tipped arrow

sullen coral
#

tipped arrow

tardy dagger
#

that's R 255 G 71 B 78

#

try to use 8306673 as color

sullen coral
tardy dagger
#

you say that now?

sullen coral
prisma wave
#

hang on what

tardy dagger
#

i don't get it

prisma wave
#

you said it gives the error

tardy dagger
#

also the hex color you are comparing to would be this arrow: /give @p tipped_arrow{CustomPotionColor:8306673,display:{Name:'[{"text":"Tipped Arrow"}]'}} 1

sullen coral
tardy dagger
#

totally different CustomPotionColor

tardy dagger
#

why do you even need to check the arrow's color? wouldn't it be much smarter to identify it using metadata or through the PersistentDataContainer?

#

you're on 1.16, you can use both PDC and metadata, no need to do any dirty hacks like using exactly one specific color to identify it

#

I'll try your code myself now

#

your code works fine using normal arrows and the colored arrow from the give command I sent (which is also correctly detected as your freeze arrow)

#

TL;DR I don't get any errors with your code, only issue I get is that you're using the wrong color

#

show the whole /give command that you used, pls

sullen coral
#

Thank you, I fixed it. I was checking the arrow's material, and the issue was also with the attribute

manic vector
#

Yo guys

#

Any idea what could cause this error?

compact perchBOT
manic vector
tardy dagger
#

wrong import?

#

that's what happens if you blindly import java.awt.*

manic vector
#

i'm not the dev. Our dev did this but right now he's not online and we need to fix it asap

tardy dagger
#

do you have the source code?

manic vector
#

I do have it

tardy dagger
#

check RewardsMenu and replace the import for java.awt.Menu with the import for your actual own Menu class

manic vector
tardy dagger
#

yeah that's the issue

#

remove the java.awt.* import. it then probably complains about e.g. missing imports for Color

manic vector
#

Okay removed it

#

Then what?

#

Just compile it?

tardy dagger
#

yes

#

if it's a maven project, mvn package

manic vector
#

gradle

tardy dagger
#

if it's gradle, usually ./gradlew build or ./gradlew shadowJar

manic vector
#

I just clicked this

#

Should work, shouldn't it?

#

nvm, just did ./gradlew build

#

Sorry, never coded. I really know basically nothing

#

We just need to fix this asap lmao

tardy dagger
#

is that IntelliJ?

manic vector
#

it is

tardy dagger
#

double click that. if however there is also a "shadow" tab go there and use "shadowJar" isntead

#

in the old IJ gui, the "elephant" button will be labelled "Gradle"

manic vector
tardy dagger
#

open RewardsMenu, the "extends Menu" will be marked as red. hovering over it will offer you to import the class - it should offer you to import one class called Menu that's from your project, right?

#

NOT the java.awt.Menu one

manic vector
#

Seems fine to me

tardy dagger
#

check the imports at the top of the class

manic vector
tardy dagger
#

does it again mention java.awt.* or java.awt.Menu ?

manic vector
#

no

tardy dagger
#

ok then you can try to build/shadowJar it again

manic vector
#

Same error

tardy dagger
#

is your project on github? then I can quickly check it out

manic vector
#

It's private

tardy dagger
#

if you trust me, you can add me as outside collaborator quickly

#

otherwise, you gotta wait until your dev is back

manic vector
#

dm me please

tardy dagger
#

lol aternos is suddenly flagging all my plugins as "malware risk"

wintry plinth
royal cargo
#

Can I ask something here?

crude cloud
#

well you just did

royal cargo
tardy dagger
tardy dagger
sullen coral
#

What is the best way to pathfind for an arrow to reach a player?

compact perchBOT
#
FAQ Answer:
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait

Source

half harness
#

Not as in depth but

half harness
brittle leaf
# manic vector

arent you supposed to have an import if you are extending something? cus i dont see any mention of Menu there

half harness
sullen coral
#

What is the best way to provide effects to the player when they are holding some item in their offhand?

oblique heath
#

probably to have an InventoryInteractEvent listener that checks for that item being put in/out of the offhand

#

an alternative is to use a runnable that checks the slot every N ticks but that seems less optimal\

feral notch
#

@half harness that time you helped me it still didn't work

prisma wave
#

wow dkim

#

I expected better

oblique heath
#

smh dkim caught lacking

wind patio
#

damn dkim

#

crazy

tawdry zinc
#

hello guys, I'm new to minecraft and plugin development, I want to develop a plugin for a server I have in mind that manages authorization factions and so on, one thing I don't understand is how mamy types of plugin apis are there? does the server making client have something to do with it? or I can develop one plugin and make it work on any server type?

distant sun
#

Bukkit (spigot, paper, whatever other forms) which is basically vanilla minecraft, fabric and forge for modded minecraft which can require the client to have certain mods intalled too. There's probably others but these are the ones I know of shrug

#

Client mods and server plugins are different things if we are talking about vanilla minecraft.

potent nest
#

sponge trollface

distant sun
#

The complexity of plugins made to work on muliple platforms depends on what the plugin does.
E.g. if you don't do anything with the world (place blocks, spawn entities, whatever) it might be easier to accomplish multi-platform support than otherwise

tawdry zinc
distant sun
#

Uh probably (?)

tawdry zinc
#

when you say place blocks etc do you mean that the ID change?

#

so you can't use the same ID for multiple versions?

oblique heath
#

i think gaby means that it's easier to achieve multiplatform support when you limit your interactions with the minecraft api(s) you're using

#

you can use any API you want but each one is limited to their platform

#

the main ones as mentioned are the Bukkit API, which lets you run on bukkit platforms like Spigot and Papermc

#

and then the Forge API for running on forge servers / forge clients and the Fabric API for running on fabric servers / fabric clients

oblique heath
#

as in, the server software you download straight from mojang

tawdry zinc
oblique heath
#

wdym by server clients

#

like clients that players use to connect to servers?

#

or server softwares

tawdry zinc
oblique heath
#

we already listed them

#

bukkit, fabric, forge are the big ones

#

bukkit has a bunch of different implementations under it (spigot, paper, etc) but its plugins are pretty much all cross compatible with each other

#

although paper expands the api a bit so if you use paper api exclusives you might not be able to backtrack back to spigot

tawdry zinc
oblique heath
#

fabric and forge are meant for modding the game with new blocks, mobs, mechanics and stuff

#

although you're obviously not required to do any of that

#

and for servers that use fabric or forge mods that do this ^ players are required to have a corresponding clientside mod installed so that their client knows how to display those new blocks / mobs / etc

#

meanwhile Bukkit plugins limit the developer to only manipulating existing minecraft features, which means that any players that join a bukkit server will never need to modify their own client

tawdry zinc
potent nest
#

paper adds useful api and also heavily improves performance

#

(it's based on spigot)

wind patio
#

yeh paper is pretty based

oblique heath
#

there are also a bunch of forks of paper

#

there are about as many as stars in the sky and i dont really think any of them make too much of a difference

tawdry zinc
#

so if I develop a paper plugin then it will correctly work on any bukkit papermc server but might have issues on spigot ones even though the player does not see the difference

#

but if I then want to reuse or sell the plugin it will work on paper only servers

potent nest
#

yes

oblique heath
#

yes, assuming you are using the paper exclusive api in your plugin

tawdry zinc
#

hm it makes sense thanks, I'll go read the docs and see how the api works

half harness
#

@tawdry zinc
Also wanted to explain a little bit more on what server owners usually do in the bukkit ecosystem

  • bukkit: no longer exists by itself
  • spigot: basically bukkit but maintained and used by many (the majority of public plugins are built on spigot for compatibility)
  • paper: spigot, but modified for better performance and has an improved Api. Paper has also bypassed spigot as majority (that server owners run), so it is not uncommon to see public plugins for paper only as well (although can't be posted to spigotmc website which is where most plugins are)
    Then there's also Pufferfish (targeted for more performance) and a bunch more that base off of paper
#

_ _
I know you said you're a plugin developer so you don't really need that info (vs being a server owner) but imo it's nice to have more "background" knowledge about it

humble prism
#

paper has neat features aswell

#

builtin velocity support

half harness
#

Kinda but if you want more features then purpur for ex is a better option

humble prism
#

sure

half harness
humble prism
#

no

half harness
#

I never tested so idk

#

Wow

humble prism
#

its setup in papers global configuration

quaint isle
#

we can automate sexism now thonking

oblique heath
tawdry zinc
half harness
#

And classic autocorrect for the apostrophe

half harness
# tawdry zinc so it's a lot of community build stuff? I just launched successfully a test plug...

OK I can explain a bit more now

For plugins where you know that it'll be running on paper (or a fork of it), you should use paper api (ex if you're selling to me, I use paper, so you can make a paper plugin)
Only issue is public plugins - this has different opinions so I'll just say that spigotmc doesn't allow paper-only plugins, although there are some other websites for paper plugins etc

pastel imp
#

Welp, you have Hangar which is by the PaperMC Team but it currently doesn't support selling things there. So you would have Polymarket and BuiltByBit to sell your plugin

#

Also, may I advice going for Freemium instead of Premium? xD

ocean quartz
#

Spigot needs to swallow their pride and allow Paper only plugins

#

Best you can do right now is post on Modrinth, even if it's free you can make some money out of it

pastel imp
#

oh yeah ^^

#

Forgot their monetization system

distant sun
#

You get paid from ads displayed on your page or what?

distant sun
pastel imp
tardy dagger
#

(unless for paid plugins)

ocean quartz
# tardy dagger they do allow that

They don't, if a plugin is Paper only and it gets reported staff removes it
(Choco has confirmed this not too long ago on Paper discord)
And paid plugins aren't because they get reviewed and would be caught before being uploaded

tardy dagger
#

huh oh well then this has changed, mb

drifting aspen
distant sun
inner umbra
ocean quartz
#

Too much work for something that is not worth it, aka supporting spigot

inner umbra
#

Well... using paper it's already supported xD

tawdry zinc
#

hello guys, I would like to implement a roles system so to verify if the player has permission or not to run certain commands, what's the conventional way of creating the architecture? is there a way to list all roles in a json like file and pick from that or simila?

half harness
tawdry zinc
half harness
tawdry zinc
half harness
#

are you coding this plugin?

#

or configuring a plugin

tawdry zinc
#

coding it

half harness
#

ex LuckPerms for example, you'd do ```
/lp user maskirovka permission set coolplugin.admincommand

#

or assign that permission to a group

#
#

If you don't have LuckPerms already, I'd recommend it

tawdry zinc
#

or there is just admin and not admin?

#

my idea was to have different roles like admin, mod, builder etc

#

and then check if the player has permission to run different commands

half harness
tawdry zinc
half harness
#

alr
although what's your question?

half harness
tawdry zinc
# half harness alr although what's your question?

my idea was to create a class "RolesManager" with some methods inside like addrole deleterole getrole etc, now what about the data structure to store all the roles, should I go for a database or a json file with all the roles and different authority or check just by string

#

if "admin" can or can't etc

remote goblet
#

also your plugin variable literally doesnt exist in that class

#

you wanna do this

brittle leaf
#

ofcourse you can pick whichever case you want to store it in

#

upper, lower, doesnt really matter as long as its one of the two

#

i say to change the string to either lower or upper just so that theres very little chance for group objects to be stored multiple times with an identifier that is either case

#

eg admin,Admin,ADMIN,AdMiN,etc would end up with an admin group that could be set in the map multiple times and getting the right string to grab the object from the map is even more difficult

tawdry zinc
brittle leaf
#

tho you could go look at luckperms source since it is public on github

tawdry zinc
brittle leaf
tawdry zinc
#

something like that

brittle leaf
tawdry zinc
#

now the role could be a json or something like that without having to query

#

and from there the db saves the data as a backup

calm hedge
#

Hi everybody, I'm kinda new in plugin development; in these day I'm trying to learn guis. I searched through the internet but I still have many questions. Is there anybody more expert that can help me figuring out that?

inner umbra
#

Just ask your questions and await a response.

pastel imp
#

anyone here ever used Morphia? Is it any good?

wind patio
#

sounds like a drug name

pastel imp
#

lol

tardy dagger
#

Task :publishPlugins
Publishing plugin com.jeff-media.fix-javadoc-plugin version 1.0
Thank you. Your new plugin com.jeff-media.fix-javadoc-plugin has been submitted for approval by Gradle engineers. The request should be processed within the next few days, at which point you will be contacted via email.
yaay

tardy dagger
#

can one publish gradle plugins to a normal maven repository?

prisma wave
#

I don’t believe so

#

Pretty sure they have some custom metadata

#

Well

#

Maybe

#

It depends how strictly you define “normal maven repository”

#

File host with maven support? Yeah I guess

#

Full disclosure I essentially made this answer up

#

I don’t know

#

Fucking love making things up and presenting the information as fact

half harness
#

Paperweight used to I think

#

Wait

half harness
#

Which is a maven repo

prisma wave
#

the file system is a file host

#

theres no "first-class" maven support

tardy dagger