aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/features/misc/Welcome.kt
blob: 70d4556ff876d5e81396e223a36ab518553b46d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.ambientaddons.features.misc

import AmbientAddons.Companion.mc
import AmbientAddons.Companion.persistentData
import com.ambientaddons.utils.Chat
import com.ambientaddons.utils.SBLocation
import gg.essential.universal.UChat
import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent

object Welcome {

    @SubscribeEvent
    fun onTick(event: ClientTickEvent) {
        if (!persistentData.isFirstLoad || event.phase != TickEvent.Phase.START || !SBLocation.inSkyblock) return
        persistentData.isFirstLoad = false
        persistentData.save()
        UChat.chat("""
            ${Chat.getChatBreak()}
            §b§lThanks for installing AmbientAddons Forge!
            
             §eUse §a§l/ambient §r§eto access GUI settings.
             §eAliases: §a/aa §eor §a/ambientaddons
            
             §eTo configure auto-buy, use §a/ambient buy§e.
             §eTo configure salvage features, use §a/ambient salvage§e.
            ${Chat.getChatBreak()}
        """.trimIndent())
    }
}