MyItems
This plugin allows you to create custom items, with custom names and lores, which can execute commands on different events.
Features:
- Create items with custom names and lores (color codes supported)
- These items can execute commands on different events
- They can execute commands as the player that used it or as the console (change from the config file)
- Use the name of the player that uses the item inside the command (with <user>)
- Use the name of the player or mob that got clicked on (only for rightclickentityevent or damageentityevent) inside the command (with <clicked>)
- Use multiple-lined lores using "&&" (without quotes) for a new line
- Create global items (see "What are global items?" below)
- Create single-use items
- Use data values for items
- Execute multiple commands on one event using " && " (without quotes) to split them
Please read the Features list, carefully, as it contains details about what the plugin can do, and how to use those. If you have a question, it's likely that the answer might be there (or somewhere else on this page).
Permissions:
By default, only OPs have these permissions.
- myitems.create
- myitems.setlore
- myitems.setcommand
- myitems.get
- myitems.use.<ItemName>
- myitems.list
- myitems.delete
Commands:
- /mi - Help page
- /mi get <name> [playername] - Get an item
- /mi list - List the items
- /mi create <name> <display name> <item ID> [-g] [-s] - Create a new item. If you use the -g flag, the item becomes global. If you use the -s flag, it becomes a single-use item
- /mi setlore <name> <lore> - Set the lore of an item
- /mi setcommand <name> <event> <command> - Set the command to be executed on certain events (see below) for an item
- /mi delete <name> - Delete an item
Events:
- leftclickevent (Event Group)
- damageentityevent - When you hit another player or a mob
- leftclickblockevent - When you left-click a block
- leftclickairevent - When you left-click in the air
- rightclickevent (Event Group)
- rightclickentityevent - When you right-click another player or a mob
- rightclickblockevent - When you right-click a block
- rightclickairevent - When you right-click in the air
- consumeevent - When you eat the item (only for food)
- blockplaceevent - When you place a block
- holdevent - When you first hold the item
- throwevent - When you throw the item (only for throwable items such as snowballs)
- bedenterevent - When you enter a bed
More events will be added later (give me some ideas).
What are global items?
Let's say you create an item (using "/mi create") that's not global, and set the commands for it. If this item has the ID of a dirt block, it won't change the behavior of a normal dirt block. Normal dirt blocks won't execute commands, but the dirt block you get with "/mi get" will.
Now, if that's how non-global items are, you can probably guess what global items are. You create an item (using "/mi create") which is global, and set the commands for it. It has the ID of a dirt block. The dirt block you get with "/mi get" will execute commands, however, every other dirt block in minecraft will also be able to execute the same commands.
Bugs/Problems:
If you find one, submit a ticket.
Upcoming Features:
- itembreakevent
- Enchanted items
- Craftable items
- Permissions override with items (execute as OP)
- Make a flag that allows to cancel the event
- Configurable no permission message
- Allow stopping the normal behavior of items in a MyItems event
If you want a feature added, submit a ticket.
Note: If you have a question, read everything again, very carefully, to make sure your question isn't something that was answered here. If you still can't figure it out, post it in the comments.
Please add in Permissions override soon.
Thank you Author. It works nice on my 1.6.4 MCPC server.
Maybe you should change info of Game version in file page.
I really hope this plugin keep supporting 1.6.4.
Would you do "Permissions override with items" higher priority in your to-do-list?
I really hope I can make some custom item like the level up Reel. It would be really cool.
Anyway, thanks again for the plugin and sorry about my English.
@broluigi
Oh it's because they're trying to do the command "/pex promote <user>" but they don't have the permission to do that. In the config.yml, you should enable the console executor. That means when they use the item, the console will do "/pex promote <user>".
They can use the item, but after using it, it says "Do not have permissions"
The command for permissions that ranks them up isnt working
@broluigi
You need to give the permission myitems.use.<ItemName>
when a player uses this item, it says the player has no permissions for the command. i need normal players to use these! can you tell me how
I will be updating this plugin, but I'm very busy at the moment so it'll be some time before I get to it.
Left a suggestion in your tickets. Hope you respond and put it in- it's be so helpful for our server, you have no idea
@BaranCODE
My idea was the first you said: in anytime, the player can't do the command, but he can click with the custom item to do the command as an OP. My second idea is to add a given permission to a custom item when he's in inventory...
Nice plugin anyway, thanks
@tommygoesha
I do not understand what you're trying to say.
So can you make the custom items like droppable.. Say I make a variation of the diamond sword?
@Natfan
I may add that later. The update won't be any time soon though, because I am busy.
Me again! How would I make it so that a variable has to be met to perform another command. For instance if a diamond block is clicked, it gets removed (/replacenear) and if the clicked block was a diamond block the 20 gold gets given.
Does that make sense?
Nevermind, got it!
How would I add multiple commands to one item via the .txt file?
@IsaacBanna
Wait just to be clear, which of these do you want:
Or:
@Pixelmod
Yeah, I'm going to get to that when I have time.
@BaranCODE
hum no, not a permission to use the item, but permissions to add to the player holding in his inventory... i hope you understand my idea :)
A reload command would be appreciated.
I also suggest you to start supporting new item ID's. It will be codenames and not numbers in 1.8.
@BaranCODE
Greetings, Baran.
I am a plugin developer working on my own private server designed for PvP exclusive gameplay for me and my friends. I saw your plugin and realized that it's almost exactly what I'm looking for. However, there are a few modifications that I would need, and I believe that these modifications fall outside of the scope of MyItems alone (namely, a solution to integrate the features of MyItems with other custom plugins.)
Normally, I would ask for the features by submitting a ticket. However, the types of things I would request include other plugins that, at this time, do not yet exist. With that said, I wish to do the honourable thing and ask for permission to create a derivative work of MyItems to be used exclusively on the PvP server.
I would be willing to negotiate any terms you may have, considering my use of the source code.