Applied kotlin style conventions

This commit is contained in:
bluefireoly
2020-10-18 18:36:49 +02:00
parent e1d4e8bbfc
commit da848728d2
39 changed files with 509 additions and 385 deletions

View File

@@ -43,7 +43,7 @@ fun Damageable.kill() {
*/
fun LivingEntity.heal() {
health = getAttribute(Attribute.GENERIC_MAX_HEALTH)?.value
?: throw NullPointerException("The entity does not have a max health value!")
?: throw NullPointerException("The entity does not have a max health value!")
}
/**
@@ -110,7 +110,13 @@ fun Location.spawnCleanEntity(entityType: EntityType): Entity? {
* @param stay time in ticks for titles to stay
* @param fadeOut time in ticks for titles to fade out
*/
fun Player.title(mainText: String? = null, subText: String? = null, fadeIn: Int = 10, stay: Int = 70, fadeOut: Int = 20) {
fun Player.title(
mainText: String? = null,
subText: String? = null,
fadeIn: Int = 10,
stay: Int = 70,
fadeOut: Int = 20
) {
sendTitle(mainText, subText, fadeIn, stay, fadeOut)
}