JonathanBrouwer / UltimateCore

All you need to setup a server and more!
MIT License
15 stars 11 forks source link

Fix Singleton. #9

Closed ItsDoot closed 9 years ago

ItsDoot commented 9 years ago

How you were doing it before this commit is not the correct syntax for creating a singleton. This commit fixes that.

I did not use an IDE, so there might be some mistakes.

JonathanBrouwer commented 9 years ago

Can you fix the bukkit class too?

And why line 52?

JonathanBrouwer commented 9 years ago

82*

ItsDoot commented 9 years ago

Because with a Singleton you must always have a maximum of 1 instance while running a program. Making the default constructor private makes sure there will always be only 1.