diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/EcoSkillsPlugin.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/EcoSkillsPlugin.java index 15a4118..636ede9 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/EcoSkillsPlugin.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/EcoSkillsPlugin.java @@ -137,4 +137,9 @@ public class EcoSkillsPlugin extends EcoPlugin { new IntegrationLoader("EcoEnchants", () -> this.getEventManager().registerListener(new EcoEnchantsEnchantingLeveller(this))) ); } + + @Override + public String getMinimumEcoVersion() { + return "6.6.0"; + } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/api/EcoSkillsAPI.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/api/EcoSkillsAPI.java index 4b8acaf..b70014f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/api/EcoSkillsAPI.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoskills/api/EcoSkillsAPI.java @@ -43,7 +43,7 @@ public interface EcoSkillsAPI { * @param skill The skill. * @return The progress. */ - double getSkillProgressToNextLevel(@NotNull Player player, + double getSkillProgressToNextLevel(@NotNull OfflinePlayer player, @NotNull Skill skill); /** @@ -53,7 +53,7 @@ public interface EcoSkillsAPI { * @param skill The skill. * @return The experience required. */ - int getSkillProgressRequired(@NotNull Player player, + int getSkillProgressRequired(@NotNull OfflinePlayer player, @NotNull Skill skill); /** @@ -63,7 +63,7 @@ public interface EcoSkillsAPI { * @param skill The skill. * @return The experience. */ - double getSkillProgress(@NotNull Player player, + double getSkillProgress(@NotNull OfflinePlayer player, @NotNull Skill skill); /** diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt index c4438f4..d28de89 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt @@ -3,17 +3,14 @@ package com.willfp.ecoskills import com.willfp.ecoskills.api.PlayerSkillExpGainEvent import com.willfp.ecoskills.api.PlayerSkillLevelUpEvent import com.willfp.ecoskills.effects.Effect -import com.willfp.ecoskills.effects.Effects import com.willfp.ecoskills.skills.Skill import com.willfp.ecoskills.skills.Skills import com.willfp.ecoskills.stats.Stat -import com.willfp.ecoskills.stats.Stats import org.bukkit.Bukkit import org.bukkit.OfflinePlayer import org.bukkit.entity.Entity import org.bukkit.entity.Player import org.bukkit.entity.Projectile -import org.bukkit.persistence.PersistentDataType import java.util.* val expMultiplierCache = mutableMapOf() @@ -99,31 +96,31 @@ fun OfflinePlayer.getSkillLevel(skill: Skill): Int { return plugin.dataYml.getInt("player.${this.uniqueId}.${skill.id}", 0) } -fun Player.setSkillLevel(skill: Skill, level: Int) { +fun OfflinePlayer.setSkillLevel(skill: Skill, level: Int) { plugin.dataYml.set("player.${this.uniqueId}.${skill.id}", level) } -fun Player.getSkillProgressToNextLevel(skill: Skill): Double { +fun OfflinePlayer.getSkillProgressToNextLevel(skill: Skill): Double { return this.getSkillProgress(skill) / this.getSkillProgressRequired(skill) } -fun Player.getSkillProgressRequired(skill: Skill): Int { +fun OfflinePlayer.getSkillProgressRequired(skill: Skill): Int { return skill.getExpForLevel(this.getSkillLevel(skill) + 1) } -fun Player.getSkillProgress(skill: Skill): Double { - return this.persistentDataContainer.getOrDefault(skill.xpKey, PersistentDataType.DOUBLE, 0.0) +fun OfflinePlayer.getSkillProgress(skill: Skill): Double { + return plugin.dataYml.getDoubleOrNull("player.${this.uniqueId}.${skill.xpKey.key}") ?: 0.0 } -fun Player.setSkillProgress(skill: Skill, level: Double) { - this.persistentDataContainer.set(skill.xpKey, PersistentDataType.DOUBLE, level) +fun OfflinePlayer.setSkillProgress(skill: Skill, level: Double) { + plugin.dataYml.set("player.${this.uniqueId}.${skill.xpKey.key}", level) } fun OfflinePlayer.getEffectLevel(effect: Effect): Int { return plugin.dataYml.getInt("player.${this.uniqueId}.${effect.id}", 0) } -fun Player.setEffectLevel(effect: Effect, level: Int) { +fun OfflinePlayer.setEffectLevel(effect: Effect, level: Int) { plugin.dataYml.set("player.${this.uniqueId}.${effect.id}", level) } @@ -136,18 +133,6 @@ fun Player.setStatLevel(stat: Stat, level: Int) { stat.updateStatLevel(this) } -fun Player.convertPersistentToYml() { - for (effect in Effects.values()) { - plugin.dataYml.set("player.${this.uniqueId}.${effect.id}", this.getEffectLevel(effect)) - } - for (stat in Stats.values()) { - plugin.dataYml.set("player.${this.uniqueId}.${stat.id}", this.getStatLevel(stat)) - } - for (skill in Skills.values()) { - plugin.dataYml.set("player.${this.uniqueId}.${skill.id}", this.getSkillLevel(skill)) - } -} - fun Entity.tryAsPlayer(): Player? { return when(this) { is Projectile -> { diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/api/EcoSkillsAPIImpl.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/api/EcoSkillsAPIImpl.kt index 23468dd..91809a6 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/api/EcoSkillsAPIImpl.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/api/EcoSkillsAPIImpl.kt @@ -20,15 +20,15 @@ object EcoSkillsAPIImpl: EcoSkillsAPI { player.giveSkillExperience(skill, amount) } - override fun getSkillProgressToNextLevel(player: Player, skill: Skill): Double { + override fun getSkillProgressToNextLevel(player: OfflinePlayer, skill: Skill): Double { return player.getSkillProgressToNextLevel(skill) } - override fun getSkillProgressRequired(player: Player, skill: Skill): Int { + override fun getSkillProgressRequired(player: OfflinePlayer, skill: Skill): Int { return player.getSkillProgressRequired(skill) } - override fun getSkillProgress(player: Player, skill: Skill): Double { + override fun getSkillProgress(player: OfflinePlayer, skill: Skill): Double { return player.getSkillProgress(skill) } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandRank.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandRank.kt new file mode 100644 index 0000000..af1f747 --- /dev/null +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandRank.kt @@ -0,0 +1,93 @@ +package com.willfp.ecoskills.commands + +import com.willfp.eco.core.EcoPlugin +import com.willfp.eco.core.command.CommandHandler +import com.willfp.eco.core.command.TabCompleteHandler +import com.willfp.eco.core.command.impl.Subcommand +import com.willfp.eco.util.StringUtils +import com.willfp.ecoskills.data.LeaderboardHandler +import com.willfp.ecoskills.data.savedDisplayName +import com.willfp.ecoskills.getSkillLevel +import com.willfp.ecoskills.skills.Skills +import com.willfp.ecoskills.util.TabCompleteHelper +import org.bukkit.command.CommandSender +import org.bukkit.util.StringUtil + + +class CommandRank(plugin: EcoPlugin) : + Subcommand( + plugin, + "rank", + "ecoskills.command.rank", + false + ) { + + override fun getHandler(): CommandHandler { + return CommandHandler { sender: CommandSender, args: List -> + if (args.isEmpty()) { + sender.sendMessage(plugin.langYml.getMessage("requires-skill")) + return@CommandHandler + } + + val skill = Skills.getByID(args[0].lowercase()) + + if (skill == null) { + sender.sendMessage(plugin.langYml.getMessage("invalid-skill")) + return@CommandHandler + } + + val page = if (args.size < 2) 1 else args[1].toIntOrNull() ?: 1 + + val top = LeaderboardHandler.getPage(page, skill) + + val messages = plugin.langYml.getStrings("top", false) + val lines = mutableListOf() + + val useDisplayName = plugin.configYml.getBool("commands.rank.use-display-name") + + for ((rank, player) in top) { + var line = plugin.langYml.getString("top-line-format", false) + .replace("%rank%", rank.toString()) + .replace("%level%", player.getSkillLevel(skill).toString()) + + var name = player.name!! + + if (useDisplayName) { + name = player.savedDisplayName + } + + line = line.replace("%playername%", name) + + lines.add(line) + } + + val linesIndex = messages.indexOf("%lines%") + if (linesIndex != -1) { + messages.removeAt(linesIndex) + messages.addAll(linesIndex, lines) + } + + for (message in messages) { + sender.sendMessage(StringUtils.format(message)) + } + } + } + + override fun getTabCompleter(): TabCompleteHandler { + return TabCompleteHandler { _, args -> + val completions = mutableListOf() + + if (args.size == 1) { + StringUtil.copyPartialMatches( + args[0], + TabCompleteHelper.SKILL_NAMES, + completions + ) + return@TabCompleteHandler completions + } + + return@TabCompleteHandler emptyList() + } + } + +} \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandSkills.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandSkills.kt index 66ae512..3fc9af0 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandSkills.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandSkills.kt @@ -17,6 +17,7 @@ class CommandSkills(plugin: EcoPlugin) : init { this.addSubcommand(CommandTop(plugin)) + .addSubcommand(CommandRank(plugin)) } override fun getHandler(): CommandHandler { diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandTop.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandTop.kt index e7fcc83..4b6dfd7 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandTop.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/commands/CommandTop.kt @@ -5,9 +5,9 @@ import com.willfp.eco.core.command.CommandHandler import com.willfp.eco.core.command.impl.Subcommand import com.willfp.eco.util.StringUtils import com.willfp.ecoskills.data.LeaderboardHandler +import com.willfp.ecoskills.data.savedDisplayName import com.willfp.ecoskills.getTotalSkillLevel import org.bukkit.command.CommandSender -import org.bukkit.entity.Player class CommandTop(plugin: EcoPlugin) : @@ -22,7 +22,7 @@ class CommandTop(plugin: EcoPlugin) : val page = args.firstOrNull()?.toIntOrNull() ?: 1 val top = LeaderboardHandler.getPage(page) - val messages = plugin.langYml.getStrings("top", false).toMutableList() + val messages = plugin.langYml.getStrings("top", false) val lines = mutableListOf() val useDisplayName = plugin.configYml.getBool("commands.top.use-display-name") @@ -34,8 +34,8 @@ class CommandTop(plugin: EcoPlugin) : var name = player.name!! - if (useDisplayName && player is Player) { - name = player.displayName + if (useDisplayName) { + name = player.savedDisplayName } line = line.replace("%playername%", name) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/DataListener.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/DataListener.kt index 846b6f0..304fb13 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/DataListener.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/DataListener.kt @@ -1,20 +1,21 @@ package com.willfp.ecoskills.data -import com.willfp.ecoskills.convertPersistentToYml +import com.willfp.ecoskills.* import com.willfp.ecoskills.effects.Effect -import com.willfp.ecoskills.getSkillLevel -import com.willfp.ecoskills.setEffectLevel +import com.willfp.ecoskills.effects.Effects import com.willfp.ecoskills.skills.Skills import com.willfp.ecoskills.stats.Stats import org.bukkit.attribute.Attribute +import org.bukkit.entity.Player import org.bukkit.event.EventHandler import org.bukkit.event.Listener import org.bukkit.event.player.PlayerJoinEvent +import org.bukkit.persistence.PersistentDataType class DataListener : Listener { @EventHandler fun onJoin(event: PlayerJoinEvent) { - event.player.convertPersistentToYml() + event.player.convertFromLegacyData() for (skill in Skills.values()) { for (levelUpReward in skill.getLevelUpRewards()) { @@ -51,4 +52,24 @@ class DataListener : Listener { stat.updateStatLevel(event.player) } } +} + +private fun Player.convertFromLegacyData() { + for (effect in Effects.values()) { + plugin.dataYml.set("player.${this.uniqueId}.${effect.id}", this.getEffectLevel(effect)) + } + for (stat in Stats.values()) { + plugin.dataYml.set("player.${this.uniqueId}.${stat.id}", this.getStatLevel(stat)) + } + for (skill in Skills.values()) { + plugin.dataYml.set("player.${this.uniqueId}.${skill.id}", this.getSkillLevel(skill)) + val prog = this.persistentDataContainer.get(skill.xpKey, PersistentDataType.DOUBLE) + if (prog != null) { + plugin.dataYml.set( + "player.${this.uniqueId}.${skill.xpKey.key}", + prog + ) + this.persistentDataContainer.remove(skill.xpKey) + } + } } \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/LeaderboardHandler.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/LeaderboardHandler.kt index 8fbe956..969de5d 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/LeaderboardHandler.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/LeaderboardHandler.kt @@ -1,6 +1,9 @@ package com.willfp.ecoskills.data +import com.willfp.ecoskills.getSkillLevel import com.willfp.ecoskills.getTotalSkillLevel +import com.willfp.ecoskills.skills.Skill +import com.willfp.ecoskills.skills.Skills import org.bukkit.Bukkit import org.bukkit.OfflinePlayer import kotlin.math.ceil @@ -9,16 +12,19 @@ import kotlin.math.min class LeaderboardHandler { companion object { - val sortedLeaderboard = mutableListOf() + private val sortedLeaderboard = mutableListOf() + private val skillLeaderboards = mutableMapOf>() - fun getPage(page: Int): MutableMap { - val maxPage = ceil(sortedLeaderboard.size / 10.0).toInt() + fun getPage(page: Int, skill: Skill? = null): MutableMap { + val selectedLeaderboard = if (skill == null) sortedLeaderboard else skillLeaderboards[skill]!! + + val maxPage = ceil(selectedLeaderboard.size / 10.0).toInt() val finalPage = max(1, min(page, maxPage)) val startIndex = (finalPage - 1) * 10 - val endIndex = min(startIndex + 10, sortedLeaderboard.size - 1) + val endIndex = min(startIndex + 10, selectedLeaderboard.size - 1) - val players = sortedLeaderboard.subList(startIndex, endIndex) + val players = selectedLeaderboard.subList(startIndex, endIndex) val withRank = mutableMapOf() var rank = startIndex + 1 @@ -33,6 +39,23 @@ class LeaderboardHandler { class Runnable : java.lang.Runnable { override fun run() { + for (skill in Skills.values()) { + val temp = mutableMapOf() + val top = mutableListOf() + + for (player in Bukkit.getOfflinePlayers()) { + temp[player] = 10000 - player.getSkillLevel(skill) + } + + val temp2 = temp.toList().sortedBy { (_, value) -> value }.toMap() + for (key in temp2.keys) { + top.add(key) + } + + skillLeaderboards[skill]?.clear() + skillLeaderboards[skill] = top + } + val temp = mutableMapOf() val top = mutableListOf() diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/SavedPlayerNameListener.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/SavedPlayerNameListener.kt new file mode 100644 index 0000000..33c0c77 --- /dev/null +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/data/SavedPlayerNameListener.kt @@ -0,0 +1,36 @@ +package com.willfp.ecoskills.data + +import com.willfp.eco.core.EcoPlugin +import com.willfp.ecoskills.plugin +import org.bukkit.OfflinePlayer +import org.bukkit.entity.Player +import org.bukkit.event.EventHandler +import org.bukkit.event.Listener +import org.bukkit.event.player.PlayerJoinEvent +import org.bukkit.event.player.PlayerQuitEvent + +class SavedPlayerNameListener( + private val plugin: EcoPlugin +) : Listener { + @EventHandler + fun onJoin(event: PlayerJoinEvent) { + event.player.savedDisplayName = event.player.displayName + } + + @EventHandler + fun onJoin(event: PlayerQuitEvent) { + event.player.savedDisplayName = event.player.displayName + } +} + +var OfflinePlayer.savedDisplayName: String + get() { + if (this is Player) { + plugin.dataYml.set("player.${this.uniqueId}.name", this.displayName) + } + + return plugin.dataYml.getStringOrNull("player.${this.uniqueId}.name") ?: this.name ?: "Unknown Player" + } + set(value) { + plugin.dataYml.set("player.${this.uniqueId}.name", value) + } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/Skill.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/Skill.kt index f7eb36a..91839cc 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/Skill.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/Skill.kt @@ -10,6 +10,7 @@ import com.willfp.ecoskills.config.SkillConfig import com.willfp.ecoskills.effects.Effect import com.willfp.ecoskills.effects.Effects import com.willfp.ecoskills.stats.Stats +import org.bukkit.Bukkit import org.bukkit.NamespacedKey import org.bukkit.entity.Player import org.bukkit.event.Listener @@ -27,6 +28,7 @@ abstract class Skill( lateinit var gui: SkillGUI var maxLevel: Int = 50 private val rewards = mutableListOf() + private val levelCommands = mutableMapOf>() // Cached values private val guiLoreCache = mutableMapOf>() @@ -55,6 +57,17 @@ abstract class Skill( } } + levelCommands.clear() + for (string in config.getStrings("rewards.level-commands", false)) { + val split = string.split(":") + val level = split[0].toInt() + val command = split[1] + + val commands = levelCommands[level] ?: mutableListOf() + commands.add(command) + levelCommands[level] = commands + } + PlaceholderEntry( id, { player -> player.getSkillLevel(this).toString() }, @@ -201,6 +214,14 @@ abstract class Skill( return lore } + fun executeLevelCommands(player: Player, level: Int) { + val commands = levelCommands[level] ?: emptyList() + + for (command in commands) { + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command.replace("%player%", player.name)) + } + } + open fun postUpdate() { // Override when needed } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevellingListener.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevellingListener.kt index d0e212d..3f53ebd 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevellingListener.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevellingListener.kt @@ -31,5 +31,7 @@ class SkillLevellingListener : Listener { } } } + + skill.executeLevelCommands(player, to) } } \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 7efa32d..3b6e90e 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -7,8 +7,8 @@ messages: requires-player: "&cYou must specify a player!" invalid-player: "&cInvalid player!" reset-player: "&fReset player!" - requires-skill-stat: "&cYou must specify a skill or stat!" - invalid-skill-stat: "&cInvalid a skill or stat!" + requires-skill: "&cYou must specify a skill!" + invalid-skill: "&cInvalid skill!" requires-amount: "&cYou must specify the amount!" invalid-amount: "&cInvalid amount!" gave-skill-xp: "Gave %player% %amount% %skill% experience!" diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index d9c3f3c..4f29d36 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -40,6 +40,7 @@ permissions: ecoskills.command.skills: true ecoskills.command.give: true ecoskills.command.top: true + ecoskills.command.rank: true ecoskills.command.reload: description: Allows reloading the config @@ -56,6 +57,9 @@ permissions: ecoskills.command.top: description: Allows the use of /ecoskills top. default: true + ecoskills.command.rank: + description: Allows the use of /ecoskills rank. + default: true ecoskills.command.give: description: Allows the use of /ecoskills give. default: op diff --git a/eco-core/core-plugin/src/main/resources/skills/alchemy.yml b/eco-core/core-plugin/src/main/resources/skills/alchemy.yml index 29d2897..0aa3407 100644 --- a/eco-core/core-plugin/src/main/resources/skills/alchemy.yml +++ b/eco-core/core-plugin/src/main/resources/skills/alchemy.yml @@ -29,6 +29,8 @@ rewards: - "efficient_brewing::1:10:100" - "mystic_resilience::1" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/armory.yml b/eco-core/core-plugin/src/main/resources/skills/armory.yml index 50ac098..3a73dba 100644 --- a/eco-core/core-plugin/src/main/resources/skills/armory.yml +++ b/eco-core/core-plugin/src/main/resources/skills/armory.yml @@ -29,6 +29,8 @@ rewards: - "infernal_resistance::1" - "bravery::1:10:100" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/combat.yml b/eco-core/core-plugin/src/main/resources/skills/combat.yml index 460b8a8..26dc2cc 100644 --- a/eco-core/core-plugin/src/main/resources/skills/combat.yml +++ b/eco-core/core-plugin/src/main/resources/skills/combat.yml @@ -32,6 +32,8 @@ rewards: - "strong_impact::1:10:100" - "endangering::1:20:100" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/enchanting.yml b/eco-core/core-plugin/src/main/resources/skills/enchanting.yml index bfc6abf..51202b6 100644 --- a/eco-core/core-plugin/src/main/resources/skills/enchanting.yml +++ b/eco-core/core-plugin/src/main/resources/skills/enchanting.yml @@ -29,6 +29,8 @@ rewards: - "reimbursement::1" - "overcompensation::1:10:100" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/exploration.yml b/eco-core/core-plugin/src/main/resources/skills/exploration.yml index 9b2ec8b..25324a9 100644 --- a/eco-core/core-plugin/src/main/resources/skills/exploration.yml +++ b/eco-core/core-plugin/src/main/resources/skills/exploration.yml @@ -29,6 +29,8 @@ rewards: - "dodging::1" - "accelerated_escape::1:10:100" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/farming.yml b/eco-core/core-plugin/src/main/resources/skills/farming.yml index 8d1c9e7..fd1a95b 100644 --- a/eco-core/core-plugin/src/main/resources/skills/farming.yml +++ b/eco-core/core-plugin/src/main/resources/skills/farming.yml @@ -29,6 +29,8 @@ rewards: - "satiation::1" - "golden_yield::1:10:100" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/fishing.yml b/eco-core/core-plugin/src/main/resources/skills/fishing.yml index 2c707fb..f35bc9b 100644 --- a/eco-core/core-plugin/src/main/resources/skills/fishing.yml +++ b/eco-core/core-plugin/src/main/resources/skills/fishing.yml @@ -23,6 +23,8 @@ rewards: - "wisdom::1" - "eye_of_the_depths::1" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/mining.yml b/eco-core/core-plugin/src/main/resources/skills/mining.yml index 308e6cb..43b645f 100644 --- a/eco-core/core-plugin/src/main/resources/skills/mining.yml +++ b/eco-core/core-plugin/src/main/resources/skills/mining.yml @@ -29,6 +29,8 @@ rewards: - "spelunking::1:10:100" - "dynamic_mining::1" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/eco-core/core-plugin/src/main/resources/skills/woodcutting.yml b/eco-core/core-plugin/src/main/resources/skills/woodcutting.yml index 450fcbb..6067cd7 100644 --- a/eco-core/core-plugin/src/main/resources/skills/woodcutting.yml +++ b/eco-core/core-plugin/src/main/resources/skills/woodcutting.yml @@ -26,6 +26,8 @@ rewards: - "craftsmanship::1" - "master_lumberjack::1" + level-commands: [] + # The chat messages to send on level up chat-messages: 1: diff --git a/gradle.properties b/gradle.properties index 61d191c..8f0283a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 1.0.6 +version = 1.2.0 plugin-name = EcoSkills \ No newline at end of file