Let's say that when a player right or left clicks a feather he will get a speed boost.
Is there a way to do this?
You can only track items that have a default function via clicking (though many limits apply, such as not being able to detect blocking with a sword). Since feathers don't, you cannot track this.
You can only track items that have a default function via clicking (though many limits apply, such as not being able to detect blocking with a sword). Since feathers don't, you cannot track this.
So there is no way to do this no scoreboard objective or anything
So there is no way to do this no scoreboard objective or anything
Not directly. With Chris' method, you would only be tracking whether or not they're holding it, not necessarily when they want to use it. What you could do is create some smoke and mirrors by mixing that with another function, such as crouching:
5. And finally, this will provide Speed 5 to the appropriate players during their "COOLDOWN" duration.
/effect @a[score_COOLDOWN_min=1] 1 1 4
Summary:
When the player is holding the specified feather and crouches at the same time, they will be provided with a Speed 5 effect. They only have to crouch a single time to initiate the effect. It will be provided for 5 seconds, and they can crouch at a different time to regain the effect. If you want there to be a cooldown period between uses, you would set command block 5 to only apply the effect to those with a higher minimum score. For example:
/effect @a[score_COOLDOWN_min=40] 1 1 4
The above will apply the effect for 3 seconds, and then the player has to wait 2 more seconds before being able to use it. You can adjust the cooldown to how you like, of course.
Not directly. With Chris' method, you would only be tracking whether or not they're holding it, not necessarily when they want to use it. What you could do is create some smoke and mirrors by mixing that with another function, such as crouching:
5. And finally, this will provide Speed 5 to the appropriate players during their "COOLDOWN" duration.
/effect @a[score_COOLDOWN_min=1] 1 1 4
Summary:
When the player is holding the specified feather and crouches at the same time, they will be provided with a Speed 5 effect. They only have to crouch a single time to initiate the effect. It will be provided for 5 seconds, and they can crouch at a different time to regain the effect. If you want there to be a cooldown period between uses, you would set command block 5 to only apply the effect to those with a higher minimum score. For example:
/effect @a[score_COOLDOWN_min=40] 1 1 4
The above will apply the effect for 3 seconds, and then the player has to wait 2 more seconds before being able to use it. You can adjust the cooldown to how you like, of course.
OK now this is great but I got one more request.I want the player to have a book named Fire Ball.That book can summon a fireball for 10 xp level.The spell is not supposed to have a cooldown.Could you mabye do that, please.
Is there a way to do this?
You can only track items that have a default function via clicking (though many limits apply, such as not being able to detect blocking with a sword). Since feathers don't, you cannot track this.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
So there is no way to do this no scoreboard objective or anything
Not directly. With Chris' method, you would only be tracking whether or not they're holding it, not necessarily when they want to use it. What you could do is create some smoke and mirrors by mixing that with another function, such as crouching:
Assuming you'd want a cooldown, though you can adjust this how you like:
The item in question doesn't necessarily have to be in a specific slot. You can have it apply an attribute modifier and test for that:
Mechanism:
1. The clock, running at 20t/s.
2. This will set players "COOLDOWN" to 100 (5 seconds), so long as they have crouched while they are holding the feather.
3. This will set the players' "CROUCH" score to 0 so long as it is 1 or higher, so that they aren't constantly matching after having crouched once.
4. This is what reduces the "COOLDOWN" score every tick.
5. And finally, this will provide Speed 5 to the appropriate players during their "COOLDOWN" duration.
Summary:
When the player is holding the specified feather and crouches at the same time, they will be provided with a Speed 5 effect. They only have to crouch a single time to initiate the effect. It will be provided for 5 seconds, and they can crouch at a different time to regain the effect. If you want there to be a cooldown period between uses, you would set command block 5 to only apply the effect to those with a higher minimum score. For example:
The above will apply the effect for 3 seconds, and then the player has to wait 2 more seconds before being able to use it. You can adjust the cooldown to how you like, of course.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
OK now this is great but I got one more request.I want the player to have a book named Fire Ball.That book can summon a fireball for 10 xp level.The spell is not supposed to have a cooldown.Could you mabye do that, please.