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:
@@ -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>()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class CommandReset(plugin: EcoPlugin) :
|
||||
return@TabCompleteHandler completions
|
||||
}
|
||||
|
||||
return@TabCompleteHandler mutableListOf<String>()
|
||||
return@TabCompleteHandler emptyList<String>()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ abstract class Skill(
|
||||
|
||||
init {
|
||||
config = SkillConfig(this.id, this.javaClass, plugin)
|
||||
rewards = ArrayList()
|
||||
rewards = mutableListOf()
|
||||
|
||||
Skills.registerNewSkill(this)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user