Auto-Rename
Description
What it is
This plugin will rename configurable items to a configurable name when they are created, enchanted, or combined.
commands
- AR-Reload: Reloads the config
Permissions
Auto-Rename.ReloadConfig: permission to reload the config
- If anyone wants any for whatever reason just ask.
How it works
When someone creates, enchants, or combines items the name is reset if it is in the config.
when crafting or combining the name only shows up correctly after it is taken out of the result slot.
Config
The items use material names from the bukkit api so that means that it is all in caps without spaces, for instance a diamond sword is DIAMOND_SWORD
Under the item there can be a section called default. This is what it defaults to on creation and if the enchantments don't match any other category. This section is optional. If it isn't there then the normal name will be used.
For items with a different data value than 0 you just add a separate section under the item number called data then have the data value there. This would be used for something like wool or dyes or wood.
For items to have enchantments and have a different name you put a number with apostrophes around it (eg. '1') starting with 1 and going to how ever many different enchantment combos you want. Under the number you have to have a section called enchantments. This uses the name of enchantments in the bukkit api then a colon and the level of the enchantment. For instance fo a power 1 enchantment it would be ARROW_DAMAGE:1, for the name of the item with those enchantments you have to put another category under the number called name then the name goes after it.
For potions you have to put the potion type from the bukkit api then under it you put the level of the potion. For instance, for a speed 1 potion you would have to put SPEED: then under it would go '1': "name you want".
All of the names that I keep referring to in the bukkit api are under static public attributes.
Also if you want the name to be more than one word you have to put either quotes or apostrophes around it and color codes work for the names. You have to put &# to identify it as a certain color that you want.
I have examples of all of this in the default config.
To Do
- Anyone have any suggestions?
Known Bugs
- When you take something out of the result slot of the furnace inventory the smelting slot turns into whatever you took out if the name was changed until the inventory updates.
- If anyone finds any please create a ticket for it
I have a bug!
idk what i did wrong!
PLEASE HELP!
IDK WHAT TO DO!
OR WHAT I DID WRONG ONLY THE FIRST ONE WILL WORK!
PAPER:
'1':
name: '&1&lL&5&lS&3&LD'
lore:
- LSD!
WHEAT:
'2':
name: '&eHeroin'
lore:
- HEROIN!
SUGAR:
'3':
name: '&f&lKokain'
lore:
- KOKAIN!
NETHER_QUARTZ:
'4':
name: '&cCrack'
lore:
- CRACK!
LIGHT_BlUE_DYE:
'5':
name: '&3Meth!'
lore:
- METH!
SPONGE:
'6':
name: '&6Lucky Block'
lore:
- KUN GODE TING!
FERN:
'7':
name: '&2Hash'
lore:
- HASH!
PURPLE_DYE:
'8':
name: '&5Ecstasy'
lore:
- ECSTASY!
How do you seperate enchantments to have an enchantment combo:
DIAMOND_SWORD:
'1':
enchants:
- DAMAGE_ALL:1,KNOCKBACK:1
name: '&9Mighty Sword of CommanderBrent01'
This dosent work!
But can u make it so that u can set multiple names for the same enchantments
nvm about ^ i found out how it works.
So i installed the plugin and i set 6 names for DIAMOND_SWORD and when i enchant a diamond sword every single time it names the diamond sword the last name i put #6. Can you help me? Skype: bossdude1210 plz reply.
Does this still work in 1.8?
@iGianni
Yeah, just use &# for colors.
Does it work with colour codes?
@Jogy34
Nice, i like it, does exactly what i want :)
@xXBadeye
yes
Is picking up items also supported?
Could you please make the item names change when you are given it with the /give command? I would really appreciate it
@Jogy34
Actually that doesn't seem to work...
@SrPatchez
You just add lore and then a list of lore that you want as another argument so something like this:
lore:
- '&1It's Dangerous to go alone...'
- '&3Take This'
@Jogy34
Oh Cool how do you set it i did not see it anywhere in the config.
@SrPatchez
This does have the ability to add lore. And the item's names are changed when someone picks up an item, drops an item, finishes crafting an item, etc...
You should make it so that it can add "Lore" as well.
And does this work if a mob drops the item? Or if its bought from a "shop"?
@tenten8401
I tried that (if I'm understanding you correctly) but the problem is that a player's inventory opening is handled client side so I have no way of hooking into that. If I did do that it would only affect the inventories of chests and things which items would typically already be updated if things had been put into them.
You should TOTALLY add an inventory updater
@Jexter_
No, you have to actually have a separate section under the thing. For instance:
I'm not 100% sure if that is correct. My laptop is currently broken so I don't have a way to check. If you look in the default config I believe there should be some examples of everything.