#help-development
1 messages · Page 1913 of 1
honestly much, much more preferable
I wonder, does DI count as a form of composition...?
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 : )
if(true)big();
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
It's pretty insane to be honest.
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
You want an endpoint?
@GetMapping("/v1/blah/blah")
public String getWhatever() {}
and voila an endpoint
AND WHAT THE FUCK IS A MICROSERVICE?!?
Yeah reflection is really cool cuz of that
But like. It's so strong
Later on
API's are literally brain dead to make it's so nice.
They're replacing all java.lang.reflect implementations with ones that use java.lang.invoke
So it gets a pass even though it's AbstractBeansOfTypeDependsOnDatabaseInitializationDetector
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
They have auto mappings for SQL,Mongo etc. To make setting up databases and queries a breeze
AbstractForwardingRepositorySystemSession
And they have this https://start.spring.io/
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
What, is it one of those .xml configs?
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>
But again they make it a bit nice by having mappings using annotations.
Stacking them like dominos
I think the problem with OOP
Is that you spend more time figuring out the API
than you spend writing the actual implementation
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
We still have good ways to manage it though
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)
JDA has really nice java doc
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
btw actual Gradle class:
NamedDomainObjectCollectionSchema.NamedDomainObjectSchema
I do not like Gradle very much
But I also do not like Maven very much
maven is a bit um xml
Yes
But gradle has always been a thorn in my side
People like "it's so much better" then show me the code that calls a bunch of maven dependencies
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...?
I'd sooner die
It's hell.
Gradle zzz
Yeah that's hell too.
comparing to maven plugins.. not too bad
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
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
The errors come out in Klingon and you need to manually paste the enire main function for every library in the config
There's also Ninja, but you never write buildscripts for that thing manually so...
Like that's literally how Ninja is designed
Oh god
It gets better. It's space sensitive like python. 3 spaces instead of tabs
(I don't like CMake very much - I prefer Meson)
is there any reason you might keep your own Random instead of using ThreadLocalRandom?
Uhhh speed differences I believe
Gotta use SecureRandom 
Personally I just make a wrapper around a Random instance :p
Is this error player.teleport(Objects.requireNonNull(player.getBedSpawnLocation()));?
im pretty sure that's not necessary in my case
Alright this is the perfect example of intellisense is not intelligence
That'll throw an error if the player has no bed location.
You want to use != null, not requireNonNull
Just cause intellisense provides a solution to a problem doesn't mean it's actually a solution
cough cough assert
What are the docs for Objects.requireNonNull
(y'know assert would be so cool if it wasn't locked behind a runtime flag)
assert is just making the stacktrace harder to read
Gradle its Zzz and Maven also doesnt have any problems. I have been using it since a year. And never get problems
Disagree, all it does is throw an AssertionError.
then you might as well throw the original
This is done by Intellij
Just because Maven doesn't cause problems don't mean it doesn't have any.
It doesnt have problems
No it does.
You because only use gradle
415 lines of XML.
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]
?paste sheesh
I use a variety of buildsystems.
?paste
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
Maven its really easy
Maven is easy until the errors drop and no one understand them
I love how the error is so predictable
This is the eror for player.teleport(Objects.requireNonNull(player.getBedSpawnLocation()));
Maven actually uses a lot of reflection btw.
What Objects.requireNonNull throws a null if the object is null?
What the problems?

But yeah I believe statistics show Maven is slower than a second Gradle run.
Buy a faster PC
Yeah
I haven't benchmarked it myself :p
The error is telling you what's wrong
I just want to know how to solve
With a ryzen 7 3700x and 64gb of ram. A multi module Project of 8 modules its built in less than 10m
You learn java first I suppose.
🤣
I can literally run Javac in like 5 seconds
If Maven takes a minute and 10
That's a problem
The longer it takes to compile the more time I can spend drinking coffee and realizing I forgot to fix a TODO
(Javac, although a piece of shit, is decently optimized ig)
but come one dont use that freaky shets
Its like the one saying they code plugins with Vscode
Hell even the uhh
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
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 🤡
Use VI
"If you don't like mass murder, don't criticize it."
I have a right to criticize the things I don't like if they're terrible :p
My Dad has a working system that runs DOS I'm sure I can get something together 
How olds is he?
60s
And I would've made my own system by now if the Maven resolution API wasn't a piece of shit.
I mean honestly I just ought to implement my own open-source transitive dependency resolver.
Maven 2 Electric boogaloo
Oh lol its amazing. With that age many of them dont even know how to turn on a computer
I once saw this interesting project
He worked in tech for 30+ years.
Cargo4j
Cargo is Rust's buildsystem
Ahh zz
And it's a very nice one too
Primarily because it uses an actually readable, modern language
Rust likes memory the way I like rust. Safely disposed of
I only use Java not yet like Rust, python, js, ts really ugly sintaxis and hard reading
C# is Microsoft and Microsoft is awful
syntaxes?
i mean vscode isnt that bad
Agreed
Yeah. Its my cellphone corrector
I mean yeah VSCode is pretty nice but it's always been kinda slow
Can't wait for VSCode Intellij edition to be fully released
😐
Also yeah IntelliJ is just better :p
If they had community editions for all their IDEs I would use them
vs4j 😄
I would never recommend Vsckde for plugins
I mean it could totally work
VSCode has a Java, Maven, and Gradle plugin.
That's all you need to make a plugin ;)
Using Vscode for plugins its just like hard coding
I dont wanna think cuz I will have more headache even gradle zzz
Maven good
Gradle is better if you know what you're doing otherwise maven
I should totally make a plugin with just make and nano
Vi don't overcomplicate things with modern nano
What are you waiting for! I will use it
Vim?
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
Nano and vim are linux editor right?
There's nothing more natural than a CTRL+S
Yes, they're terminal-based editors.
Meaning you write code.
In your command prompt.
My dad uses Vim and it's so confusing how he just knows all the shortcuts
I mean tbf writing code in Windows Notepad would be way worse
And do it with like
Arial or smthn
no monospaced fonts
Oh yeah also
Why the fuck is frontend development so hard??
I don't understand CSS at all
Learn a library
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
What, like Tailwind?
I mean if Bootstrap didn't look so samey I would use it honestly
Newer versions of Bootstrap don't require jQuery :)
That requires me to know CSS
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.
I know enough to make my own stuff but I just lazy it up to boostrap if I need it
Learning html css 🥶
There are some PHP frameworks that are nice
I could totally suffice with like
JS
Although JS has a nightmare of an ecosystem
Js is a main for me
Because you get used to it, like how you get used to shortcuts in 'modern' programs
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.
When your language has literally 4 different ways of resolving modules
UMD, AMD, CJS, ES6 😎
Lol
It's a little different then modern stuff
I mean
Actually there's a 5th method and that's importing stuff through <script> tags
If you're used to spending most of your time in a terminal anyway it's not too much of a stretch
But that breaks IDE inspections :)
Show me 1 modern text editor that has websites built to help you escape it https://siddhantgoel.github.io/stuckinvim.com/?ref=madewithvuejs.com
maowsbasement
Again, I'm not saying it's not confusing, I'm saying that people can easily get used to it if they spend some time in a terminal
I shouldn't have to get used to my text editor tho :p
Nano won this war for a reason lol
I don't know anybody who actually uses nano
Literally most guides I see say "use nano if you're a beginner"
✋
Anybody IRL*
I literally don't know anyone who uses anything but nano
I suppose I'm friends with too many nerds
I would like if there was some kind of
nano-like editor
That wasn't vim
But was just nano but more modern
LMFAO
neonano
Emacs is confusing and scary
and I have actually used Emacs
I broke everything immediately
cuz I didn't know what I was doing
VIM is just a sand pit at the least
ALTHOUGH
There is one cool thing about Emacs:
You can run games in it
Productivity 100
I mean it's not as cool as the excel spreadsheet games
Well you can write games in vimscript if you really want to
wait
i wanna store some text in a database
but if i put the credentials in my code
to use it
I mean at some point your creds load into memory and they're there for anyone
then wtf do i do
btw @vocal cloud you truly should check Cargo out, it's a great buildsystem
You put them in a config
Well you can start by telling us what you're trying to achieve...
then load the config
This is like the people telling me they want to make their plugin uncrackable. Like give me your "uncrackable" plugin for a few 🤡
somewhere that its persistent
is this mod for multiplayer
yes but its client side
okay so this mod communicates with a server?
no
wat
so even if the player manages to hack their client to add or change numbers for other people
why does it matter
bruh
it does
What exactly is your mod going to do
if this is just a client side mod, why does it matter if someone fucks with their mod
So it's okay for people to mess with the data you save locally right?
if u can change people's ratings
I'm so confused
it shouldn't be global, this should be going through a server to handle this
the problem is if they change it for everyone
then wat do i do
You don't make it client-side for starters
changing it for everyone shouldn't be possible
because if it can, it will
client side is nono
No they're not. You use a config
there should be no direct access to this database with this client
i should make a backend or smth?
Yes
But you really should not be doing anything async with forge
and how to make a backend
ic
but what do i do
okay
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
Um that's not how forge works
So if you make a custom GUI and it's only on the client you'll have to be sending the server custom packets
its only client side, does stuff on the client not the server
Or you'll have to make an API somewhere that the mod can access
idk wdym
but again that's async stuff that forge doesn't like
You host the database somewhere else not on the clients machine. Then they query it using an API
forge has nothing to do with it
yes????
i know
but to connect
i need
Then what exactly is the issue here
the credentials
yes and how the heck do i make that
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
is it a ton of work
Depends on your level of expertise
never done smth like this before
is there no simple way of doing this
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
what db
Whatever db you choose. PHP works best and native with SQL
is MySql fine
Yes
MariaDB tho

I mean depends what you want to do
i just told u tho
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
i want something easy since this is literally not the biggest feature i should be working on
ill do PHP
Just make sure to sanitize your inputs
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
I mean I find the figuring-out part to be the most fun
Im pretty sure there's lighttweight web libraries for java
how would i copy a file originally in /resources into the plugin data folder?
?jd
i shall
I mean yes if you want the complex explanation of it
The mod is your presentation tier
this is fucking complex
i have the first tier
and the third one
now how the fuck do i make the second
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
🌮
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
maybe use Inventory open event
and chevk there’s item which has to be updated
Maybe you can do an inventory interact event and check if it has been update, if not update it
hm that could work
In the nbt data store the system.currenttimeinmillis
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
Players wint notice it
that is true
get all worlds .... get all chunks .... get all tile entites .... get all containers .... get all item of containers and update them
You would need to store the location with every chest
it would be HARD when you want to trace all items
Better to just do with inventory open event
ask players to create support ticket on server's discord
Lol
wHaT
yes run your code in inventory open event
yup ima do that
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
This wil probably be the most efficiant way
hoppers and dispensers go brrr
could also work, but wouldn't the different ID system not make it more complicated?
Depending on the function of the custom item this wont cause any issues
like just checking against the new item should be enough
No just add an extra variable of when it was last updated
still why not just check against the new item
This way you only need to do 1 if statement per item
I mean not really? Keep it organized. It's faster to check an ID then the whole item. If ID == 5 replace with 6
okeh
Do u edit your items in game/via commands?
not planning on
Have a main ID for general items then add a subID for that specific item
mostly in code
So hard coded? I suggest storing in an json file so u xan edit it
yeah its kinda early stage rn
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
I dont know how to do json with spigot yet xD
and how to make that
i still cant figure it out
help pleaase
I'm not here to teach you how to make APIs and connect the to databases. That's something you'll have to learn.
Try this
this guide is designed to get you productive as quickly as possible and using the latest Spring project releases and techniques as recommended by the Spring team
You will create a MySQL database, build a Spring application, and connect it to the newly created database.```
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
The mod will and should not touch the database
it will use the application
yes
but when tier 1 tells tier 2
to do smth
cant people steal that code and use it somewhere else maliciously
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
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
This is for a server right?
Then the server should be handling it
if i can change hypixel
And giving out the points
What?
So this isn't even your server
no its not
you want to make a mod which isn't spigot for a server that isn't spigot or yours
Yes
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
Bruh
so this whole thing is impossible
without them being able to change stuff
to whatever they want
Well I thought you controlled the server 
i dont
The server is where the processing should be happening
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
is there anything i can do
I mean you can make it but that doesn't mean they can't spoof any data from it
so they can just
change data
however they want
Yup
that doesnt make sense then
Makes perfect sense
for players to rate themselves?
wait ok I though this was a Spigot server 🤭
Only on Wednesdays
o.O
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
Just buy hypixel so you do own it
-_-
now that you say it, this server does feel like a spigot server's server
Forge only
I'll ban you for insinuating you don't know how to use a lazy optional

That's it leave
No typing

What is a lazy optional? aka streams?

I do not see people productive here so I am leaving now
Nothing of value was lost
I am lost
Indeed
👽
Error
emotional damage
I did it to myself tho
it's best to just quit at this point
Hey, so I'm trying to use this tutorial https://www.spigotmc.org/threads/packet-discovery-spectator-mode-modifications-noclip.319125/ but I got an bad RuntimeInvisibleParameterAnnotations errror while compiling, what does that mean?
field.setAccessible(true); hoo boy
Plss
javac can do that
idfk
thats called compiling?
yeah use javac
Problems?
oh gosh makefile
basel is also another way of compiling it
right click > rename > remove .java > append .class
xDxD
Thsxxx
pls note that that was a joke
wait what advice did you take
gcj should also be able to compile java
I will use this
lul
cool good
And ecj is also pretty good
when you try to use makefile with c++
Wait ;-; so, what I use?
javac
not wrong
javac, gcj, ecj, or something else that uses one of these three compiliers
Take that
the way steven says it
is just
Chef's kiss
come to brazil one of these days
I am literally shivering so yes please
:)
Portugal are going to Brazil
Parody of this video (skip to 0:29 to find it):
https://www.youtube.com/watch?v=f2_K6QY8yDQ
Interesting message
Yeah, just like that
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
Pretty sure it's English only though I imagine not enforced that often
Como assim? Não entendi ;-;
Meu inglês ainda é meio ruim pra falar a verdade
gets banned
I speak Portuguese as my primary lang and English as secondary, Spanish as 3 and a lil bit of japanese
:)
the only things I speak are Dutch and English
Ik kom van Brazilië
:O
dat is niet echt waar, ik moest het van hem zeggen
Good bro
when i hold right click, it has delay about 0.2s so can I reduce this delay?
hmmm, I don't think you can since the client only sends the right click packets that fast.
idk
Mine is like 2s ;-;
huh
Lol
what do you mean
hmm
he means in minecraft, when you hold right click on an item
or on a block
or both
If you want to build fast
I'm making gun so
gun can fire continuously
the problem is that's not what he is asking
I think there are a lot of tutorials on how to make a gun with plugins, im not exactly an expert
So ya want to make when you hold right click you shoot?
but relying on the event speed is not good
Ye
and when holding Q, it does not instantly start going quick
Makes sense
right click is possible tho
but im now outta here I have some things to do xD
cya
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
hmm
:)
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
in CrackShot plugin, its delay reduced
You are thinking the wrong way, left click is to hit entities/ break blocks
right click is interact
so he has the right one
by default of course, you can change it
yes, because they do not fire each time the event happens, but have some timer themselves that is faster.
Could fire multiple times per tick
Yeah but they would all fire together
Yeah, it really just depends on the gun I suppose.
Ah wait, who said they all have to start at the same point though!
True
making gun is so hard
Not if you Thread.sleep(20); 🧠
Why didn't we think of that 
any1 know why SchematicFormat.getFormat is returning null in WE
im trying to paste a schem
Seems good
This is the code for my Custom Bossbarr
but i dont see it in the game
can some one help ?
nothing !?!
Add the players after you do bar = new Bar
in the main ?
In the onEnable yes
like this ?
Yes
alr let me see
Also why are you doing an async repeating task?
wow it works ok ok
umm idk im kinda dumb at coding java just started
I was following throw a tutorial
Do runTaskTimer
do you know what is the best way to learn bukkit ?
ill try
what dose tbh stand for ?
To be honest
only my interaction between the cache layer and the commands is something i have to think about
how long have you been coding minecraft ?
Like 4 years lol
if i would access the cache via my plugin or just di
?main xd
isn't id getting boring just asking
Nah
I Delegate my Manager to Cache stuff
really wow alr
Would it be possible to implement CS:GO (specifically source engine) movement into the game?
Ah, how do mods differ from plugins.
Mods can change behaviour on both sides (client and server). Plugins are server side only
Different libraries?
can i see an example?
Fabric/Forge for Mods, Spigot for Plugins
.
ah nvm i didnt see it
is worledit a pain or am i dumb
alr
now it's refusing to read the schem reeee
I'll check it out later down the line of my progression.
It doesn't like you :(
i think i would just take a cache object through the command constructor
if i only need it there
might legit be fawe fricking me over cuz i've done something like this before with normal WE and it worked
@hasty prawn do you think if I would be coding Minecraft for 8years would i get bored of it ?
I have no idea
try it and see moment 😄

whats the inventory action for shift clicking?
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 🤔
like when a lot of command classes call the superclass constructor with the same args
Then why do you have the args
well, thats how java works0
sometimes im just thinking about setters and static things
😾
MOVE_TO_ANOTHER_INVENTORY iirc
drag?
if you stay with that and just that, no idea. If you start doing other things (such as modding other games), almost certainly
InventoryDragEvent makes me mad everytime
How so?
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
its getting called if you just move over 1 slot for a small amount of time and no inventoryclickevent ^^
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
exactly and that is quite annoying if you don't know about or forget it everytime again 😄
Since what version has ConfigurationSection#setComments existed?
iirc this is new with the 1.18 version
Hm
p7zip?
is it possible to have remepped craft bukkit
org.bukkit.craftbukkit.v1_17_R1.inventory.CraftItemStack;

so without version number
Afaik no
like net.minecraft.server.level.ServerLevel;
I mean you could use reflection 
To much pain
I am already suffering from pepperoni meal which I had this morning can't take no more
That is
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
They've had 8 years to do that and here we are..
there is no "remapped" craftbukkit because it was never obfuscated
well I was thinking because of nms
so it would be easier handel new versrion with just like class for 1.17 =< versions
yeah sure I also don't understand why they kept the version in CB
I just wanted to mention that it has nothing to do with "remapped" etc 🙂
well
I think if craftbukkit
gets changed
would be a problem
I mean if API gets changed
if most of my command classes make use of my user repo, should i declare it in the superclass of those?
do you provide it with the constructor or static access ?
im still thinking about that
The superclass mustn’t have any dependencies of the subclass
That makes it less substitutable and more rigorously coupled to given subclass which may also come off as a leaky abstraction
neither if all classes use that dependency?
:D
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)
i was planning on accessing it with my plugin.getUserRepo()
Ew
what ew
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
support comments?
Well, I should still mention, over and above all, this is just a spigot plugin
So probably fine fourteenbrush
Yes?
so if u save a resource it will save comments?
If it has them, sure
this is allowed ???
if(info instanceof BigDecimal bigDecimal){
???
What about it?
it is indeed
the check and instand set variable
its a newer java version
much better than using an instance of + manual cast
pattern matching makes it just that much more succinct
i sticked to java8 🥶
Patience, young one
sure, it's called Pattern Matching
didnt know this is now possible too 😐
._.
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)
i am :C
Rawr XD
I'm also on java 8 for my plugins but for private or custom stuff, always latest java :3
someone made a struct like thing in java 🥶
I like J16.
records, pattern matching, ... new java really has awesome new features
J17 is cool also
also java 18 has pattern matching for switch
just preview
so basically useless
i thought the one for switch existed before 18 wtf
yeah I just wanted to mention that it will come
yup, which is very pog
pattern matching
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");
}
}
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());```
Objects.equals simply calls both objects equals() methods and checks for null
yea i thought i saw it somewhere with varargs
if your objects properly implement equals(), there's no need to manually do stuff like the code oyu posted



