Plugin category: FUN | MECH | MISC | RPG Suggested name: ItemNamer What I want: A plugin that allows me to assign a Name to items/blocks as if using an Anvil, but with a command. Hold an item and /rename <itemName> and it is given that name. eg. I hold a diamond sword, use /rename Excalibur and It becomes a diamond sword called Excalibur. NIdeas for commands: /rename <newItemname> Ideas for permissions: itemname.use When I'd like it by: Soon, preferably.
Are you asking for a plugin that completely renames the item for your server, or that each one player can have a sword that they customized to say "Excalibur" while the default is still "Diamond_Sword"
If I'm interpreting him correctly, I believe he means it for just the item held in the hand. This would be useful so that players could rename things without having to use an anvil.
Hey, I'm gonna try to create it tomorrow. I will reply if I finished or didn't. Whatever I try doing it.
New Download: <Edit by Moderator: Redacted mediafire url> Fixed no spaces bug. Done. <Edit by Moderator: Redacted mediafire url> LordMarkXD I guess I should provide more info. /rename ______ renames the item in hand, supports color codes using & in place of §, so /rename &cRED would work. Renamer.rename is the permission, or it'll work if you're op. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=90730929 name="cman1885" post=1398948]New Download: <Edit by Moderator: Redacted mediafire url> Fixed no spaces bug. Done. <Edit by Moderator: Redacted mediafire url> Can you make a plugin with similar feature, that "completely renames the item for your server"(Cyfurix)? The plugin will be called ItemRenamer, and have command "/rename <newItemname>" with the permission "item.rename". I will make a new thread if necessary ^^
That'd be pretty tough, you'd need to check a lot of events. Try making a new thread? I'll throw my (extremely simple) code for this up and someone else can take that up, I don't have the time. EDIT: source: http://pastebin.com/TjtwqGjs
Thanks! Works perfectly! I didn't think it was working because there was no message saying error or success, but that's also kinda a good thing
There's a problem with named items saving after reload/restart. That's on bukkit/mojang's side. Just thought I'd let you know.
Absolutely love it. One problem though. When renaming items with an illegitmate enchantment (ie. waterbreathing on a tool etc.) I get an error. Can be avoided, I can enchant after naming. It's just a bit annoying having to remember to rename first. Code: 16:34:28 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'rena me' in plugin Renamer v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18 0) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:5 02) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler. java:911) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:824) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:806) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.NetworkManager.b(NetworkManager.java:282) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:111) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:569) at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:486) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.ThreadServerApplication.run(SourceFile:818) Caused by: java.lang.IllegalArgumentException: Specified enchantment cannot be a pplied to this itemstack at org.bukkit.inventory.ItemStack.addEnchantment(ItemStack.java:301) at org.bukkit.inventory.ItemStack.addEnchantments(ItemStack.java:285) at com.github.cman85.Renamer.Renamer.onCommand(Renamer.java:46) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more
[quote uid=90647606 name="LordMarkXD" post=1403296]-snip-[/quote] Fixed. Bukkit handles enchantments in a really stupid way, where there are "safe" enchants and "unsafe" enchants. You can add a map of enchantments all at one time, but they're considered safe. When they're unsafe, like waterbreathing on a tool, it throws that error. New download: <Edit by Moderator: Redacted mediafire url> In the source I just replaced Code: css.addEnchantments(enchants) with Code: for(Enchantment e: enchants.keySet()) css.addUnsafeEnchantment(e, enchants.get(e));
Completely unrelated to this thread but, is there a way on windows to update a plugin without reboot/reloading the server? Windows always locks files when in use, is there an override?
You could try using something like PlugMan to Unload, remove, than load the new plugin. Not sure it'll work though, but it's worth a try.
Yeah I use PlugMan, but windows still locks the file because java is using them, so I can't delete the .jar even after /plugman unload <plugin>