diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/commands/CommandHelpers.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/commands/CommandHelpers.kt index 42eca18c..5e3bad29 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/commands/CommandHelpers.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/commands/CommandHelpers.kt @@ -121,8 +121,8 @@ fun CommandBase.addSubcommand( } /** - * Kotlin builder for commands. - * Inherits plugin, permission, players only. + * Kotlin builder for commands. Inherits plugin, permission, players + * only. * * @param name The command name. * @param init The builder. diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/config/ConfigHelpers.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/config/ConfigHelpers.kt index 5db66764..f19cfd90 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/config/ConfigHelpers.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/config/ConfigHelpers.kt @@ -4,9 +4,7 @@ package com.willfp.eco.core.config import com.willfp.eco.core.config.interfaces.Config -/** - * Helper class to create configs with a kotlin DSL. - */ +/** Helper class to create configs with a kotlin DSL. */ class DSLConfig internal constructor(type: ConfigType) : TransientConfig(emptyMap(), type) { /** * Map a key to a value. diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/data/PersistentDataContainers.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/data/PersistentDataContainers.kt index bac3abfc..48be03bb 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/data/PersistentDataContainers.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/data/PersistentDataContainers.kt @@ -5,47 +5,33 @@ package com.willfp.eco.core.data import org.bukkit.persistence.PersistentDataContainer import org.bukkit.persistence.PersistentDataType -/** - * @see ExtendedPersistentDataContainer.set - */ +/** @see ExtendedPersistentDataContainer.set */ fun PersistentDataContainer.set(key: String, dataType: PersistentDataType, value: Z) = ExtendedPersistentDataContainer.extend(this).set(key, dataType, value) -/** - * @see ExtendedPersistentDataContainer.has - */ +/** @see ExtendedPersistentDataContainer.has */ fun PersistentDataContainer.has(key: String, dataType: PersistentDataType): Boolean = ExtendedPersistentDataContainer.extend(this).has(key, dataType) -/** - * @see ExtendedPersistentDataContainer.get - */ +/** @see ExtendedPersistentDataContainer.get */ fun PersistentDataContainer.get(key: String, dataType: PersistentDataType): Z? = ExtendedPersistentDataContainer.extend(this).get(key, dataType) -/** - * @see ExtendedPersistentDataContainer.getOrDefault - */ +/** @see ExtendedPersistentDataContainer.getOrDefault */ fun PersistentDataContainer.getOrDefault( key: String, dataType: PersistentDataType, defaultValue: Z ): Z = ExtendedPersistentDataContainer.extend(this).getOrDefault(key, dataType, defaultValue) -/** - * @see ExtendedPersistentDataContainer.getAllKeys - */ +/** @see ExtendedPersistentDataContainer.getAllKeys */ fun PersistentDataContainer.getAllKeys(): Set = ExtendedPersistentDataContainer.extend(this).allKeys -/** - * @see ExtendedPersistentDataContainer.remove - */ +/** @see ExtendedPersistentDataContainer.remove */ fun PersistentDataContainer.remove(key: String) = ExtendedPersistentDataContainer.extend(this).remove(key) -/** - * Create a new PDC without the need for an adapter context. - */ +/** Create a new PDC without the need for an adapter context. */ fun newPersistentDataContainer() = ExtendedPersistentDataContainer.create().base diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/data/Profiles.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/data/Profiles.kt index 9def5b6b..be818c1c 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/data/Profiles.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/data/Profiles.kt @@ -5,14 +5,10 @@ package com.willfp.eco.core.data import org.bukkit.OfflinePlayer import org.bukkit.Server -/** - * @see PlayerProfile.load - */ +/** @see PlayerProfile.load */ val OfflinePlayer.profile: PlayerProfile get() = PlayerProfile.load(this) -/** - * @see ServerProfile.load - */ +/** @see ServerProfile.load */ val Server.profile: ServerProfile get() = ServerProfile.load() diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/entities/Entities.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/entities/Entities.kt index 434dbb3f..7bb9d8b9 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/entities/Entities.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/entities/Entities.kt @@ -5,8 +5,6 @@ package com.willfp.eco.core.entities import com.willfp.eco.core.entities.ai.EntityController import org.bukkit.entity.Mob -/** - * @see EntityController.getFor - */ +/** @see EntityController.getFor */ val T.controller: EntityController get() = EntityController.getFor(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/fast/FastItemStack.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/fast/FastItemStack.kt index b4a8576f..c702f5cf 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/fast/FastItemStack.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/fast/FastItemStack.kt @@ -4,8 +4,6 @@ package com.willfp.eco.core.fast import org.bukkit.inventory.ItemStack -/** - * @see FastItemStack.wrap - */ +/** @see FastItemStack.wrap */ fun ItemStack.fast(): FastItemStack = FastItemStack.wrap(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/integrations/economy/EconomyHelpers.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/integrations/economy/EconomyHelpers.kt index e7c141d3..0562f71d 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/integrations/economy/EconomyHelpers.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/integrations/economy/EconomyHelpers.kt @@ -4,9 +4,7 @@ package com.willfp.eco.core.integrations.economy import org.bukkit.OfflinePlayer -/** - * @see EconomyManager - */ +/** @see EconomyManager */ var OfflinePlayer.balance: Double get() = EconomyManager.getBalance(this) set(value) { diff --git a/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt b/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt index a3cea2df..0bb6d53c 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/core/items/Items.kt @@ -6,21 +6,15 @@ import org.bukkit.inventory.ItemStack import org.bukkit.inventory.meta.ItemMeta import org.bukkit.persistence.PersistentDataContainer -/** - * @see Items.toLookupString - */ +/** @see Items.toLookupString */ fun ItemStack?.toLookupString(): String = Items.toLookupString(this) -/** - * @see Items.mergeFrom - */ +/** @see Items.mergeFrom */ fun ItemStack.mergeFrom(other: ItemStack): ItemStack = Items.mergeFrom(other, this) -/** - * @see Items.mergeFrom - */ +/** @see Items.mergeFrom */ fun ItemMeta.mergeFrom(other: ItemMeta): ItemMeta = Items.mergeFrom(other, this) @@ -34,8 +28,6 @@ var ItemStack.baseNBT: PersistentDataContainer Items.setBaseNBT(this, value) } -/** - * @see Items.setBaseNBT - */ +/** @see Items.setBaseNBT */ fun ItemStack.clearNBT() = Items.setBaseNBT(this, null) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/ArrowUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/ArrowUtils.kt index a6ba218f..fd92310c 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/ArrowUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/ArrowUtils.kt @@ -5,8 +5,6 @@ package com.willfp.eco.util import org.bukkit.entity.Arrow import org.bukkit.inventory.ItemStack -/** - * @see ArrowUtils.getBow - */ +/** @see ArrowUtils.getBow */ val Arrow.bow: ItemStack? get() = ArrowUtils.getBow(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/BlockUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/BlockUtils.kt index 112e8c4a..841c2fa1 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/BlockUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/BlockUtils.kt @@ -4,8 +4,6 @@ package com.willfp.eco.util import org.bukkit.block.Block -/** - * @see ArrowUtils.getBow - */ +/** @see ArrowUtils.getBow */ val Block.isPlayerPlaced: Boolean get() = BlockUtils.isPlayerPlaced(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/DurabilityUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/DurabilityUtils.kt index 47adf4c3..7befdad4 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/DurabilityUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/DurabilityUtils.kt @@ -5,14 +5,10 @@ package com.willfp.eco.util import org.bukkit.entity.Player import org.bukkit.inventory.ItemStack -/** - * @see DurabilityUtils.damageItem - */ +/** @see DurabilityUtils.damageItem */ fun ItemStack.damage(damage: Int) = DurabilityUtils.damageItem(this, damage) -/** - * @see DurabilityUtils.damageItem - */ +/** @see DurabilityUtils.damageItem */ fun ItemStack.damage(damage: Int, player: Player) = DurabilityUtils.damageItem(player, this, damage) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/NamespacedKeyUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/NamespacedKeyUtils.kt index 127132bf..91d05174 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/NamespacedKeyUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/NamespacedKeyUtils.kt @@ -4,26 +4,18 @@ package com.willfp.eco.util import com.willfp.eco.core.EcoPlugin -/** - * @see NamespacedKeyUtils.fromString - */ +/** @see NamespacedKeyUtils.fromString */ fun namespacedKeyOf(string: String) = NamespacedKeyUtils.fromString(string) -/** - * @see NamespacedKeyUtils.fromString - */ +/** @see NamespacedKeyUtils.fromString */ fun safeNamespacedKeyOf(string: String) = NamespacedKeyUtils.fromStringOrNull(string) -/** - * @see NamespacedKeyUtils.create - */ +/** @see NamespacedKeyUtils.create */ fun namespacedKeyOf(namespace: String, key: String) = NamespacedKeyUtils.create(namespace, key) -/** - * @see EcoPlugin.namespacedKeyFactory - */ +/** @see EcoPlugin.namespacedKeyFactory */ fun namespacedKeyOf(plugin: EcoPlugin, key: String) = plugin.namespacedKeyFactory.create(key) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/NumberUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/NumberUtils.kt index c94189a1..127049c9 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/NumberUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/NumberUtils.kt @@ -2,8 +2,6 @@ package com.willfp.eco.util -/** - * @see NumberUtils.toNumeral - */ +/** @see NumberUtils.toNumeral */ fun Number.toNumeral(): String = NumberUtils.toNumeral(this.toInt()) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/PlayerUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/PlayerUtils.kt index 7b020c6d..e6877a17 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/PlayerUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/PlayerUtils.kt @@ -8,32 +8,22 @@ import org.bukkit.command.CommandSender import org.bukkit.entity.Entity import org.bukkit.entity.Player -/** - * @see PlayerUtils.getSavedDisplayName - */ +/** @see PlayerUtils.getSavedDisplayName */ val OfflinePlayer.savedDisplayName: String get() = PlayerUtils.getSavedDisplayName(this) -/** - * @see PlayerUtils.getAudience - */ +/** @see PlayerUtils.getAudience */ fun Player.asAudience(): Audience = PlayerUtils.getAudience(this) -/** - * @see PlayerUtils.getAudience - */ +/** @see PlayerUtils.getAudience */ fun CommandSender.asAudience(): Audience = PlayerUtils.getAudience(this) -/** - * @see PlayerUtils.runExempted - */ +/** @see PlayerUtils.runExempted */ fun Player.runExempted(action: () -> Unit) = PlayerUtils.runExempted(this, action) -/** - * @see PlayerUtils.tryAsPlayer - */ +/** @see PlayerUtils.tryAsPlayer */ fun Entity?.tryAsPlayer(): Player? = PlayerUtils.tryAsPlayer(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt index 78a86597..7a726022 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt @@ -4,8 +4,6 @@ package com.willfp.eco.util import org.bukkit.potion.PotionData -/** - * @see PotionData.duration - */ +/** @see PotionData.duration */ val PotionData.duration: Int get() = PotionUtils.getDuration(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/ServerUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/ServerUtils.kt index 76cbc0bd..63953df3 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/ServerUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/ServerUtils.kt @@ -4,8 +4,6 @@ package com.willfp.eco.util import org.bukkit.Server -/** - * @see ServerUtils.getTps - */ +/** @see ServerUtils.getTps */ val Server.tps: Double get() = ServerUtils.getTps() diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/StringUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/StringUtils.kt index a7cefb3f..7ba84917 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/StringUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/StringUtils.kt @@ -5,33 +5,23 @@ package com.willfp.eco.util import net.kyori.adventure.text.Component import org.bukkit.entity.Player -/** - * @see StringUtils.toComponent - */ +/** @see StringUtils.toComponent */ fun String.toComponent(): Component = StringUtils.toComponent(this) -/** - * @see StringUtils.jsonToComponent - */ +/** @see StringUtils.jsonToComponent */ fun String.jsonToComponent(): Component = StringUtils.jsonToComponent(this) -/** - * @see StringUtils.toLegacy - */ +/** @see StringUtils.toLegacy */ fun Component.toLegacy(): String = StringUtils.toLegacy(this) -/** - * @see StringUtils.componentToJson - */ +/** @see StringUtils.componentToJson */ fun Component.toJSON(): String = StringUtils.componentToJson(this) -/** - * @see StringUtils.format - */ +/** @see StringUtils.format */ fun String.formatEco( player: Player? = null, formatPlaceholders: Boolean = false @@ -41,9 +31,7 @@ fun String.formatEco( if (formatPlaceholders) StringUtils.FormatOption.WITH_PLACEHOLDERS else StringUtils.FormatOption.WITHOUT_PLACEHOLDERS ) -/** - * @see StringUtils.formatList - */ +/** @see StringUtils.formatList */ fun List.formatEco( player: Player? = null, formatPlaceholders: Boolean = false @@ -53,14 +41,10 @@ fun List.formatEco( if (formatPlaceholders) StringUtils.FormatOption.WITH_PLACEHOLDERS else StringUtils.FormatOption.WITHOUT_PLACEHOLDERS ) -/** - * @see StringUtils.splitAround - */ +/** @see StringUtils.splitAround */ fun String.splitAround(separator: String): Array = StringUtils.splitAround(this, separator) -/** - * @see StringUtils.toNiceString - */ +/** @see StringUtils.toNiceString */ fun Any?.toNiceString(): String = StringUtils.toNiceString(this) diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/VectorUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/VectorUtils.kt index 3dfc5b6e..39d2d0cd 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/VectorUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/VectorUtils.kt @@ -4,14 +4,10 @@ package com.willfp.eco.util import org.bukkit.util.Vector -/** - * @see VectorUtils.isFinite - */ +/** @see VectorUtils.isFinite */ val Vector.isFinite: Boolean get() = VectorUtils.isFinite(this) -/** - * @see VectorUtils.simplifyVector - */ +/** @see VectorUtils.simplifyVector */ fun Vector.simplify(): Vector = VectorUtils.simplifyVector(this)