#help-development

1 messages · Page 1913 of 1

lavish hemlock
#

and composition is

#

honestly much, much more preferable

#

I wonder, does DI count as a form of composition...?

quaint mantle
#

Hello, I have a question, how to create a cuboid (region) that will be secured (you cannot destroy blocks or place it) and when the player enters, an example action is performed, for example: changing the player's server in bungeecord. I have a problem with determining its coordinates. Thank you in advance for your help : )

vocal cloud
#

if(true)big();

lavish hemlock
#

Ye I've heard cool things about Spring

#

I saw its uhhh

#

REST API

#

I'm not entirely sure what Spring does though

#

I have also never actually used it since I've never found a use-case for it

vocal cloud
#

It's pretty insane to be honest.

lavish hemlock
#

I mean there's like fuck tons of Java projects that just exist for decoupling

#

God, I could not begin to understand shit like OSGi

#

OSGi is cool as a concept

#

Modular Java ✨

#

But then you look into how to use it

#

And it's

#

oh no

vocal cloud
#

You want an endpoint?

@GetMapping("/v1/blah/blah")
public String getWhatever() {}
and voila an endpoint

lavish hemlock
#

AND WHAT THE FUCK IS A MICROSERVICE?!?

vocal cloud
#

You don't actually need to register anything

#

ever

#

Besides any custom configs

lavish hemlock
#

Yeah reflection is really cool cuz of that

vocal cloud
#

But like. It's so strong

lavish hemlock
#

Later on

vocal cloud
#

API's are literally brain dead to make it's so nice.

lavish hemlock
#

They're replacing all java.lang.reflect implementations with ones that use java.lang.invoke

vocal cloud
#

So it gets a pass even though it's AbstractBeansOfTypeDependsOnDatabaseInitializationDetector

lavish hemlock
#

Which should give a big boost to performance

#

Apache and Gradle have similar codebases

#

I say "Apache" and not "Maven" because a lot of their projects are like that

vocal cloud
#

They have auto mappings for SQL,Mongo etc. To make setting up databases and queries a breeze

lavish hemlock
#

AbstractForwardingRepositorySystemSession

vocal cloud
lavish hemlock
#

I mean the nice thing about Apache's codebases is that they don't have like

#

endless lists of classes that don't look connected to each other at all

vocal cloud
#

Spring Boot is so easy until you get into the config section

lavish hemlock
#

What, is it one of those .xml configs?

quaint mantle
#

oop we use now is FAKE

#

we do procedural programming with passive data bags

lavish hemlock
#

It seems like an old trend of Java was to configure everything via .xml files within the classpath resources.

#

Look at Hibernate for example :)

#

Better than magic constant names via Map<String, String>

vocal cloud
#

But again they make it a bit nice by having mappings using annotations.

#

Stacking them like dominos

lavish hemlock
#

I think the problem with OOP

#

Is that you spend more time figuring out the API

#

than you spend writing the actual implementation

vocal cloud
#

I mean that's sort of problem with any large code base imo. Like at some point even the most optimized code base will get complicated by just being huge

lavish hemlock
#

We still have good ways to manage it though

vocal cloud
#

Javadoc

lavish hemlock
#

Eh not javadoc, nobody writes good ones anyway

#

I was referring to langs like C

#

They manage to have cleaner codebases than Java

#

Like, let's see

#

415 lines of XML in a pom.xml

#

So many different folders

#

src/main/java, src/main/resources (although this is justified, but it's still annoying)

vocal cloud
lavish hemlock
#

You seen man pages?

#

Those are cool

vocal cloud
#

Some of them are a mess tho

#

The nice thing about javadoc is it standardizes it so you know your way around all of them

lavish hemlock
#

btw actual Gradle class:

#

NamedDomainObjectCollectionSchema.NamedDomainObjectSchema

lavish hemlock
#

I do not like Gradle very much

quaint mantle
#

image using maven

#

Python 4 the win

lavish hemlock
#

But I also do not like Maven very much

vocal cloud
#

maven is a bit um xml

lavish hemlock
#

Yes

vocal cloud
#

But gradle has always been a thorn in my side

lavish hemlock
#

Simple build configurations

#

End up

#

to be

#

HUNDREDS of lines

vocal cloud
#

People like "it's so much better" then show me the code that calls a bunch of maven dependencies

lavish hemlock
#

But then Gradle is incredibly unstable at times, has terrible API, and terrible error handling

#

I mean the Gradle DSL is alright

#

But

#

Have you ever

#

tried to write a Gradle plugin...?

vocal cloud
#

I'd sooner die

lavish hemlock
#

It's hell.

sterile token
#

Gradle zzz

vocal cloud
#

Have you tried writing Spigot Plugins

lavish hemlock
quaint mantle
vocal cloud
#

Manually import all the jars

#

Manually shade your jars

lavish hemlock
#

Anyway so the problem with Maven:

  • Outdated (imo)
  • Too complex
  • Slow

The problem with Gradle:

  • Buildscripts
  • Too complex
  • Slow (sometimes)
#

There's also Bazel

#

That one's a bit more recent

vocal cloud
#

Time to make your own

#

I call it Madle

lavish hemlock
#

Apparently Google uses it or whatever but eh

#

It looks kinda like CMake

#

Oh yeah speaking of Make

#

Make is actually p'cool

#

I haven't truly learned it but it's refreshing to see a simple buildsystem

vocal cloud
#

The errors come out in Klingon and you need to manually paste the enire main function for every library in the config

lavish hemlock
#

There's also Ninja, but you never write buildscripts for that thing manually so...

#

Like that's literally how Ninja is designed

vocal cloud
lavish hemlock
visual tide
#

is there any reason you might keep your own Random instead of using ThreadLocalRandom?

lavish hemlock
#

Uhhh speed differences I believe

lavish hemlock
#

Personally I just make a wrapper around a Random instance :p

analog prairie
#

Is this error player.teleport(Objects.requireNonNull(player.getBedSpawnLocation()));?

visual tide
vocal cloud
#

Alright this is the perfect example of intellisense is not intelligence

lavish hemlock
#

You want to use != null, not requireNonNull

vocal cloud
#

Just cause intellisense provides a solution to a problem doesn't mean it's actually a solution

vocal cloud
lavish hemlock
#

(y'know assert would be so cool if it wasn't locked behind a runtime flag)

visual tide
#

assert is just making the stacktrace harder to read

sterile token
#

Gradle its Zzz and Maven also doesnt have any problems. I have been using it since a year. And never get problems

lavish hemlock
visual tide
#

then you might as well throw the original

analog prairie
vocal cloud
lavish hemlock
#

Just because Maven doesn't cause problems don't mean it doesn't have any.

sterile token
lavish hemlock
#

No it does.

sterile token
#

You because only use gradle

lavish hemlock
#

415 lines of XML.

analog prairie
#

org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1240) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.network.protocol.game.PacketPlayInFlying.a(SourceFile:114) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.network.protocol.game.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:42) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:151) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.c(SourceFile:23) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1158) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3398-Spigot-f4ff00f-f3828bb]

vocal cloud
#

?paste sheesh

undone axleBOT
lavish hemlock
undone axleBOT
lavish hemlock
#

Gradle is just one I use because I prefer it over Maven's complexity (although that doesn't mean I like Gradle)

#

I use NPM/Yarn, Cargo, and Make as well :p

#

And Cargo is fucking brilliant like hollllly shiiiit

sterile token
#

Maven its really easy

analog prairie
vocal cloud
#

Maven is easy until the errors drop and no one understand them

#

I love how the error is so predictable

analog prairie
lavish hemlock
#

Maven actually uses a lot of reflection btw.

vocal cloud
#

What Objects.requireNonNull throws a null if the object is null?

sterile token
vocal cloud
lavish hemlock
#

But yeah I believe statistics show Maven is slower than a second Gradle run.

sterile token
#

Yeah

lavish hemlock
#

I haven't benchmarked it myself :p

vocal cloud
lavish hemlock
analog prairie
sterile token
#

With a ryzen 7 3700x and 64gb of ram. A multi module Project of 8 modules its built in less than 10m

vocal cloud
sterile token
#

🤣

lavish hemlock
#

I can literally run Javac in like 5 seconds

#

If Maven takes a minute and 10

#

That's a problem

vocal cloud
#

The longer it takes to compile the more time I can spend drinking coffee and realizing I forgot to fix a TODO

lavish hemlock
sterile token
#

but come one dont use that freaky shets

#

Its like the one saying they code plugins with Vscode

lavish hemlock
#

Incremental compilation

#

Is slow

#

Why does it take literally 3 minutes to run a test...?

#

That makes test-driven development harder.

#

As you spend more time running tests than fixing problems.

#

But yeah I'm boutta write plugins with nano and make 😎

#

Actually fuck that's a funny idea

sterile token
#

In conclusion if you dont like how maven/gradle works dont crítice. Just dont use it. Or build your system and then told how it works 🤡

vocal cloud
#

Use VI

lavish hemlock
#

I have a right to criticize the things I don't like if they're terrible :p

vocal cloud
#

My Dad has a working system that runs DOS I'm sure I can get something together kekw

vocal cloud
lavish hemlock
#

And I would've made my own system by now if the Maven resolution API wasn't a piece of shit.

lavish hemlock
vocal cloud
#

Maven 2 Electric boogaloo

sterile token
# vocal cloud 60s

Oh lol its amazing. With that age many of them dont even know how to turn on a computer

lavish hemlock
#

I once saw this interesting project

vocal cloud
lavish hemlock
#

Cargo4j

sterile token
#

What that cargo yest

#

I cannot find info about on google

lavish hemlock
#

Cargo is Rust's buildsystem

sterile token
#

Ahh zz

lavish hemlock
#

And it's a very nice one too

#

Primarily because it uses an actually readable, modern language

vocal cloud
#

Rust likes memory the way I like rust. Safely disposed of

sterile token
#

I only use Java not yet like Rust, python, js, ts really ugly sintaxis and hard reading

lavish hemlock
#

r/boneappletea

#

sintaxis

#

sin taxis

sterile token
#

I will always use Java and C#

#

Sintaxis isnt syntax!

vocal cloud
#

C# is Microsoft and Microsoft is awful

lavish hemlock
visual tide
lavish hemlock
sterile token
lavish hemlock
#

I mean yeah VSCode is pretty nice but it's always been kinda slow

vocal cloud
visual tide
#

😐

lavish hemlock
#

Also yeah IntelliJ is just better :p

#

If they had community editions for all their IDEs I would use them

visual tide
#

vs4j 😄

sterile token
#

I would never recommend Vsckde for plugins

vocal cloud
lavish hemlock
#

VSCode has a Java, Maven, and Gradle plugin.

#

That's all you need to make a plugin ;)

sterile token
#

Using Vscode for plugins its just like hard coding

#

I dont wanna think cuz I will have more headache even gradle zzz

#

Maven good

vocal cloud
#

Gradle is better if you know what you're doing otherwise maven

lavish hemlock
#

I should totally make a plugin with just make and nano

vocal cloud
sterile token
lavish hemlock
#

I don't actually know how to use Vim

#

Sooo

#

I don't

#

Because I like the way Nano works more

#

I don't like the command style of things since it feels like you invest too much into learning to get anything out of it

sterile token
#

Nano and vim are linux editor right?

lavish hemlock
#

There's nothing more natural than a CTRL+S

lavish hemlock
#

Meaning you write code.

#

In your command prompt.

vocal cloud
#

My dad uses Vim and it's so confusing how he just knows all the shortcuts

lavish hemlock
#

I mean tbf writing code in Windows Notepad would be way worse

#

And do it with like

#

Arial or smthn

#

no monospaced fonts

vocal cloud
#

I love it

#

it feels like a joke but it's not

lavish hemlock
#

Oh yeah also

#

Why the fuck is frontend development so hard??

#

I don't understand CSS at all

vocal cloud
#

Learn a library

lavish hemlock
#

And then you have DOM frameworks on top of it like fuckin'

#

React or Vue

#

I mean Svelte is really nice though it's very natural

lavish hemlock
#

I mean if Bootstrap didn't look so samey I would use it honestly

#

Newer versions of Bootstrap don't require jQuery :)

vocal cloud
#

Bootstrap is nice yeah.

#

Or write your own

lavish hemlock
#

I know CSS syntax and like

#

A few buzzwords but

#

It doesn't make sense to me

#

Because you make like a single change to the properties of an element

#

And it makes no difference to the look

#

So you're just like "what? that was supposed to do something..."

#

And then your little StackOverflow answers you find on how to do something cool end up breaking everything else

#

Like legit the fucking "always put footer at bottom of a page" stuff I see ends up breaking a lot of my code.

vocal cloud
#

I know enough to make my own stuff but I just lazy it up to boostrap if I need it

tardy delta
vocal cloud
#

There are some PHP frameworks that are nice

lavish hemlock
#

I could totally suffice with like

#

JS

#

Although JS has a nightmare of an ecosystem

tardy delta
#

Js is a main for me

unreal quartz
vocal cloud
# unreal quartz Because you get used to it, like how you get used to shortcuts in 'modern' progr...

Learn how to exit Vim editor with in this episode of the Stack Overflow podcast. Over a million developers have struggled with this question on StackOverflow.com, join us as we breakdown all you need to know about Vim.

lavish hemlock
#

When your language has literally 4 different ways of resolving modules

#

UMD, AMD, CJS, ES6 😎

vocal cloud
#

It's a little different then modern stuff

unreal quartz
#

I mean

lavish hemlock
#

Actually there's a 5th method and that's importing stuff through <script> tags

unreal quartz
#

If you're used to spending most of your time in a terminal anyway it's not too much of a stretch

lavish hemlock
#

But that breaks IDE inspections :)

vocal cloud
lavish hemlock
#

maowsbasement

unreal quartz
lavish hemlock
#

I shouldn't have to get used to my text editor tho :p

vocal cloud
unreal quartz
#

I don't know anybody who actually uses nano

lavish hemlock
#

Literally most guides I see say "use nano if you're a beginner"

lavish hemlock
unreal quartz
#

Anybody IRL*

vocal cloud
#

I literally don't know anyone who uses anything but nano

unreal quartz
#

I suppose I'm friends with too many nerds

vocal cloud
#

Or you're old

lavish hemlock
#

I would like if there was some kind of

#

nano-like editor

#

That wasn't vim

#

But was just nano but more modern

vocal cloud
#

LMFAO

lavish hemlock
#

neonano

vocal cloud
#

emacs

#

HAHAHAHAHAHAAHAHA

lavish hemlock
#

Emacs is confusing and scary

#

and I have actually used Emacs

#

I broke everything immediately

#

cuz I didn't know what I was doing

vocal cloud
#

VIM is just a sand pit at the least

lavish hemlock
#

ALTHOUGH

#

There is one cool thing about Emacs:

#

You can run games in it

#

Productivity 100

vocal cloud
#

I mean it's not as cool as the excel spreadsheet games

lavish hemlock
#

Fun fact:

#

Powerpoint is Turing-complete

unreal quartz
#

Well you can write games in vimscript if you really want to

grim ice
#

wait

#

i wanna store some text in a database

#

but if i put the credentials in my code

#

to use it

vocal cloud
#

Then do it ™️

#

Use a config

grim ice
#

others will be able to write too

#

they can get the config too>

vocal cloud
#

I mean at some point your creds load into memory and they're there for anyone

grim ice
#

then wtf do i do

hexed hatch
#

nothing

#

give up

lavish hemlock
#

btw @vocal cloud you truly should check Cargo out, it's a great buildsystem

grim ice
#

WHAT

#

then how do i store info of people

vocal cloud
#

You put them in a config

unreal quartz
#

Well you can start by telling us what you're trying to achieve...

vocal cloud
#

then load the config

grim ice
#

this isnt a plugin

#

im making a mod where i have to store a number

#

for every person

vocal cloud
#

This is like the people telling me they want to make their plugin uncrackable. Like give me your "uncrackable" plugin for a few 🤡

grim ice
#

somewhere that its persistent

hexed hatch
#

is this mod for multiplayer

grim ice
#

yes but its client side

vocal cloud
#

Wat

#

Client side?

#

That's not how this works at all

hexed hatch
#

okay so this mod communicates with a server?

grim ice
#

no

grim ice
hexed hatch
#

so even if the player manages to hack their client to add or change numbers for other people

#

why does it matter

vocal cloud
#

You want to store data from mod client-side?

#

That's a nono

grim ice
#

bruh

grim ice
vocal cloud
#

What exactly is your mod going to do

hexed hatch
#

if this is just a client side mod, why does it matter if someone fucks with their mod

grim ice
#

its for rating players

#

its made for a specific mini game btw

vocal cloud
#

So it's okay for people to mess with the data you save locally right?

grim ice
#

if u can change people's ratings

hexed hatch
#

I'm so confused

#

it shouldn't be global, this should be going through a server to handle this

grim ice
#

then wat do i do

vocal cloud
#

You don't make it client-side for starters

hexed hatch
#

changing it for everyone shouldn't be possible

#

because if it can, it will

#

client side is nono

grim ice
#

the credentials of the database

#

are in the code

vocal cloud
#

No they're not. You use a config

grim ice
#

they can access

#

the config

#

too?

hexed hatch
#

there should be no direct access to this database with this client

grim ice
#

i should make a backend or smth?

vocal cloud
#

Forge has plenty of config stuff you can add

unreal quartz
vocal cloud
#

But you really should not be doing anything async with forge

grim ice
#

and how to make a backend

grim ice
#

but what do i do

unreal quartz
#

Google

grim ice
#

okay

vocal cloud
#

Not use forge to do async tasks

#

Use spigot. Open guis

#

If you have a custom forge GUI then still use spigot for the data

#

because with spigot its better than async forge

grim ice
#

what?

#

this isnt a mod u install on the server

vocal cloud
#

Um that's not how forge works

grim ice
#

what

#

ive made a mod like that before

vocal cloud
#

So if you make a custom GUI and it's only on the client you'll have to be sending the server custom packets

grim ice
#

its only client side, does stuff on the client not the server

vocal cloud
#

Or you'll have to make an API somewhere that the mod can access

grim ice
#

idk wdym

vocal cloud
#

but again that's async stuff that forge doesn't like

grim ice
#

either way that doesnt matter

#

forget this thiis is a java question

vocal cloud
#

You host the database somewhere else not on the clients machine. Then they query it using an API

grim ice
#

forge has nothing to do with it

grim ice
#

i know

#

but to connect

#

i need

vocal cloud
#

Then what exactly is the issue here

grim ice
#

the credentials

vocal cloud
#

You need an API

#

Not credentials

grim ice
#

yes and how the heck do i make that

vocal cloud
#

Depends what kind of server you have for the database

#

If it only allows html/php then you have to make a php api otherwise you can use something like Spring Boot

grim ice
#

is it a ton of work

unreal quartz
#

Depends on your level of expertise

grim ice
#

never done smth like this before

unreal quartz
#

So yes

#

Have fun

grim ice
#

is there no simple way of doing this

vocal cloud
# grim ice is it a ton of work

Spring Boot is super simple and easy to implement but only if you really need to. Otherwise a simple php request will work

#

yes there is. Using a db and php to interact with the client

#

saves you the pain of needing credentials

grim ice
#

what db

vocal cloud
#

Whatever db you choose. PHP works best and native with SQL

grim ice
#

is MySql fine

vocal cloud
#

Yes

quaint mantle
#

MariaDB tho

vocal cloud
grim ice
#

ok so

#

is there a tutorial

#

on this

#

or some guide

vocal cloud
#

plenty of them

grim ice
#

is there some keywords

#

to google

vocal cloud
#

I mean depends what you want to do

grim ice
#

i just told u tho

vocal cloud
#

Like I said

#

Spring Boot is great but you'll need to learn containerization or something

#

PHP for something more simple but you'll really need to make sure you don't have any injection issues

grim ice
#

i want something easy since this is literally not the biggest feature i should be working on

#

ill do PHP

vocal cloud
#

Just make sure to sanitize your inputs

grim ice
#

idk what that means

#

but ok

vocal cloud
#

Once the API is complete you just need to link the mod to it. Which isn't going to be easy as forge hates async

grim ice
#

oh god

#

so what do u think i should do

vocal cloud
#

The fun is in figuring it out for yourself

grim ice
#

this isnt fun

#

im just malding

vocal cloud
#

I mean I find the figuring-out part to be the most fun

quaint mantle
#

Im pretty sure there's lighttweight web libraries for java

visual tide
#

how would i copy a file originally in /resources into the plugin data folder?

quaint mantle
vocal cloud
visual tide
#

thanks 😄

#

wait

#

can i just use JavaPlugin#saveResource

vocal cloud
#

?jd

vocal cloud
#

You tell me

visual tide
vocal cloud
visual tide
#

i shall

grim ice
#

this is it right?

vocal cloud
#

I mean yes if you want the complex explanation of it

#

The mod is your presentation tier

grim ice
#

this is fucking complex

#

i have the first tier

#

and the third one

#

now how the fuck do i make the second

vocal cloud
#

Application tier?

#

That's your plugin or whatever handles the creation of the data for the db along with the API that sends it to the presentation tier

quasi flint
quaint mantle
#

Hey, so I am making some custom items which are going to be given to players/put in chests and stuff (for a server). Now I need to balance the items, so I will have to change some of the properties of the items on the way, so I was wondering, how would you go about updating every custom item with their new properties? I already have custom nbt identifiers for each of the items.

#

For something like hypixel skyblock, they are able to balance stuff

lucid bane
#

maybe use Inventory open event

and chevk there’s item which has to be updated

thick venture
#

Maybe you can do an inventory interact event and check if it has been update, if not update it

quaint mantle
#

hm that could work

thick venture
#

In the nbt data store the system.currenttimeinmillis

quaint mantle
#

maybe its just me but I don't like the idea of not-updated items sitting in unopened inventories tho

#

is there some way to get all inventories on the server

#

xD thats alittle crazy tho

thick venture
#

Players wint notice it

quaint mantle
#

that is true

spiral light
#

get all worlds .... get all chunks .... get all tile entites .... get all containers .... get all item of containers and update them

thick venture
#

You would need to store the location with every chest

lucid bane
#

it would be HARD when you want to trace all items

thick venture
#

Better to just do with inventory open event

hardy swan
#

ask players to create support ticket on server's discord

quaint mantle
#

wHaT

lucid bane
#

yes run your code in inventory open event

quaint mantle
#

yup ima do that

vocal cloud
#

Anytime an inventory is opened check the items data against the latest. Make each item have an ID and when an item is balanced make it so that you have a check for ID replacement to replace an item with an outdated ID with a new item

thick venture
hardy swan
#

hoppers and dispensers go brrr

quaint mantle
thick venture
quaint mantle
thick venture
quaint mantle
#

still why not just check against the new item

thick venture
#

This way you only need to do 1 if statement per item

vocal cloud
quaint mantle
#

okeh

thick venture
#

Do u edit your items in game/via commands?

quaint mantle
#

not planning on

vocal cloud
#

Have a main ID for general items then add a subID for that specific item

quaint mantle
#

mostly in code

thick venture
quaint mantle
#

yeah its kinda early stage rn

spiral light
#

well hypixel just saves your inventory and when it loads your inventory it just checks for the id and not what stats are written down ... they read the ID and some data like enchantments or runes and just apply them to a new plain item of that id

quaint mantle
grim ice
#

i still cant figure it out

#

help pleaase

vocal cloud
#

I'm not here to teach you how to make APIs and connect the to databases. That's something you'll have to learn.

grim ice
#

yes but

#

like some tutorial or smth

#

idk

vocal cloud
#

Try this

#
You will create a MySQL database, build a Spring application, and connect it to the newly created database.```
grim ice
#

but there is a problem

#

if i make this

#

i will make a httprequest with the first tier which is my mod?

#

so i can write

#

on the database

vocal cloud
#

The mod will and should not touch the database

grim ice
#

it will use the application

vocal cloud
#

The plugin should

#

Tier 2

grim ice
#

yes

#

but when tier 1 tells tier 2

#

to do smth

#

cant people steal that code and use it somewhere else maliciously

vocal cloud
#

The API that you create through spring allows people to get only the data you allow them to

#

Tier 1 shouldn't be able to tell Tier 2 anything

grim ice
#

what

#

then how would i write and read

#

on the database

vocal cloud
#

Through tier 2

#

Why would the client ever need to write anything to the database

grim ice
#

so for example

#

there is a number

#

that increases

#

when ever u do smrth

#

smth

#

and that number should be written when smth happens not whenever u want it to

vocal cloud
#

This is for a server right?

grim ice
#

no

#

a client

vocal cloud
#

Wait what

#

So this is for singeplayer?

grim ice
#

but that thing only happens in a server

#

no its for a client playing in a server

vocal cloud
#

Then the server should be handling it

grim ice
#

if i can change hypixel

vocal cloud
#

And giving out the points

grim ice
#

then maybe

#

lmao

#

its a client side rating system for players

vocal cloud
#

What?

grim ice
#

i wanna store the rating

#

so basically a player rates another player

vocal cloud
#

So this isn't even your server

grim ice
#

no its not

vocal cloud
#

you want to make a mod which isn't spigot for a server that isn't spigot or yours

grim ice
#

Yes

vocal cloud
#

In that case you'd need to use authentication and link accounts

#

But theres no way people won't be able to spoof the data for their account

grim ice
#

Bruh

#

so this whole thing is impossible

#

without them being able to change stuff

#

to whatever they want

vocal cloud
#

Well I thought you controlled the server facepalm

grim ice
#

i dont

vocal cloud
#

The server is where the processing should be happening

grim ice
#

bro if i did

#

i wouldnt be asking here

#

i cant edit hypixel

vocal cloud
#

Yeah no shit this is a spigot discord Sherlock we except you to own the server because we're expecting it to be spigot related

grim ice
#

is there anything i can do

quaint mantle
#

make a fabric or forge mod

#

would be my suggestion

grim ice
#

I am?

#

bruh

vocal cloud
#

I mean you can make it but that doesn't mean they can't spoof any data from it

grim ice
#

change data

#

however they want

vocal cloud
#

Yup

grim ice
#

that doesnt make sense then

vocal cloud
#

Makes perfect sense

grim ice
#

for players to rate themselves?

vocal cloud
#

Give the client authority and the client will always abuse said authority

#

Yup

quaint mantle
young knoll
#

Only on Wednesdays

grim ice
#

this channel is for development

#

not just spigot

quaint mantle
#

srs

#

wait what

#

ok

#

cool

#

didn't even know that

hardy swan
#

o.O

vocal cloud
#

Yeah but you have to explain that you don't own the server cause up until 1m ago i thought you were here to make a full client server relationship

young knoll
#

Just buy hypixel so you do own it

quaint mantle
#

-_-

hardy swan
vocal cloud
#

I'll ban you for insinuating you don't know how to use a lazy optional

#

That's it leave

#

No typing

hardy swan
#

What is a lazy optional? aka streams?

vocal cloud
quaint mantle
#

I do not see people productive here so I am leaving now

vocal cloud
#

Nothing of value was lost

quaint mantle
#

I am lost

vocal cloud
#

Indeed

quaint mantle
#

👽

quiet ice
#

Error

hardy swan
#

emotional damage

quaint mantle
#

I did it to myself tho

quaint mantle
#

No is that a

#

yes

#

ok

quiet ice
#

it's best to just quit at this point

summer scroll
lime wave
#

Hi guys

#

So

#

Anyone can turn a .java file in a .class for me?

vocal cloud
#

field.setAccessible(true); hoo boy

lime wave
#

Plss

quiet ice
vocal cloud
#

idfk

quaint mantle
#

thats called compiling?

vocal cloud
#

yeah use javac

young knoll
quiet ice
#

mvn and gradle are also good

#

if you are really desperate, makefile can help too

quaint mantle
#

oh gosh makefile

quiet ice
#

basel is also another way of compiling it

hardy swan
quaint mantle
#

xDxD

lime wave
#

Thsxxx

hardy swan
#

pls note that that was a joke

quaint mantle
#

wait what advice did you take

quiet ice
#

gcj should also be able to compile java

lime wave
vocal cloud
#

lul

quaint mantle
#

cool good

vocal cloud
#

I was joking with that use javac

quiet ice
#

And ecj is also pretty good

quaint mantle
#

when you try to use makefile with c++

lime wave
#

Wait ;-; so, what I use?

vocal cloud
#

javac

hardy swan
#

not wrong

quiet ice
#

javac, gcj, ecj, or something else that uses one of these three compiliers

lime wave
#

Ok

#

Thx

#

Have a nice day, and a huge hug from Brazil :)

quaint mantle
#

Take that

grim ice
#

is just

#

Chef's kiss

quaint mantle
#

lolol

#

he funny

lime wave
#

come to brazil one of these days

quaint mantle
#

I am literally shivering so yes please

lime wave
#

:)

vocal cloud
quaint mantle
#

Interesting message

lime wave
#

Mas alguém fala português aqui?

#

É meio difícil digitar em inglês ksksks

#

Não pode falar em outras línguas né?

#

;-;

#

Desculpa

vocal cloud
#

Pretty sure it's English only though I imagine not enforced that often

quaint mantle
#

I wish I did not understand that

#

My wish came true 👽

lime wave
#

Meu inglês ainda é meio ruim pra falar a verdade

quaint mantle
#

gets banned

lime wave
#

I forgot

#

;-;

#

Srry

#

But thx for helping me to compile the .jar

#

.java*

quaint mantle
#

Well actually I cannot find anything that says English only

#

interestin

lime wave
#

I speak Portuguese as my primary lang and English as secondary, Spanish as 3 and a lil bit of japanese

#

:)

quaint mantle
#

the only things I speak are Dutch and English

lime wave
#

Alien? Lol

#

What is dutch? I forgot for what it translate

quaint mantle
#

👽 👽

#

heh

#

thats its translation

lime wave
#

Speak a lil bit of dutch

#

Say, I'm from brazil

#

In dutch

quaint mantle
#

Ik kom van Brazilië

lime wave
#

:O

quaint mantle
#

dat is niet echt waar, ik moest het van hem zeggen

lime wave
#

Good bro

agile sinew
#

when i hold right click, it has delay about 0.2s so can I reduce this delay?

quaint mantle
lime wave
#

What a 0,2s delay changes

#

?

quaint mantle
#

idk

lime wave
#

Mine is like 2s ;-;

quaint mantle
#

huh

lime wave
#

Lol

quaint mantle
#

what do you mean

agile sinew
#

hmm

lime wave
#

2s of delay

#

On click

quaint mantle
#

he means in minecraft, when you hold right click on an item

#

or on a block

#

or both

lime wave
#

Ohhh

#

Just do a autoclick

quaint mantle
#

:|

#

no

lime wave
#

If you want to build fast

quaint mantle
#

this is spigot dev

#

not hack dev

agile sinew
#

I'm making gun so

lime wave
#

I programed an autoclick, but I use just 4 build

#

So what's the problem?

agile sinew
#

gun can fire continuously

quaint mantle
#

the problem is that's not what he is asking

lime wave
#

Oh

#

I didn't noticed

#

Srry

quaint mantle
lime wave
#

So ya want to make when you hold right click you shoot?

quaint mantle
#

but relying on the event speed is not good

lime wave
#

You can't make to shoot when holding Q? It has a bit minus delay

#

Srry for bad english

quaint mantle
#

well

#

right click is more convinient

lime wave
#

Ye

quaint mantle
#

and when holding Q, it does not instantly start going quick

lime wave
#

Makes sense

quaint mantle
#

right click is possible tho

#

but im now outta here I have some things to do xD

#

cya

lime wave
#

Bye

#

Also, I think is better you do left click to shoot, because if is right, people can shoot and hit at the same time, and with left click bedrocks can use tho

agile sinew
#

hmm

lime wave
#

:)

#

You are going to use a texture pack?

#

Add a custom texture tag to the item if you want to make it

#

Or to add later

#

If you want, I can try to make a gun texture or find one for you

#

Also, there's so much plugins that already do that

#

You don't exactly need to make one

#

If you need some help or ideas, I will be there

agile sinew
#

in CrackShot plugin, its delay reduced

quaint mantle
#

right click is interact

#

so he has the right one

#

by default of course, you can change it

quaint mantle
agile sinew
#

hmm

#

can you tell me how to do that?

young knoll
#

Iirc the event fires every tick

#

Can’t really get much faster than that can you?

hasty prawn
#

Could fire multiple times per tick

young knoll
#

Yeah but they would all fire together

hasty prawn
#

Yeah, it really just depends on the gun I suppose.

agile sinew
#

umm

#

so you mean that every tick gun fire using like Runnable?

hasty prawn
young knoll
#

True

agile sinew
#

making gun is so hard

waxen plinth
hasty prawn
#

Why didn't we think of that 5Head

visual tide
#

any1 know why SchematicFormat.getFormat is returning null in WE

#

im trying to paste a schem

tardy delta
quaint mantle
#

This is the code for my Custom Bossbarr

#

but i dont see it in the game

#

can some one help ?

#

nothing !?!

hasty prawn
#

Add the players after you do bar = new Bar

quaint mantle
#

in the main ?

hasty prawn
#

In the onEnable yes

quaint mantle
#

like this ?

hasty prawn
#

Yes

quaint mantle
#

alr let me see

hasty prawn
#

Also why are you doing an async repeating task?

quaint mantle
#

wow it works ok ok

quaint mantle
#

I was following throw a tutorial

hasty prawn
#

Do runTaskTimer

quaint mantle
#

do you know what is the best way to learn bukkit ?

quaint mantle
hasty prawn
#

Mainly just experimenting with it tbh

#

And lots of Googling on the forums

quaint mantle
#

what dose tbh stand for ?

hasty prawn
#

To be honest

tardy delta
quaint mantle
hasty prawn
#

Like 4 years lol

tardy delta
#

if i would access the cache via my plugin or just di

tardy delta
quaint mantle
hasty prawn
#

Nah

quaint mantle
quaint mantle
inner anvil
#

Would it be possible to implement CS:GO (specifically source engine) movement into the game?

chrome beacon
#

If you want to make mods then yes

#

Plugins no

inner anvil
#

Ah, how do mods differ from plugins.

chrome beacon
inner anvil
#

Different libraries?

tardy delta
hasty prawn
#

Fabric/Forge for Mods, Spigot for Plugins

tardy delta
#

ah nvm i didnt see it

visual tide
#

is worledit a pain or am i dumb

inner anvil
visual tide
#

now it's refusing to read the schem reeee

inner anvil
#

I'll check it out later down the line of my progression.

hasty prawn
visual tide
#

java.util.zip.ZipException: Not in GZIP format

#

ugh

tardy delta
#

i think i would just take a cache object through the command constructor

#

if i only need it there

visual tide
#

might legit be fawe fricking me over cuz i've done something like this before with normal WE and it worked

quaint mantle
#

@hasty prawn do you think if I would be coding Minecraft for 8years would i get bored of it ?

hasty prawn
#

I have no idea

visual tide
#

try it and see moment 😄

hasty prawn
fluid portal
#

whats the inventory action for shift clicking?

tardy delta
#

sometimes i dont understand the use of dependency injection in for example a subclass of an abstract command class, when every field is set to the same thing over and over 🤔

quaint mantle
#

hm?

#

making your object independent as possible sometimes worth it

tardy delta
#

like when a lot of command classes call the superclass constructor with the same args

hasty prawn
#

Then why do you have the args

quaint mantle
#

well, thats how java works0

tardy delta
#

sometimes im just thinking about setters and static things

quaint mantle
#

😾

thorny python
tardy delta
#

drag?

quiet ice
tardy delta
#

make some new things

#

and new game versions bring new stuff to work with

tender shard
#

InventoryDragEvent makes me mad everytime

chrome beacon
#

How so?

tender shard
#

because, you THINK that inventoryclickevent gets triggered. but when you move the mouse only a tiny bit inside the slot, it suddenly is a drag event even though you basically put all things into one slot

spiral light
#

its getting called if you just move over 1 slot for a small amount of time and no inventoryclickevent ^^

tender shard
#

so when you do not know about this behaviour, you end up in despair because your event simply doesnt event called because it's actually a drag, not click event

tender shard
waxen plinth
#

Since what version has ConfigurationSection#setComments existed?

spiral light
waxen plinth
#

Hm

young knoll
#

Sometime into 1.18.1

#

December 20th, 2021

fluid portal
#

no

#

i already got it anyway

charred echo
#

p7zip?

wary harness
#

is it possible to have remepped craft bukkit

#

org.bukkit.craftbukkit.v1_17_R1.inventory.CraftItemStack;

tardy delta
wary harness
#

so without version number

young knoll
#

Afaik no

wary harness
#

like net.minecraft.server.level.ServerLevel;

vocal cloud
#

I mean you could use reflection OMEGALUL

wary harness
#

that is added

wary harness
#

I am already suffering from pepperoni meal which I had this morning can't take no more

young knoll
#

Yes spigot has some comment support how

#

:D

wary harness
#

I am begging for something like that for last 6 years

#

I love my magical comments written with my bad eng 🤣

#

but this will be handy onec when versions under 1.18 die off

hasty prawn
#

They've had 8 years to do that and here we are..

young knoll
#

Well

#

Spigot uses SnakeYaml, which recently got updated to support comments

tender shard
wary harness
#

so it would be easier handel new versrion with just like class for 1.17 =< versions

tender shard
#

I just wanted to mention that it has nothing to do with "remapped" etc 🙂

wary harness
#

well

#

I think if craftbukkit

#

gets changed

#

would be a problem

#

I mean if API gets changed

young knoll
#

You’d have to ask MD on that one

#

I imagine it’s to discourage use? Idk

tardy delta
#

if most of my command classes make use of my user repo, should i declare it in the superclass of those?

spiral light
#

do you provide it with the constructor or static access ?

tardy delta
#

im still thinking about that

ivory sleet
#

That makes it less substitutable and more rigorously coupled to given subclass which may also come off as a leaky abstraction

tardy delta
#

neither if all classes use that dependency?

ivory sleet
#

closes?

#

Ah

tardy delta
#

:D

ivory sleet
#

Well, now it more sounds like a bad design

#

If all classes must depend on it

#

It’s basically a singleton?

#

and a very highly ordered class

#

(Not necessarily wrong)

tardy delta
#

i was planning on accessing it with my plugin.getUserRepo()

ivory sleet
#

Ew

tardy delta
#

what ew

ivory sleet
#

Now you’re starting to hide dependencies

#

Which isn’t always great

#

Like sure, for apis it might be needed to create a facade with a set of methods

#

But if this is the solution to the global dependency I am certain you can do it in a more sophisticated way

ivory sleet
#

Well, I should still mention, over and above all, this is just a spigot plugin

#

So probably fine fourteenbrush

young knoll
grim ice
#

so if u save a resource it will save comments?

young knoll
#

If it has them, sure

grim ice
#

so basically it recognizes them?

#

Pog

spiral light
#

this is allowed ???
if(info instanceof BigDecimal bigDecimal){
???

young knoll
#

What about it?

ivory sleet
#

it is indeed

spiral light
#

the check and instand set variable

tardy delta
#

its a newer java version

ivory sleet
#

much better than using an instance of + manual cast

#

pattern matching makes it just that much more succinct

young knoll
#

Yeah

#

It’s a java uhh

#

14? Feature

#

Idk

tardy delta
#

i sticked to java8 🥶

ivory sleet
#

You're officially dangerous

#

sometimes

glad jungle
ivory sleet
#

Patience, young one

tender shard
spiral light
glad jungle
ivory sleet
#

Space trust me, people here (in this very channel) scarcely do server configurations and such, its much better to just ask and await someone who works with server related stuff on a daily basis x)

tardy delta
ivory sleet
#

No problemo

#

I mean

#

I use java 8 sometimes also

tardy delta
#

no no no i'm just dangerous

#

rawr

young knoll
#

Rawr XD

tender shard
#

I'm also on java 8 for my plugins but for private or custom stuff, always latest java :3

tardy delta
#

someone made a struct like thing in java 🥶

quiet ice
#

I like J16.

tender shard
#

records, pattern matching, ... new java really has awesome new features

ivory sleet
#

J17 is cool also

tender shard
#

also java 18 has pattern matching for switch

ivory sleet
#

just preview

quiet ice
#

so basically useless

buoyant viper
#

i thought the one for switch existed before 18 wtf

tender shard
buoyant viper
#

bc it was like switch expressions

#

oh wait

ivory sleet
buoyant viper
#

pattern matching

tender shard
#

also stuff like this:

static void testTriangle(Shape s) {
    switch (s) {
        case Triangle t && (t.calculateArea() > 100) ->
            System.out.println("Large triangle");
        default ->
            System.out.println("A shape, possibly a small triangle");
    }
}
tardy delta
#

wasnt there an Objects.equals method or something which can replace this thing?

return name.equals(other.getName()) && owner.equals(other.getOwner()) && location.equals(other.getLocation());```
buoyant viper
#

maybe java will finally replace.... kotlin...

#

jk still has a long way to go

tender shard
tardy delta
#

yea i thought i saw it somewhere with varargs

tender shard
#

if your objects properly implement equals(), there's no need to manually do stuff like the code oyu posted