aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/features
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-03-25 04:36:31 -0500
committeringlettronald <inglettronald@gmail.com>2023-03-25 04:36:31 -0500
commit43d07fc791e63bba61695e0d4b766b78eb699132 (patch)
tree69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main/kotlin/dulkirmod/features
parent71af70d22e9a55a58c36642a745e81aa91851375 (diff)
downloadDulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz
DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2
DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main/kotlin/dulkirmod/features')
-rw-r--r--src/main/kotlin/dulkirmod/features/AlarmClock.kt18
-rw-r--r--src/main/kotlin/dulkirmod/features/ArachneTimer.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/Croesus.kt4
-rw-r--r--src/main/kotlin/dulkirmod/features/DragonTimer.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/DungeonLeap.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt22
-rw-r--r--src/main/kotlin/dulkirmod/features/HurtCamSlider.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/MatchoAlert.kt10
-rw-r--r--src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt4
-rw-r--r--src/main/kotlin/dulkirmod/features/ScalableTooltips.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/Bridge.kt20
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt4
16 files changed, 72 insertions, 72 deletions
diff --git a/src/main/kotlin/dulkirmod/features/AlarmClock.kt b/src/main/kotlin/dulkirmod/features/AlarmClock.kt
index f4c11d4..4792259 100644
--- a/src/main/kotlin/dulkirmod/features/AlarmClock.kt
+++ b/src/main/kotlin/dulkirmod/features/AlarmClock.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.ScoreBoardUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -16,20 +16,20 @@ fun alarmClock() {
val lines = ScoreBoardUtils.getLines()
for (l in lines) {
// ZOMBIE VILLAGER
- if (Config.notifyZombieVillager && l.contains("8:00pm") && (currTime - lastUpdate) > 15000) {
+ if (DulkirConfig.notifyZombieVillager && l.contains("8:00pm") && (currTime - lastUpdate) > 15000) {
lastUpdate = currTime
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Zombie Villager", 5000)
- if (Config.bestiaryAlertSounds)
- mc.thePlayer.playSound("mob.villager.yes", 1f * Config.bestiaryNotifVol, 0f)
+ if (DulkirConfig.bestiaryAlertSounds)
+ mc.thePlayer.playSound("mob.villager.yes", 1f * DulkirConfig.bestiaryNotifVol, 0f)
}
// GHASTS
- else if (Config.notifyGhast && l.contains("9:00pm") && (currTime - lastUpdate) > 15000) {
+ else if (DulkirConfig.notifyGhast && l.contains("9:00pm") && (currTime - lastUpdate) > 15000) {
lastUpdate = currTime
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Ghast", 5000)
- if (Config.bestiaryAlertSounds)
- mc.thePlayer.playSound("mob.ghast.scream", 1f * Config.bestiaryNotifVol, 1f)
+ if (DulkirConfig.bestiaryAlertSounds)
+ mc.thePlayer.playSound("mob.ghast.scream", 1f * DulkirConfig.bestiaryNotifVol, 1f)
}
}
diff --git a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
index 4cb63f9..7cbcd5f 100644
--- a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
+++ b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
@@ -1,6 +1,6 @@
package dulkirmod.features
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TextUtils
import dulkirmod.utils.Utils
import dulkirmod.utils.WorldRenderUtils
@@ -18,7 +18,7 @@ object ArachneTimer {
@SubscribeEvent(receiveCanceled = true, priority = EventPriority.LOW)
fun onChat(event: ClientChatReceivedEvent) {
- if (!Config.arachneKillTimer) return
+ if (!DulkirConfig.arachneKillTimer) return
var killtime: Float = -1f
@@ -46,10 +46,10 @@ object ArachneTimer {
@SubscribeEvent
fun onWorldRenderLast(event: RenderWorldLastEvent) {
- if (!Config.arachneSpawnTimer) return
+ if (!DulkirConfig.arachneSpawnTimer) return
if (spawnmillis > startmillis) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
var time: Int
time = if (bigboy) {
(40 - (System.currentTimeMillis() - spawnmillis) / 1000).toInt()
diff --git a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
index 589c046..f2c8c0e 100644
--- a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -13,7 +13,7 @@ var oldChampionXp = -1.0
var oldID = ""
fun brokenHypeNotif() {
- if (!Config.notifyHype) return
+ if (!DulkirConfig.notifyHype) return
var kill = -1
var championXp = -1.0
@@ -59,8 +59,8 @@ fun brokenHypeNotif() {
// If this section of the code is reached, then we have the same item, and we can check for updated stats
if (oldKill != kill && oldChampionXp == championXp && TabListUtils.area != "Private Island") {
- mc.thePlayer.playSound("random.anvil_land", 1f * Config.bestiaryNotifVol, 0f)
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ mc.thePlayer.playSound("random.anvil_land", 1f * DulkirConfig.bestiaryNotifVol, 0f)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Hype Broken", 5000)
}
// update item regardless of whether it is bugged or not
diff --git a/src/main/kotlin/dulkirmod/features/Croesus.kt b/src/main/kotlin/dulkirmod/features/Croesus.kt
index ea8b022..9369140 100644
--- a/src/main/kotlin/dulkirmod/features/Croesus.kt
+++ b/src/main/kotlin/dulkirmod/features/Croesus.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.ContainerNameUtil
import net.minecraft.client.gui.inventory.GuiChest
import net.minecraft.inventory.Slot
@@ -19,7 +19,7 @@ object Croesus {
val lastInCroesus = inCroesusBool
var pageNumber = 1
- if (!Config.hideOpenedChests) return
+ if (!DulkirConfig.hideOpenedChests) return
if (mc.currentScreen == null || !(mc.currentScreen is GuiChest)) {
inCroesusBool = false
return
diff --git a/src/main/kotlin/dulkirmod/features/DragonTimer.kt b/src/main/kotlin/dulkirmod/features/DragonTimer.kt
index ad1506f..c8affee 100644
--- a/src/main/kotlin/dulkirmod/features/DragonTimer.kt
+++ b/src/main/kotlin/dulkirmod/features/DragonTimer.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.ScoreBoardUtils
import dulkirmod.utils.WorldRenderUtils
import net.minecraft.util.BlockPos
@@ -30,7 +30,7 @@ object DragonTimer {
* Called from within the MixinWorld Class
*/
fun handleNewParticle(pID: Int, x: Double, y: Double, z: Double) {
- if (!Config.dragonTimer) return
+ if (!DulkirConfig.dragonTimer) return
if (!ScoreBoardUtils.isInM7) return
if (pID != 26) return
@@ -46,7 +46,7 @@ object DragonTimer {
fun onRenderWorld(event: RenderWorldLastEvent) {
renderDragonBoxes()
- if (!Config.dragonTimer) return
+ if (!DulkirConfig.dragonTimer) return
if (!ScoreBoardUtils.isInM7) return
val curTime = System.currentTimeMillis()
@@ -116,7 +116,7 @@ object DragonTimer {
}
private fun renderDragonBoxes() {
- if (!Config.dragonKillBox) return
+ if (!DulkirConfig.dragonKillBox) return
if (!ScoreBoardUtils.isInM7) return
if (mc.thePlayer.positionVector.yCoord > 45) return
// Blue
diff --git a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
index bfbfe50..5185516 100644
--- a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
+++ b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.ContainerNameUtil
import dulkirmod.utils.Utils
import net.minecraft.client.gui.inventory.GuiChest
@@ -19,7 +19,7 @@ object DungeonLeap {
fun onTick(event: TickEvent.ClientTickEvent) {
val lastInLeap = inLeapMenu
- if (!Config.highlightLeap) return
+ if (!DulkirConfig.highlightLeap) return
if (mc.currentScreen == null || mc.currentScreen !is GuiChest) {
inLeapMenu = false
return
@@ -37,7 +37,7 @@ object DungeonLeap {
if (slotIn.stack == null) continue
val stack = slotIn.stack
- if (Utils.stripColorCodes(stack.displayName).equals(Config.highlightLeapName, true)) {
+ if (Utils.stripColorCodes(stack.displayName).equals(DulkirConfig.highlightLeapName, true)) {
leapPlayers[i - 11] = true
}
}
diff --git a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt
index 8bcd145..0bf6bbe 100644
--- a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt
+++ b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -11,7 +11,7 @@ object GardenVisitorAlert {
private var lastAlert = 0
fun alert() {
- if (!Config.notifyMaxVisitors) return
+ if (!DulkirConfig.notifyMaxVisitors) return
if (!Utils.isInSkyblock()) return
if (TabListUtils.area != "Garden") {
@@ -19,24 +19,24 @@ object GardenVisitorAlert {
}
if (TabListUtils.maxVisitors && !hasSentAlert) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Max Visitors", 5000)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .3f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .6f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .9f)
hasSentAlert = true
lastAlert = System.currentTimeMillis().toInt()
} else if (!TabListUtils.maxVisitors) hasSentAlert = false
val timeSinceLastAlert = System.currentTimeMillis().toInt() - lastAlert
- if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && Config.persistentAlert) {
+ if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && DulkirConfig.persistentAlert) {
lastAlert = System.currentTimeMillis().toInt()
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Max Visitors", 5000)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .3f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .6f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .9f)
}
}
diff --git a/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt b/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt
index 7237d95..4ba4798 100644
--- a/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt
+++ b/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt
@@ -1,14 +1,14 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.entity.EntityLivingBase
import net.minecraft.util.MathHelper
object HurtCamSlider {
fun renderHurt(partialTicks: Float): Boolean {
- if (!Config.hurtCamSlider) return false
+ if (!DulkirConfig.hurtCamSlider) return false
if (mc.renderViewEntity is EntityLivingBase) {
val entitylivingbase = mc.renderViewEntity as EntityLivingBase
var f: Float = (entitylivingbase.hurtTime.toFloat() - partialTicks)
@@ -23,7 +23,7 @@ object HurtCamSlider {
f = MathHelper.sin(f * f * f * f * Math.PI.toFloat())
val f2 = entitylivingbase.attackedAtYaw
GlStateManager.rotate(-f2, 0.0f, 1.0f, 0.0f)
- GlStateManager.rotate(-f * 14.0f * Config.hurtCamIntensity, 0.0f, 0.0f, 1.0f)
+ GlStateManager.rotate(-f * 14.0f * DulkirConfig.hurtCamIntensity, 0.0f, 0.0f, 1.0f)
GlStateManager.rotate(f2, 0.0f, 1.0f, 0.0f)
}
return true
diff --git a/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt b/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt
index c65b3dd..a8770c2 100644
--- a/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt
+++ b/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.Utils
import dulkirmod.utils.WorldRenderUtils
@@ -13,7 +13,7 @@ import kotlin.math.max
object KeeperWaypoints {
@SubscribeEvent
fun onWorldRenderLast(event: RenderWorldLastEvent) {
- if (!Config.keeperWaypoints) return
+ if (!DulkirConfig.keeperWaypoints) return
if (TabListUtils.area != "Spider's Den") return
val vec1 = Vec3(-208.5, 44.5, -259.5)
@@ -37,7 +37,7 @@ object KeeperWaypoints {
val scale8 = max(1f, playerVec.distanceTo(vec8).toFloat()/10f)
val scale9 = max(1f, playerVec.distanceTo(vec9).toFloat()/10f)
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
WorldRenderUtils.renderString(vec1, "${color}1", false, scale1, true)
WorldRenderUtils.renderString(vec2, "${color}2", false, scale2, true)
WorldRenderUtils.renderString(vec3, "${color}3", false, scale3, true)
diff --git a/src/main/kotlin/dulkirmod/features/MatchoAlert.kt b/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
index 50f433e..54abc99 100644
--- a/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
+++ b/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -11,7 +11,7 @@ object MatchoAlert {
var hasSentAlert = false
fun alert() {
- if (!Config.notifyMatcho) return
+ if (!DulkirConfig.notifyMatcho) return
if (!Utils.isInSkyblock()) return
if (TabListUtils.area != "Crimson Isle") {
@@ -19,10 +19,10 @@ object MatchoAlert {
}
if (TabListUtils.explosivity && !hasSentAlert) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Matcho", 5000)
- if (Config.bestiaryAlertSounds)
- DulkirMod.mc.thePlayer.playSound("mob.villager.yes", 1f * Config.bestiaryNotifVol, 0f)
+ if (DulkirConfig.bestiaryAlertSounds)
+ DulkirMod.mc.thePlayer.playSound("mob.villager.yes", 1f * DulkirConfig.bestiaryNotifVol, 0f)
hasSentAlert = true
} else if (!TabListUtils.explosivity) hasSentAlert = false
}
diff --git a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
index dd69f24..dcb46ef 100644
--- a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
+++ b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.entity.Entity
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -11,7 +11,7 @@ object MemoryLeakFix {
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
- if (!Config.crimsonIslesMemoryLeakPatch) return
+ if (!DulkirConfig.crimsonIslesMemoryLeakPatch) return
if (System.currentTimeMillis() - lastClear >= 30000L) {
val world = mc.theWorld ?: return
diff --git a/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt b/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
index 7d1d623..53cb9ea 100644
--- a/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
+++ b/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.gui.GuiChat
@@ -28,7 +28,7 @@ object ScalableTooltips {
screenHeight: Int,
font: FontRenderer,
): Boolean {
- if(!Config.scaledTooltips) return false
+ if(!DulkirConfig.scaledTooltips) return false
if(textLines.isEmpty()) return true
// Calculate the amount of translation that should be applied based on how much the user has scrolled
@@ -59,7 +59,7 @@ object ScalableTooltips {
}
}
- val scale = (Config.tooltipSize + scaleScale).coerceAtLeast(0f)
+ val scale = (DulkirConfig.tooltipSize + scaleScale).coerceAtLeast(0f)
// Calculate the width and height of the tooltip box
var width = 0
diff --git a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
index 9b429cb..0d6f47f 100644
--- a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
@@ -1,6 +1,6 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TextUtils
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.client.event.sound.PlaySoundEvent
@@ -14,7 +14,7 @@ object AbiphoneDND {
//BLOCK ABIPHONE SOUNDS
@SubscribeEvent(receiveCanceled = false, priority = EventPriority.LOW)
fun onSound(event: PlaySoundEvent) {
- if (!Config.abiDND) return
+ if (!DulkirConfig.abiDND) return
if (System.currentTimeMillis() - lastRing < 5000) {
if (event.name == "note.pling" && event.sound.volume == 0.69f && event.sound.pitch == 1.6666666f) {
event.result = null
@@ -23,12 +23,12 @@ object AbiphoneDND {
}
fun handle(event: ClientChatReceivedEvent, unformatted: String) {
- if (!Config.abiDND) return
+ if (!DulkirConfig.abiDND) return
if (unformatted matches abiphoneFormat) {
val matchResult = abiphoneFormat.find(unformatted)
event.isCanceled = true
lastRing = System.currentTimeMillis()
- if (Config.abiCallerID) {
+ if (DulkirConfig.abiCallerID) {
val blocked = if (Math.random() < .001) "Breefing"
else matchResult?.groups?.get(1)?.value
TextUtils.info("§6Call blocked from $blocked!")
diff --git a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
index 83efb98..245fe22 100644
--- a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
@@ -1,6 +1,6 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.Utils
import net.minecraft.util.ChatComponentText
import net.minecraft.util.EnumChatFormatting
@@ -16,12 +16,12 @@ object Bridge {
fun handle(event: ClientChatReceivedEvent) {
val message = event.message.unformattedText
- if (guildFormat matches message && Config.bridgeBot) {
+ if (guildFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = guildFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
@@ -32,12 +32,12 @@ object Bridge {
}
// OTHER FORMAT
- else if (alternateFormat matches message && Config.bridgeBot) {
+ else if (alternateFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = alternateFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
@@ -47,12 +47,12 @@ object Bridge {
}
}
- else if (otherAltFormat matches message && Config.bridgeBot) {
+ else if (otherAltFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = otherAltFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
diff --git a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
index fbd2437..736ee43 100644
--- a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
@@ -1,7 +1,7 @@
package dulkirmod.features.chat
import dulkirmod.DulkirMod
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TextUtils
import net.minecraftforge.client.event.ClientChatReceivedEvent
@@ -13,9 +13,9 @@ object ThrottleNotif {
&& TabListUtils.isInDungeons
) {
event.isCanceled = true
- if (!Config.throttleNotifierSpam && System.currentTimeMillis() - lastThrottle > 8000) {
+ if (!DulkirConfig.throttleNotifierSpam && System.currentTimeMillis() - lastThrottle > 8000) {
TextUtils.sendPartyChatMessage(DulkirMod.config.customMessage)
- } else if (Config.throttleNotifierSpam) {
+ } else if (DulkirConfig.throttleNotifierSpam) {
TextUtils.sendPartyChatMessage(DulkirMod.config.customMessage)
}
lastThrottle = System.currentTimeMillis()
diff --git a/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt b/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
index d607df2..93d15d2 100644
--- a/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
@@ -1,11 +1,11 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TextUtils
object VanquisherTrigger {
fun handle(message: String) {
- if (!Config.vanqBroadcast) return
+ if (!DulkirConfig.vanqBroadcast) return
if (message == "A Vanquisher is spawning nearby!") {
TextUtils.sendMessage("/patcher sendcoords")
}