#dev-general
1 messages · Page 237 of 1
weird. Same as in local but on local it looks good.
I know yesterday I had the same problem and after a few minutes it fixed itself I guess
in Spigot, is there an easy way to check if the player is holding onto a specific item?
Like for example
I want the player to click on a slot in the gui
have the item be in the cursor
getItemInMainHand?
the one that is taken in the cursor he means
And?
lol
okie my site is a 93 now i'm happy
It was me, i felt like going back to the original name for a bit
Quick question, so if I were to instead of caching shit have a sort of pending period before the action for the user is executed, how would I properly manage that, so I'm not just delaying an action for a preset amount of time
@prisma wave 😏
Whats the context
there's no context
You just want a delay for each user?
No, I mean wait for the data query to finish so the user has all the information gotten before performing an action (ie. opening a gui after waiting for gui data to be queried from the database)
BM, let me know if you get what I'm trying to say lol
Ah I'm being a 4head, yea that should work
Why am I not surprised
stop bully
what is a 4head
lol
;-;
Where do I find the download link to jvm 11?
https://www.java.com/en/download/manual.jsp On here it just shows jvm 8
Java manual download page. Get the latest version of the Java Runtime Environment (JRE) for Windows, Mac, Solaris, and Linux.
?jdk
don't use oracle jdk
Do you suggest 11 or 15 tho
8 :clojuremoon:
Stfu
@forest pecan That's beautiful, what u mean
🥲
y
Requires registration and other dum stuff
oh
vectors exist
Works for me
Only if it wasnt causing lag lol
Hello everyone, where can I find the repository for the maven?
what is
repository for the maven?
I use 4.2.2-b812 @foggy pond
Yea :(
For development with the DeluxeMenu API, if there is one
There is none
everything is configured via config file
Nashorn has been removed in java 15 :)
What is that
Licensing issues, afaik oracle jdk requires a commercial license so you could theoretically get sued for using it
oke
JavaScript Script engine, what stuff like papi uses for JavaScript files - clearly multiverse uses it
how come when I watch yt videos on jdk installation they dont have to do all the stuff that I'd need to do to download tho
plus the site looks different
Because they are videos 10 to 20 years old
Oracle website sucks ass
I wrote my first functioning rust program 🙂
Advent of code day 11
Didn't even run into too many borrow checker issues
I stopped doing AOC
aww
Will do it when I have the time, since I mean you can do them afterwards
assembly when
🤨
Hello World!
The fuck
o
bruh what
that's like dont ask to ask but more passive aggressive
yea lmao
[19:43:30 INFO]: Disconnecting com.mojang.authlib.GameProfile@7cc8454b[id=a1b72b20-97e0-476e-8a78-db9c9dcf93a4,name=Frcsty,properties={textures=[com.mojang.authlib.properties.Property@7becaa43]},legacy=false] (/**):
Please use the code jJqGuf to get whitelisted!
[19:43:30 INFO]: com.mojang.authlib.GameProfile@7cc8454b[id=a1b72b20-97e0-476e-8a78-db9c9dcf93a4,name=Frcsty,properties={textures=[com.mojang.authlib.properties.Property@7becaa43]},legacy=false] (/**) lost connection:
Please use the code jJqGuf to get whitelisted!
Now I gotta retrieve the name from this, suggestions?
GameProfile#getName()
Well yea but I don't have access to that kek
I only have access to that message, so regex
name=([a-zA-Z0-9_]{3,16}) easy
It is, but I no like
i just dont like them
^
when you are writing regexes
there are bad regexes
and good regexes
you have to make sure to write the good ones
for example you have to keep track of certain operations such as
*
which is extremely greedy
.* 🙂
lol
while(true) {
while(true) {
while(true) {
while(true) {
while(true) {
while(true) {
while(true) {
while(true) {
while(true) {
while(true) {
new Thread("hah", ()->{ while(true){}}).start()
}
}
}
}
}
}
}
}
}
}
```what would this do
Which logger should I be setting the filter for, for console messages, I assume papers?
Likely throw stack overflow
oh :C
well for starters it won't compile
nah it's not gonna stackoverflow, it will just really lag your pc
😄
it'll keep spawning new threads, which are expensive until eventually you run out of memory or the jvm crashes
:D
PC go brrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
time to obfuscate and distribute malicious jar files
fork bomb
whats a fork bomb
a fork bomb
ok
🍴 💣
Do not run that
run it
i dont even know how to run it
PC go brrrrrrrrrrr
gib money
buys a $20k computer
how do I point my main dns something.com to another link like using CNAME or whatever I need to use. Like I know I can do it for www.something.com but it won't work when I actually go to https://something.com
redirect 
*
lol
blitzgamer_88@helpch.at ...
1 min
help
no.. I just want your apology letter efe
pls
help with what? ...
my science homework
oh xD
well shit good bye
xD sorry mate
no ...
empty ... https://i.imgur.com/qUwgnnI.png

idk who you emaild mate
huh weird
anyways I'll stop now
I did this to get revenge
xD
I did it for the no context pings
so I took it to the next level
just pinged you and said random shit
the randomest shit I could think of
for 2 hours now xD
I did it like 20 times today xD
ah
wait
how do you see that?
ah ok
lmao
34
is a random number
29 pings from me
today
just use search ..
mentions: efefury#6969 from: BlitzGamer_88#0531
Hey can anyone help me out atm?
with?
I have a document that is a "txt" and I need to remove it for a texture pack but i'm not sure how to remove the "txt: part
"txt"*
Its in file explorer lol
rename the file
I did it didn't change it
what
wHaT
???¿¿¿¿¿¿¿¿¿¿¿?????????????????????
right?
@short tapir
Thx Fury
;-;
lol
whats this mean?
util classes should have private constructors
yuss
yeah
how did u know it was util
oh
I made a book GUI and every time i open it i get "invalid book tag"
Anyone got a suggestion for a class-field separator?
e.g. methods are Classname#method
but what about for fields
I can't use # for both
I'm thinking -
Classname-field
. is also not an option, as these are used for packages
Would % work? No particular reason, just seems similar Classname#method Classname%method
yay fields are working
yes it's - in the url but that's because you can't use % in a url
the bot itself will use %
oh that owner should be an fqn though
yikes
actually doesn't matter there's already a package there
hi,guilds plugins is have support 1.16.4??
ok,thx for help .so sorry
How to automaticaly open bookGUI?
I made a bookGUI and i dont know how to make it automaticaly open onjoin
You have to give the player a book thing in the hand
mhm

@late grove do you have any project in particular you'd like us to review?
Sure, can we move to DMs?
Rekt
:what:
question
i will open my network today. before connecting the separate servers to the network i had low ping (60-90) but right after connecting the server to the network, my ping won't go below 180
any idea of why could that be?
lag
ye lag is the cause tho 

hmm okay
yes
12
nexus takes ~1GB, saying that as your question was ambiguous
😏
fu
obay
obey
mc protocol sucks
old news
u suck
https://img.bristermitten.me/13-10-52.png
tfw the client doesnt follow up with a request packet 😐
and then i get this
like what
why are you messing with the protocol
and are you doing that manually or with mcprotocollib?
neither, making my own server impl
what l;ang?
elara
that just got made ya know. it has some nice features
like only BM understanding it
Oh yeah
I'm pretty sure they're both kinda outdated
I just can't figure out why the client isn't sending the right data
hacked client
NEVERMIND
i got it working 😄
the library im using invokes the handle callback once per connection, not once per packet
therefore i am a 4head
wew
huge speed reductions
got 1.16.4 indexing in 3 seconds
versus like 30 seconds standalone, upwards of 200 seconds when indexing alongside other things
damn
yeah turns out I had a bunch of duplicates
was scanning everything like 12 times more than it needed to be scanned
optimising is so fun
yessir
ah yes so fun
it is satisfying when you see the speed differences
:sad:
So close to having it working, yet jda has a billion retarded ass transitive dependencies so it keeps breaking
Yea but no runtime dependencies lib can properly use it lol
i gotta re learn jda
docdex is basically finished which means it's time to make a bot
😦
Legit the only thing I need runtimed and it doesn't want to :C
kinda defeats the purpouse does it not? :p
The dude is using JDA in his example for the lib, yet it doesn't download properly, smh
Does it provide the same shit?
@prisma wave Trying PDM again, solely for JDA, if it doesn't work, I'm getting the suislide
Fair enough
:kek:
no I don't mean a library
discordsrv is a plugin
I feel that frosty once you get it working it’s great though
xD
Also for those who saw my message about it being a weakness it wasn’t just my clients were being people and blaming the first thing that comes to mind when the issue wasn’t mine it was there’s.
:huh:
I had a nightmare 2 days ago where my JDA bot was blamed for a small data breach
It wasn’t my bot that caused it. it was there lack of security on the server end.
lol
BM, instructions unclear, made soup
[16:00:46 WARN]: [DiscordWhitelist] There were no dependencies to load! This might be intentional, but if not, check your dependencies configuration!
I find "no u" to be an exceptionally adequate response in these situations
Yeah it was a whole ordeal it was made worse by the guy being annoyed at their anti bot feature as he then said don’t use “bots” which they assumed meant my bot
The issue with the data breaches being Spanish I guess 🤦♂️ their English isn’t perfect
@prisma wave My dissapointment is immesureable, and my day is ruined
smh just fix pdm bm, not hard
Anyone know of any other runtime deps libraries?
Are you not just compiling the entire JDA dependency into the jar?
shading 🌝
The idea is not to shade 10mb into it
Well it works if you do 🤷♂️😂
Jerry.. I know it does, Gian just doesn't want a 10mb sized jar
Providing it to people is a challenge but still
I mean the issue is that JDA has so many transitive deps
Something like that
u know what i mean
Since it works with any other dependency lol
I am aware of these issues however as of now I am not aware of a fix
Apart from adding all transitives manually
Yea no worries, Gian gonna be sad but 🤷
Would you like to subscribe to our mailing list to find about PDM fixes when they eventually happen?
Well poor Gian they will live..
@quiet depot How bout you make a runtime dependecies lib 😏
no
Worth a shot
Tried it
it should be a recent post
Doesn't work kek
on spigot
@prisma wave I’ll subscribe to that
wait what i thought transitives worked
they do most of the time
JDA and a few other things just have super complex poms that kill PDM and presumably other libs
James, test out latest JDA for me if you have time and see if it works
have you guys seen this mr krabs ketamine game
I just joined a vc where my friend was playing it and streaming
i don't even know what I just watched
Huh?
the game is called "Mr. Krabs Overdoses On Ketamine"
what about that game u streamed pig 🙃
lol genital jousting
😏
genital jousting is a fantastic game
You played that 🤦♂️
he do be kinda dying tho from a ketamine withdraw
Play the game here: https://thrilldawill.itch.io/mr-krabs-overdoses-on-ketamine
It is such an odd game
game trailer
i'm honestly so happy that this has released in 2020
brings a really good end to the year
This shows the state of humanity in 2020 it is beautiful
it's beautiful
https://paste.jaims.dev/ayerubaxim.bash this is the part of the dependencies.json for JDA. seems to have done a lot of transitives, but i haven't actually tested a bot with it so idk
It's missing okio
dont do that
nvm dont do that
just add the dependency manually
also
https://img.bristermitten.me/15-22-18.png this is why shit keeps breaking
because you have a graph of about 5 interconnected poms with placeholders from other poms and it sucks
you also get an error for those 2 lol
ive got a challange for someone
make a plugin
but you can ONLY copy and paste
from stackoverflow
you cant type any extra statements
or anything like that
ONLY copy and paste
pulse where are you from?
massachusetts
united states
anyway
lol
I accept your challenge, and outsource it to you
would've been better if you were indian
and possibly racist
k
@prisma wave You're being phased out. Better finish that PR.
ur late
Read the comments.
Well if it doesn't do transitive
@hot hull if you need this super badly
look in spigot server, where me and heretere were having a conversation
he made his own dependency downloader which has relocations
I think it fully works
Will do, anything to make Gian happy
Pdm is so good if only the relocations were done :(
Playing bf4 so 
docdex in helpchat soon™️
What's that
what time you sleep at
yes
me 2
Bruh been studying C for the past few months
Gotta say that it's honestly kinda trash
Going from Java to C is like going from using Windows 10 to using windows XP
Especially cause in my university course we gotta follow very strict standards, like 72 characters per line and not being able to have functions (methods) longer than 7 lines
you can't really compare the 2 though
Shit standards lmao
Well I mean yea so it's readable, doesn't take a standard to do that
but that's the point of a standard xd
hey guys wanna see something
I'm saying it's common sense
d>doc 1.16.4 player
L
lol
Good thing cube ain't around as you break everything
Kek
d>doc 1.16.4 player
?
public Interface Player
Represents a player, connected or not
null
public Class PotionEffect
Represents a potion effect, that can be added to a LivingEntity. A potion effect has a duration that it will last for, an amplifier that will enhance its effects, and a PotionEffectType, that represents its effect on an entity.
null
d>doc 1.16.4 player
public Interface Player
Represents a player, connected or not
null
🙂
hot
d>help
doc - search a javadoc
help - this page.
lol
d>doc 1.16 bukkit
d> doc "" \n
doc - search a javadoc
help - this page.
wow rude
d>doc 1.16.4 bukkit
you made it error bm
public final Class Bukkit
Represents the Bukkit core, for version and Server singleton handling
null
lmao sorry
?
1.16 isn't a valid javadoc dkim
what does d>doc "" \n do
d>doc 1.16.1 player
public Interface Player
Represents a player, connected or not
null
d>doc 1.8.8 player
d>doc 1.16.4 What the fuck
public Interface Player
Represents a player, connected or not
null
public Interface Ghast
Represents a Ghast.
null
lol
nothing, i was testing it with invalid input
well it did something
d>doc 1.8.8 something
public Class Potion
Represents a minecraft potion
null
it should be like ! :>
nah
d> is too long and complicated
doc - search a javadoc
help - this page.
whereas ? and ! are common and one character
d>doc 1.16.4 player#getname
@org.jetbrains.annotations.NotNull
String getName()
Gets the name of this command sender
null
d>doc 1.16.4 treespecies%birch
static public final TreeSpecies BIRCH
Represents birches.
null
thats commandsender
player inherits getname from commandsender
public Class PigZapEvent
Stores data for pigs being zapped
null
pigzap?
can we have 1.16.4 be default version
oh
what is bm
brister mitten
"static public final"
I'm going to have to use lists instead of sets to preserve order
yuck
LinkedHashSet?
idk tbh
eh i'm not going to pretend like I know shit about these data structures
but it's only gonna be like 4 elements
wdym?
d>doc 1.16.4 player#setname
@org.jetbrains.annotations.NotNull
String getName()
Gets the name of this command sender
null
oops
d>doc 1.16.4 BristerMitten
d>doc 1.16.4 player#setdisplay
public Class RegisteredListener
Stores relevant information for plugin listeners
null
void setDisplayName(@Nullable String name)
Sets the "friendly" name to display of this player. This may include color. Note that this name will not be displayed in game, only in chat and places defined by plugins.
null
Remove the deprecation message text if there is none
void setHealth(double health)
Sets the entity's health from 0 to getMaxHealth(), where 0 is dead.
null
d>doc 1.16.4 player#spigot
@org.jetbrains.annotations.NotNull
CommandSender.Spigot spigot()
null
d>dock 1.16.4 player#setmaxhelth
keep helth
dock
d>doc 1.16.4 player#setmaxhealth
@java.lang.Deprecated
void setMaxHealth(double health)
Sets the maximum health this entity can have. If the health of the entity is above the value provided it will be set to that value. Note: An entity with a health bar (Player, EnderDragon, Wither, etc...} will have their bar scaled accordingly.
null
um
d>doc 1.16.4 player@setmaxhelth
public Class PlayerItemHeldEvent
Fired when a player changes their currently held item
null
@java.lang.Deprecated
void setMaxHealth(double health)
Sets the maximum health this entity can have. If the health of the entity is above the value provided it will be set to that value. Note: An entity with a health bar (Player, EnderDragon, Wither, etc...} will have their bar scaled accordingly.
null
d>doc 1.16.4 player#setmaxhelth
@java.lang.Deprecated
void setMaxHealth(double health)
Sets the maximum health this entity can have. If the health of the entity is above the value provided it will be set to that value. Note: An entity with a health bar (Player, EnderDragon, Wither, etc...} will have their bar scaled accordingly.
null
d>doc 1.16.4 playah
public Interface Player
Represents a player, connected or not
null
d>doc 1.16.4 🙂
public Interface Explosive
A representation of an explosive entity
null
d>dock 1.16.4 _ _
d>doc 1.16.4 asyncplayerlogin
public Class AsyncPlayerPreLoginEvent
Stores details for players attempting to log in. This event is asynchronous, and not run using main thread.
null
nice
public Interface Explosive
A representation of an explosive entity
null
public Interface Explosive
A representation of an explosive entity
null
;-;
new bot?
read the docs emoji 
nice
72 characters in 2020 bro
it's C though
ALMOST 2021
d>doc 1.7.10 player
I set my standard with Java using IntelliJ to be 121 characters
ok
d>doc 1.7.10 player
public Interface Player
Represents a player, connected or not
null
wdym
d>doc player
d>doc test
you have to include version i guess lol
public Interface Explosive
A representation of an explosive entity
null
pls
chill
ok
okie
i'm getting off for the night
https://github.com/PiggyPiglet/DocDex leaving this here
Ooo I remember this being discussed
Awesome work @quiet depot!
d>doc 1.8.8 Chat
huh
d>doc 1.8.8 chat
oh the bot is offline
lol
lol
is the best way to programatically write comments into a yml config File#writeText?
oh ye snakeyml doesnt support comments right?
thats what im wondering but i dont think so unfortunately
yeah probably then
It does for v1.2 I think?
Snakeyaml engine
Not snakeyaml
It's pointed out in their docs
Can always use my lib 😉
where is it 👀
maven { url = "https://repo.mattstudios.me/artifactory/public/" }
implementation "me.mattstudios:triumph-config:1.0.1-SNAPSHOT"
Or if you're using my gradle plugin
triumph {
config "1.0.1-SNAPSHOT"
}
the screenshot he sent lol
thats kotlin ;-;
you would change like 1 thing
WHAT IS 4HEAD?
4head
wut
you would change val to whatever the type is
You can see an example here https://github.com/TriumphDev/chat/blob/development/plugin/src/main/kotlin/me/mattstudios/triumphchat/config/Settings.kt
.kt
did you know that https://www.urbandictionary.com exists?
dkim its literally the same as java except for a couple things
you should be able to parse your way through it
just search what 4head means there...
oh
And to create the config file it's
val settingsManager = SettingsManager.from(File(plugin.dataFolder, "config.yml"))
.configurationData(Settings::java.class)
.create()
// Get property
settingsManager.getProperty(property)
// Reload
settingsManager.reload()
Twitch Emote. Used when streamer makes cheesy / dad jokes or "it is easy, just practice 25 hours a day" type of statements.
ah i dont understand anything in https://github.com/TriumphDev/chat/blob/development/plugin/src/main/kotlin/me/mattstudios/triumphchat/config/Settings.kt
good. you weren't meant to
I can convert the first property to Java for you as an example
lol
@ocean quartz can I also use this as the config file or will that get messy? I'd assume it will be fine as long as I dont plugin#saveConfig or whatever
wait im a dumbass
you use the config in the example
soz for ping lol
@half harness Here is the same thing in the beginning but in Java, it looks so bad
public class Settings implements SettingsHolder {
private Settings() {}
@Comment({
"Your comment here.",
"Another line here."
})
@Path("formats")
public static final Property<Map<String, FormatDisplay> FORMATS = Property.create(ChatFormat.class, Map.of("default", DEFAULT_FORMAT));
}
Yeah
not going to use it but nice
What does the ChatFormat.class thing do
That is used for bean properties, you don't really need to know about that if you're not going to use it, basically it's telling it that the property needs to be that specific class
Since the class is an interface, i made it so you can use a targeted mapper to decide which implementation to use
idk what proprties are ;-;
Property is the combination of field, getter, and setter
tHiS iS tOo CoNfUsInG
I mean you're the one that asked for it .-.
its ezz
🇭 🇦 🇷 🇩
wait TriumphConfig was made because dkim asked you to make it/
This is as simple as it gets
public class Settings implements SettingsHolder {
private Settings() {}
@Comment({
"Your comment here.",
"Another line here."
})
@Path("name")
public static final Property<String> NAME = Property.create("Matt");
}
Will turn into:
# Your comment here.
# Another line here.
name: "Matt"
very cool
No lol, I meant he asked to use it
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
won't it create yml name: Matt ?
Nope it's String
FileConfiguration#set usually does cause its a clown
You don't like it with the "?
isn't it the same?
I just thought its like the bukkit config where it sets "" only when it has special characters
and I think ConfigMe has it too. Thought its a default thing lmao

Bukkit uses ' '
ConfigMe uses nothing
Btw mine is just ConfigMe with a LOT of changes
what is lewd
@half harness my guy you gotta learn to google from time to time lmao
¯_(ツ)_/¯
(╯°□°)╯︵ ┻\━┻
┬─┬ ノ( ゜-゜ノ)
?docs
i know
you know? why do you ask then
nvm 🙄
ah yes very informative
[PlaceholderAPI] Error loading PlaceholderAPI v2.10.9 please contact author!
plugin is opensource smh, just fix it urself 🥲
fix it urself
🌝
not going to go thru all to see what the problem is
lmao
its not even for me
for me PAPI always works xD
yo an apex domain is basically * right?
well that's how I set it right?
In 1.8, how do I get the block hit by a projectile?
ProjectileHitEvent + add Direction vector to projectile's location
@ocean quartz what would this look like as a Property.create
colors:
gray: "&8"
red: "&c"```
right now im doing something like
```kotlin
@Path("colors")
val COLORS = Property.create(MutableMap<String, String>::class.java, mutableMapOf(
"gray" to "&8",
))
oh wait can i just do a map and remove the first param
i think i can
It'd be just String::class.java instead of map there
would that do the same thing as just Property.create(mutableMapOf(...))
It wouldn't, a small limitation of map, you'll have to specify the type, in that case String
ok ty
19.12 02:47:34 [Server] INFO ... 18 more
19.12 02:47:34 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.13.2.jar:git-Spigot-a1f2566-a4c555b]
19.12 02:47:34 [Server] INFO at me.clip.deluxechat.MessageCommand.onCommand(MessageCommand.java:296) ~[?:?]
19.12 02:47:34 [Server] INFO at me.clip.deluxechat.placeholders.PlaceholderHandler.setRecipPlaceholders(PlaceholderHandler.java:140) ~[?:?]
19.12 02:47:34 [Server] INFO Caused by: java.lang.NoSuchMethodError: me.clip.placeholderapi.PlaceholderAPIPlugin.getLocalExpansionManager()Lme/clip/placeholderapi/expansion/manager/LocalExpansionManager;
19.12 02:47:34 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
19.12 02:47:34 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:733) [spigot-1.13.2.jar:git-Spigot-a1f2566-a4c555b]
19.12 02:47:34 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:835) [spigot-1.13.2.jar:git-Spigot-a1f2566-a4c555b]
19.12 02:47:34 [Server] INFO at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-a1f2566-a4c555b]
19.12 02:47:34 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:900) [spigot-1.13.2.jar:git-Spigot-a1f2566-a4c555b]
19.12 02:47:34 [Server] INFO at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) [spigot-1.13.2.jar:git-Spigot-a1f2566-a4c555b]
19.12 02:47:34 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_211]
19.12 02:47:34 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_211]
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
help pls
ok thx
I am logged in, what should I do now?
When did you buy it?
You might need to wait a bit longer for the database to be updated
okay
So I’m curious we use constructors to pass the main class into other classes does this improve performance or is more due to being more appropriate and better coding practice. I am also asking about stuff that falls under similar circumstances.
best practice
there's two things going for dependency injection over the alternative, static singletons
first, it abides by the oop principles
So same with public variables being instead private and accessing through getters and setters
Yeah I was going to say OOP but didn’t in case if I was wrong 😂
second, it makes your code more something
can't remember the word right now
it's todo with testing though
no
I don't think that's it
kind of similar though
it falls under the broad term of maintainability
Basically instead of having your dependencies public everywhere to everything, you just have it to specific things that actually need it
Yeah just I realised I follow the theory but not entirely sure why minus just to abide by OOP
with static stuff, your shit is bound to the class
if you have an enforced jvm singleton, that's it
that class will always be the same
it's impossible to isolate it for testing
it can only be used for one thing
it can't be reused
this decreases maintainability and makes it impossible to test
but accessing others main classes using static calls is fine right
only in the instance of spigot
with spigot, you should use a static getter for your main class
it's stupid not to
Just easy to understand and use
unless you have a good reason like you're using guice and it's about the same amount of code to just @Inject it
spigot's javaplugin is already an enforced jvm singleton
so it's fine to get it's instance via a static getter
you shouldn't use the pattern anywhere else though
it's unneeded in an oo codebase
Yeah I’m factions uuid currently I’m sure you’d love to see what stuff they have done
Static calls are everywhere
Oh, 98% of spigot plugins are like that
yeah well lots of plugin developers also don't really care about code quality
There is so many people here that come asking for help that think static is used to make things accessible from other classes
I rewrote one of my plugins recently to use a interface cause they are cool
Even after research I don’t really see why we do it entirely but it’s cool 😂
how long you been coding in java jerry?
2.5 years now it’s depressing
ah
Getting closer to 3 now
have you always cared about quality, or is it just a recent thing?








