Skip to content

Commit

Permalink
Commented the config
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen authored and I Al Istannen committed Sep 28, 2016
1 parent f8d8a7d commit 6b4c9ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ private void replaceLore(ItemStack itemStack) {
}

private boolean isReplaceableItemStack(ItemStack itemStack) {
return itemStack != null
&& itemStack.getType() != Material.AIR
&& itemStack.hasItemMeta()
&& itemStack.getItemMeta().hasLore()
&& doesListMatchIdentifier(itemStack.getItemMeta().getLore());
return itemStack != null
&& itemStack.getType() != Material.AIR
&& itemStack.hasItemMeta()
&& itemStack.getItemMeta().hasLore()
&& doesListMatchIdentifier(itemStack.getItemMeta().getLore());
}

private boolean doesListMatchIdentifier(List<String> list) {
Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# The identifier regular expression
# The regular expression to match the lore. This is what will be replaced. Must be the only thing in the lore line
# Beware. Some characters are 'meta' characters and must be escaped.
# Have a look here: https://en.wikipedia.org/wiki/Regular_expression
identifierRegEx: "%LORE%"

# The lores to use
lores:
# The name of the lore. Must be unique, but else unimportant
test:
# The lore. May be multiple lines
lore:
- "&6| 33&r"
- "&6| Yea&r"
# The statistical weight of this lore. These numbers can be anything, but summing up to a multiple of 10 is best.
# So this is okay, as they are 1 together (10^0). Summing up to 100 is fine too (10^2). What you like best.
weight: 0.6
another:
lore:
Expand Down

0 comments on commit 6b4c9ec

Please sign in to comment.