[fix] Revert incorrect changes to CoordsLog

Just wait for setting descriptions

This reverts commit d1ecb21675.
This commit is contained in:
Dominika 2021-01-11 13:55:23 -05:00
parent d1ecb21675
commit b9c45cc311
No known key found for this signature in database
GPG Key ID: B4A5A6DCA70F861F
1 changed files with 7 additions and 7 deletions

View File

@ -17,9 +17,9 @@ object CoordsLog : Module(
description = "Automatically logs your coords, based on actions",
category = Category.MISC
) {
private val saveOnDeath by setting("SaveOnDeath", true)
private val logEveryX by setting("LogEveryX", false)
private val delay by setting("DelayMinutes", 15, 1..60, 1)
private val saveOnDeath = setting("SaveOnDeath", true)
private val autoLog = setting("AutoLog", false)
private val delay = setting("Delay", 15, 1..60, 1)
private var previousCoord: String? = null
private var savedDeath = false
@ -27,16 +27,16 @@ object CoordsLog : Module(
init {
safeListener<TickEvent.ClientTickEvent> {
if (logEveryX && timer.tick(delay.toLong())) {
if (autoLog.value && timer.tick(delay.value.toLong())) {
val currentCoord = player.positionVector.toBlockPos().asString()
if (currentCoord != previousCoord) {
WaypointManager.add("CoordsLog")
WaypointManager.add("autoLogger")
previousCoord = currentCoord
}
}
if (saveOnDeath) {
if (saveOnDeath.value) {
savedDeath = if (player.isDead || player.health <= 0.0f) {
if (!savedDeath) {
val deathPoint = WaypointManager.add("Death - " + InfoCalculator.getServerType()).pos
@ -50,4 +50,4 @@ object CoordsLog : Module(
}
}
}
}