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.
@IsaacBanna
Okay I got what you mean, I will add that.
And, there already are per-item permissions.
@BaranCODE
Thanks for your answer. That's exactly what i want :) . My wanted command isn't usable with the console (/backpack with an item: don't do anything in the console and i don't want to allow people use the /backpack but the defined item). It would be cool to have this feature :D
Could you add permissions per item, no?
Sorry for my bad english, i'm french :'(
@IsaacBanna
Okay, I think I get what you mean. That's in the upcoming features list.
You want it so that even if that player can't normally do /killall, if they have the item and have permission to use the item, they can execute /killall through that. Right?
As I said, I will be adding that. As a temporary fix, you could set your command executor to console from the config, if the command you want can be done through the console.
Can you please add an option per item to bypass group's permission for the command? e.g.: you made the item carrot named "Terminator", with the command "killall", but your group or yourself don't have the right permission. It's a shame :'(
@sebastiandiablo
You can use the CIT in mcpatcher: https://bitbucket.org/prupe/mcpatcher/wiki/Custom_Item_Textures
@sebastiandiablo
I do not think you can create custom textures for specific items created with MyItems. I believe the closest thing would be to change the texture of the item with that ID (so the item itself that doesn't execute commands, unless you set it to global of course, will also have a changed texture. Therefor, a normal texture pack).
@LSDx1967
Unless that plugin allows items with custom names and lores, I don't believe so.
Is there a way to give the new Items new textures which i made ? i tried it, but with no result.
could u write a little tutorial pls.
ty
I was wondering if this plugin would work with the recipe creator plugin
@Tritiom
I might add the cooldown option. And what do you mean, exactly, with the second thing?
Would be awesome to have an option to add a cooldown. Also, si there any way to make it so when you hold right-left click, you keep shooting? Nice work!
@RedBull53860
I am getting tired of constantly answering this question. You would know the answer if you actually read the page.
You use <user> in the command. The plugin will automatically replace that with the name of the player.
Got it now, it's okay I guess. But is there any way to make a command, that requires a name, be the name of the person holding the item. Automatically? Like how /fireball [NAME] obviously requires a name to work but if I were to input my own name and someone used the item, it would just summon a fireball from me. How would I make it summon a fireball from the person holding the item?
@jockey12321
Yes, I will add that.
A good event that i can think of would be one that activates when the item breaks. That way, if, for example, i have various 'special' swords and i only want to have one of each in the world at the same time, when it breaks it can send a message to me so i can spawn in a new one.
@ThaRam
Thanks :)
Although I've got to say, I probably should write a better tutorial (right now, there isn't really a tutorial at all). Yes, its not hard to figure it out with the information here, but apparently some people need a step-by-step tutorial to fully understand it.
@RedBull53860
This plugin is AMAZING. You don't really need a tutorial, most everything you need to know is here above. all the events are self explanatory. If you want to_add_spaces_just_do_this.
@LucasOe
Okay, I can add those.
@RedBull53860
For the color codes, you need to use the & sign. As far as I know, that's the most common sign used for color codes, by plugins. For example: &6
You're right, its not very easy to put spaces into the display names of the items. However, you can do that from the files of the items.
I don't think the events need any further explanation.
I agree that the page doesn't have a lot of information, nor a good tutorial. I am planning to edit and re-write this page some time, but I am too busy to do it right now. The fact that the information isn't very clear doesn't make the plugin terrible, though. Many people manage to figure it out, and the ones that don't ask their questions here, instead of immediately raging about it. In fact, some people did stuff with this plugin so creative, that I hadn't been able to think of them.
Hello,
Can you please make, this will have given you an Item when you join a Server?
And you can make a Event when a Chestplate or anything like that is broken.
@ThaRam
Okay, I might add something like that.