Convert main class to a main object and remove false nullable
This commit is contained in:
parent
ac0dd8e372
commit
a051a50839
1 changed files with 4 additions and 6 deletions
|
@ -5,12 +5,10 @@ import org.quiltmc.qsl.base.api.entrypoint.ModInitializer
|
|||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
class ExampleMod : ModInitializer {
|
||||
override fun onInitialize(mod: ModContainer?) {
|
||||
LOGGER.info("Hello Quilt world from {}!", mod?.metadata()?.name())
|
||||
}
|
||||
object ExampleMod : ModInitializer {
|
||||
private val LOGGER: Logger = LoggerFactory.getLogger("Example Mod")
|
||||
|
||||
companion object {
|
||||
val LOGGER: Logger = LoggerFactory.getLogger("Example Mod")
|
||||
override fun onInitialize(mod: ModContainer) {
|
||||
LOGGER.info("Hello Quilt world from {}!", mod.metadata()?.name())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue