Changed placeholder format, improved hot potato books
This commit is contained in:
@@ -63,7 +63,7 @@ class EcoScrollsPlugin : LibreforgePlugin() {
|
||||
}
|
||||
|
||||
PlaceholderManager.registerPlaceholder(
|
||||
object : DynamicPlaceholder(plugin, Pattern.compile("scroll_([a-z0-9_]+)_([a-zA-Z0-9_]+)")) {
|
||||
object : DynamicPlaceholder(plugin, Pattern.compile("scroll_([a-z0-9_]+):([a-zA-Z0-9_]+)")) {
|
||||
override fun getValue(args: String, context: PlaceholderContext): String? {
|
||||
val matcher = pattern.matcher(args)
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ lore:
|
||||
- "&6Example Scroll"
|
||||
|
||||
# Item placeholders for dynamic lore in plugins like EcoItems
|
||||
# The placeholder is %ecoscrolls_scroll_<scroll>_<placeholder>%, e.g.
|
||||
# %ecoscrolls_scroll_example_bonus%
|
||||
# The placeholder is %ecoscrolls_scroll_<scroll>:<placeholder>%, e.g.
|
||||
# %ecoscrolls_scroll_example:bonus%
|
||||
placeholders:
|
||||
bonus: "%level% * 2"
|
||||
|
||||
|
||||
@@ -7,17 +7,11 @@
|
||||
# The name of the scroll
|
||||
name: "&cHot Potato Book"
|
||||
|
||||
# The max level of the scroll
|
||||
max-level: 10
|
||||
|
||||
# The amount of times the scroll can be used
|
||||
max-uses: 1
|
||||
|
||||
# Options for the physical scroll item
|
||||
item:
|
||||
item: book unbreaking:1 hide_enchants
|
||||
|
||||
# Name and lore can use %uses%, %max_uses%, and %uses_left% placeholders
|
||||
name: "&cHot Potato Book"
|
||||
lore:
|
||||
- "&7When inscribed on armor, grants"
|
||||
@@ -29,69 +23,37 @@ item:
|
||||
- "&7This can be inscribed up to &a10 &7times"
|
||||
- "&7on an item!"
|
||||
|
||||
# Options for crafting, read here: https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes
|
||||
craftable: false
|
||||
recipe: [ ]
|
||||
|
||||
# Options for inscribing items with the scroll
|
||||
inscription:
|
||||
# The conditions required to inscribe the item
|
||||
# not-met-effects will run if someone tries to inscribe the item without meeting the conditions
|
||||
conditions: [ ]
|
||||
|
||||
# The effects that will be run when the item is inscribed
|
||||
# If your scroll works by modifying the item (e.g. adding enchantments, changing durability),
|
||||
# then put those effects here.
|
||||
effects: [ ]
|
||||
|
||||
# Read https://plugins.auxilor.io/all-plugins/prices
|
||||
# The price to inscribe the item
|
||||
price:
|
||||
value: 100
|
||||
type: coins
|
||||
display: "&e%value% coins"
|
||||
|
||||
# The formula to multiply the price depending on the level.
|
||||
# The %level% placeholder is the *current* level of the scroll
|
||||
price-level-multiplier: "1 + %level% * 0.5"
|
||||
|
||||
# If the scroll can be applied to items via drag-and-drop
|
||||
drag-and-drop: true
|
||||
|
||||
# If the scroll can be applied to items via the inscription table
|
||||
drag-and-drop: false
|
||||
inscription-table: true
|
||||
|
||||
# The items that the scroll can be applied to, see targets.yml
|
||||
targets:
|
||||
- sword
|
||||
- axe
|
||||
- armor
|
||||
|
||||
# The conflicts that the scroll has with other scrolls
|
||||
conflicts: [ ]
|
||||
|
||||
# The scroll(s) that must be applied to the item before this scroll can be applied
|
||||
requirements: [ ]
|
||||
|
||||
# If inscribing this scroll should remove the required scrolls
|
||||
remove-requirements: false
|
||||
|
||||
# The lore added to items when inscribed with the scroll
|
||||
lore: [ ]
|
||||
|
||||
# Item placeholders for dynamic lore in plugins like EcoItems
|
||||
# The placeholder is %ecoscrolls_scroll_<scroll>_<placeholder>%, e.g.
|
||||
# %ecoscrolls_scroll_example_bonus%
|
||||
placeholders:
|
||||
# For EcoItems items, use %ecoscrolls_scroll_hot_potato_book_defense% in lore
|
||||
defense: " &8(&e{^{%level% * 2}}&8)"
|
||||
# For EcoItems items, use %ecoscrolls_scroll_hot_potato_book:defense% in lore
|
||||
defense: "&8(&e+{^{%level% * 2}}&8)"
|
||||
# Same as above, but for health / strength / crit_damage
|
||||
health: " &8(&e{^{%level%}}&8)"
|
||||
strength: " &8(&e{^{%level% * 2}}&8)"
|
||||
crit_damage: " &8(&e{^{%level% * 4}}&8)"
|
||||
health: "&8(&e+{^{%level%}}&8)"
|
||||
strength: "&8(&e+{^{%level% * 2}}&8)"
|
||||
crit_damage: "&8(&e+{^{%level% * 4}}&8)"
|
||||
|
||||
# Read https://plugins.auxilor.io/effects/configuring-an-effect
|
||||
# The effects for the scroll to give
|
||||
effects:
|
||||
# Armor effects
|
||||
- id: add_stat
|
||||
@@ -129,6 +91,4 @@ effects:
|
||||
args:
|
||||
slot: mainhand
|
||||
|
||||
# Read https://plugins.auxilor.io/effects/configuring-a-condition
|
||||
# The conditions for the scroll to work
|
||||
conditions: [ ]
|
||||
|
||||
Reference in New Issue
Block a user