knokko / custom-items-gradle

Knokko's Custom Items: Add custom items to your server, completely free of charge
MIT License
15 stars 3 forks source link

Giving effect when player right-clicks on an certain item #147

Closed RomaGreat55 closed 2 years ago

RomaGreat55 commented 2 years ago

Hello!

I want to give player certain effect for a certain time when he right-clicks on an certain item (for example, diamond sword). How can this be done?

The effect should remain even if it does not hold the item.

knokko commented 2 years ago

I don't think this can be done at the moment. (Unless you use third-party scripting.)

knokko commented 2 years ago

@RomaGreat55 I just reread this issue and noticed that you are talking about 'diamond sword' (a vanilla minecraft item) rather than a custom item. Adding effects to vanilla items is out of scope for this plug-in, but adding effects to custom items is expected to be possible in the next major version.

knokko commented 2 years ago

This issue will be solved implicitly (at least for custom items) when I finish #41 .