Closed SiuanSong closed 6 years ago
What are you trying to prevent? Players from using a word in the new name/lore or players from renaming something with that word in it?
Both actually. "Players from using a word in the new lore" is blocked and working properly. It's "players from renaming something with that word in it" that is broken.
We have a plugin that gives potion effects if a certain lore is on the item. Some effects are negative, such as Blindness. Players are able to simply remove the lore line to get rid of the effect. However, they cannot add an effect via low, they can only remove.
I will look at the code to see if there is an obvious issue. Can you send me a copy of your config?
Also what version of the plugin and spigot/bukkit are you using?
EpicRename v 3.4 git-Spigot-642f6d2-ca6d2cf (MC: 1.12.2)
The existinglore and existingname blacklists are what you are missing. They block players from preforming commands on items that already have the listed words in their lore or name respectively. So your config should look something like this:
#EpicRename by Justin Brubaker. https://www.spigotmc.org/resources/epicrename.4341/
#Version 3.0+
#DO NOT CHANGE THIS PLEASE
config_version: 4
#Plugin Prefix
prefix: '&8[&3Rename&8] &f'
#Economy Features
#You must restart the server after changing the economy settings.
economy:
use: false
costs:
rename: 100
lore: 100
#Blacklists
blacklists:
material:
- 'WATCH'
- 'PAPER'
- 'COMPASS'
- 'TRIPWIRE_HOOK'
- 'DIAMOND'
- 'MONSTER_EGG'
- 'MONSTER_EGGS'
text:
- 'Swan Key'
- 'Donator Key'
- 'The Orb'
- 'Token'
- 'Voucher'
- 'Mending X'
- 'Infinity X'
- 'I*'
- 'II*'
- 'III*'
- 'IV*'
- 'V*'
- 'VI*'
- 'X*'
- 'Kolbi'
- 'Item frames needed'
- 'Louie216'
#These values are checked without color and are case insensitive.
existingname:
- 'Swan Key'
- 'Donator Key'
- 'The Orb'
- 'Token'
- 'Voucher'
- 'Mending X'
- 'Infinity X'
- 'I*'
- 'II*'
- 'III*'
- 'IV*'
- 'V*'
- 'VI*'
- 'X*'
- 'Kolbi'
- 'Item frames needed'
- 'Louie216'
#These values are checked without color and are case insensitive.
existingloreline:
- 'Swan Key'
- 'Donator Key'
- 'The Orb'
- 'Token'
- 'Voucher'
- 'Mending X'
- 'Infinity X'
- 'I*'
- 'II*'
- 'III*'
- 'IV*'
- 'V*'
- 'VI*'
- 'X*'
- 'Kolbi'
- 'Item frames needed'
- 'Louie216'
#Default Character Limit is 30
character_limit:
enabled: false
limit: 30
#Should underscores be replaced with spaces?
replace_underscores: false
#Per world plugin enable
per_world: false
#Enabled worlds
enabled_worlds:
- 'world'
- 'world_nether'
- 'world_the_end'
Sorry that it is not more clear. blacklists.text
was named before blacklists.existinglore
and blacklists.existingname
existed.
Thank you! Working now
Awesome! I have created an issue (#94) that should address the the clarity issue in the future.
Broken: Players are able to /removeloreline, /rename, /lore, & /setloreline from an item with a blacklisted word, thus removing any lore or name from an item they shouldn't be able to.
However, players are not able to /setloreline, /lore [blacklisted word] or /rename [blacklisted word]