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.
So. Does this work ok on Spigot 1.8.3?
@MikeGold
Change the command executor to console from the config, and for the command, use "/fly <player>" or "/fly <player> on"; if you're using Essentials, of course.
Is there any chance that at some point this plugin will be updated?
I've added fly to golden apple, but if a normal player eat it, the command cannot be executed because he's not an admin :(.
Commands that I add to items are not working, i.e tppos or warp
Do non-global items work in essentials kits and quests plugin? ( I havent had time to go online to test yet)
Can i add multiple items to a command? Like you right click once and it uses the command /mode 1, right click again would use /mode 2, again for mode 3, 4, 5 and then back to mode 1 after 5 (I don't actually have a /mode command :P just using it to show what I mean)
@GuitarZachery
Set the executor to console, from the config file.
It doesn't work because:
- The player does have permission to use the MyItem item
- However, when the player uses the item, the player tries to run the PEX command you wrote below, but he doesn't have permission to do that. Therefore, if you change the executor to console, it should be solved.
but in the console the command would change to "/execute <player> ~ ~ ~ /command"
because the most commands needs to be used by the player.
Hey there. I love this Plugin !! But theres 1 Problem. I want to make a Paper (339) so when the User right clicks it, it disappears and he will get 48 hours /fly command. Theres just 1 Problem look:
"02:36:20 CONSOLE: WARN]: [PermissionsEx] User GuitarZ4c tried to access chat command "pex user GuitarZ4c timed add essentials.fly 172800", but doesn't have permission to do this."
But they have permission: myitems.use.flygutschein
Why it won't function?
Oh! and i forgot this, can you add a time when an another commands will execute? exemple: i use an item ex:mana potion and it execute a command of regen mana , and 20 second later this command or an another command will execute too, this things will add a really good stuff to this plugin ;)
It's a really good plugins! But, can you add a cooldown for the commands execute by a item? for exemple in a flag name [-c] [time] (sorry for my poor english, im french) The flag will be really usefull ! And, i dont see what but can you add a perm "myitems.use.*" too, to use all Myitem?:3
so im useing the latest version being 1.7 and it seems like no one is able to receive perm mission for use of items. ive tried myitems.use.<item> - myitems.use.* - myitems.* and even *
im useing Groupmanager
ive even set the player to group Owner and they were still unable to use the item. the only way i was able to get someone to be able to use the item was by making them op.
@kwakmantim
I might add that in a future update.
@raton023
No, to do that, you would need to use a texture pack.
@LazoDaSerb
This should be working with 1.7.10, so there's no reason to update it to that.
Please update to 1.7.10
can you put custom icon to the item just like a camara or a gun and a folder to put gun.png or some like that
Can u add the event Interact? so it runs a command when Clicked (white mouse pointer in a Chest)
@antonysze
@Crazyfruit82
@TheZeusCube
Okay. I've been busy, but demand for that seems to be high so I'll try to do it sooner.
Please add in the permissions override soon. I will start using this plugin immediately when you do. Also please make it so I can make console commands and player commands on the same item.