#Disabling Attacking

1 messages · Page 1 of 1 (latest)

faint dew
#

I'd like to be able to prevent the player from attacking mobs without having weapons overwrite it. If I change the player's base attributes, holding an item with an attack attribute allows the player to attack again. Is there a way around this, or a different way to prevent a player from hitting entities?

restive ledgeBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1746472049:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

lean vine
#

instead of changing the players base attributes, give them an attribute modifier with a value of -1 and an operation of add_multiplied_total

faint dew
#

Oh you can add attribute modifiers to the player? I checked the wiki and it only said that was possible with items

twilit wedge
#

Items are one way to apply attribute modifiers to the player, but you can also just use the /attribute command

faint dew
#

Okay after playing around with the command I see what you're talking about, thanks!