Renamed zeus to thor, improved descriptions
This commit is contained in:
@@ -61,6 +61,12 @@ fun EcoEnchantLike.getFormattedName(level: Int): String {
|
||||
}
|
||||
}
|
||||
|
||||
private val resetTags = arrayOf(
|
||||
"<reset>",
|
||||
"&r",
|
||||
"§r"
|
||||
)
|
||||
|
||||
fun EcoEnchantLike.getFormattedDescription(level: Int): List<String> {
|
||||
val plugin = EcoEnchantsPlugin.instance
|
||||
|
||||
@@ -68,7 +74,10 @@ fun EcoEnchantLike.getFormattedDescription(level: Int): List<String> {
|
||||
val descriptionFormat = plugin.configYml.getString("display.descriptions.format")
|
||||
val wrap = plugin.configYml.getInt("display.descriptions.word-wrap")
|
||||
|
||||
val description = this.getUnformattedDescription(level)
|
||||
var description = this.getUnformattedDescription(level)
|
||||
for (tag in resetTags) {
|
||||
description = description.replace(tag, tag + descriptionFormat)
|
||||
}
|
||||
|
||||
WordUtils.wrap(description, wrap, "\n", false)
|
||||
.lines()
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
display-name: "Zeus"
|
||||
description: "&a%placeholder%%&8 chance to strike lightning on your opponent"
|
||||
placeholder: "%level% * 1"
|
||||
type: normal
|
||||
|
||||
targets:
|
||||
- bow
|
||||
- crossbow
|
||||
conflicts: []
|
||||
rarity: epic
|
||||
max-level: 6
|
||||
|
||||
tradeable: true
|
||||
discoverable: true
|
||||
enchantable: true
|
||||
|
||||
effects:
|
||||
- id: strike_lightning
|
||||
args:
|
||||
amount: 1
|
||||
chance: "1 * %level%"
|
||||
triggers:
|
||||
- bow_attack
|
||||
|
||||
conditions: [ ]
|
||||
display-name: "Thor"
|
||||
description: "Gives a &a%chance%%&8 chance to strike &a%bolts%&8 lightning bolts on your opponent"
|
||||
placeholders:
|
||||
chance: "%level% * 1"
|
||||
bolts: "ceil(%level% / 2)"
|
||||
type: normal
|
||||
|
||||
targets:
|
||||
- bow
|
||||
- crossbow
|
||||
conflicts: []
|
||||
rarity: epic
|
||||
max-level: 6
|
||||
|
||||
tradeable: true
|
||||
discoverable: true
|
||||
enchantable: true
|
||||
|
||||
effects:
|
||||
- id: strike_lightning
|
||||
args:
|
||||
amount: "ceil(%level% / 2)"
|
||||
chance: "1 * %level%"
|
||||
triggers:
|
||||
- bow_attack
|
||||
|
||||
conditions: [ ]
|
||||
Reference in New Issue
Block a user