Hello, I just want some feedback on if I'm creating/using this singleton class (ChunkUpgradePool.java) right. I've avoided using them forever cause people say they are bad lol. https://github.com/Z-laio/chunkwars
#Singleton / Design Pattern (Code Review)
1 messages · Page 1 of 1 (latest)
Singleton isn't bad imho as long as you use it properly, but to each there own
its really what you think is best
really im tryna use them cause i have some classes that i only instantiate once and am sick of referencing them through di from the main plugin object
especially when it doesn't always make sense for an object to need an instance of the main plugin
don't pass in the main plugin every time
you are kind of abusing DI if thats what you are doing
you should only really be passing in what you absolutely need
yeah but sometimes ill have like 3 things i need all stored in the main, i just pass in the main cause its 1 param vs 3