Fix kotlin code style issues

This commit is contained in:
Gary Tierney
2018-09-04 04:43:34 +01:00
parent b6086d57b8
commit 475c7ac741
89 changed files with 338 additions and 435 deletions
@@ -1,9 +1,9 @@
package org.apollo.game.plugin.api
import java.lang.IllegalArgumentException
import org.apollo.cache.def.ItemDefinition
import org.apollo.cache.def.NpcDefinition
import org.apollo.cache.def.ObjectDefinition
import java.lang.IllegalArgumentException
/**
* Provides plugins with access to item, npc, and object definitions
@@ -101,5 +101,4 @@ object Definitions {
val normalizedName = name.replace('_', ' ')
return definitions.firstOrNull { it.nameSupplier().equals(normalizedName, ignoreCase = true) }
}
}
@@ -86,5 +86,4 @@ class SkillProxy(private val skills: SkillSet, private val skill: Int) {
val new = Math.min(current + amount, maximum)
skills.setCurrentLevel(skill, new)
}
}
@@ -100,5 +100,4 @@ private class ExpireObjectTask(
stop()
}
}
}
@@ -88,7 +88,5 @@ class DefinitionsTests {
@ObjectDefinitions
val objs = listOf("obj zero", "obj one", "obj two", "obj duplicate name", "obj duplicate name")
.mapIndexed { id, name -> ObjectDefinition(id).also { it.name = name } }
}
}
@@ -119,5 +119,4 @@ class PlayerTests {
assertEquals(10, hitpoints.maximum)
}
}
}
@@ -22,5 +22,4 @@ class PositionTests {
assertEquals(y, y2) { "y coordinate mismatch in Position destructuring." }
assertEquals(z, z2) { "z coordinate mismatch in Position destructuring." }
}
}