9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-02 05:46:57 +00:00

More kotlin codestyle

This commit is contained in:
Auxilor
2021-08-26 15:15:43 +01:00
parent 49254f1c13
commit dd2456843f
4 changed files with 7 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ class CommandGive(plugin: EcoPlugin) :
override fun getTabCompleter(): TabCompleteHandler {
return TabCompleteHandler { _, args ->
val completions: MutableList<String> = ArrayList()
val completions = mutableListOf<String>()
if (args.size == 1) {
StringUtil.copyPartialMatches(
@@ -116,7 +116,7 @@ class CommandGive(plugin: EcoPlugin) :
return@TabCompleteHandler completions
}
return@TabCompleteHandler mutableListOf<String>()
return@TabCompleteHandler emptyList<String>()
}
}
}

View File

@@ -63,7 +63,7 @@ class CommandReset(plugin: EcoPlugin) :
return@TabCompleteHandler completions
}
return@TabCompleteHandler mutableListOf<String>()
return@TabCompleteHandler emptyList<String>()
}
}
}

View File

@@ -34,7 +34,7 @@ abstract class Skill(
init {
config = SkillConfig(this.id, this.javaClass, plugin)
rewards = ArrayList()
rewards = mutableListOf()
Skills.registerNewSkill(this)
}

View File

@@ -44,7 +44,7 @@ class SkillGUI(
).addLoreLines {
val currentXP = player.getSkillProgress(skill)
val requiredXP = skill.getExpForLevel(player.getSkillLevel(skill) + 1)
val lore: MutableList<String> = ArrayList()
val lore = mutableListOf<String>()
for (string in plugin.configYml.getStrings("gui.skill-icon.lore", false)) {
lore.add(
StringUtils.format(
@@ -169,8 +169,8 @@ class SkillGUI(
val slotLevel = ((page - 1) * levelsPerPage) + level
val meta = item.itemMeta!!
meta.lore = ArrayList()
val lore: MutableList<String> = ArrayList()
meta.lore = emptyList()
val lore = mutableListOf<String>()
item.amount = 1