Wiki 9Minecraft Wiki 9Minecraft
Item Disabled Plugin Wiki › Guides › Lock a Weapon to Prevent PvP Abuse

Lock a Weapon to Prevent PvP Abuse

Identify the weapon

Find the Minecraft item ID of the weapon you want to restrict. Common combat items include swords, axes, and bows. You can check item IDs in-game or in your server's item registry.

Disable the weapon server-wide

Open your server console or chat as an operator and run:

`

/itemdisabled disable <item> -1

`

Replace <item> with the weapon's ID. The -1 duration locks it permanently until you manually re-enable it.

Disable for specific players

If you only want to restrict the weapon for certain players, use:

`

/itemdisabled disable <item> -1 <player_name>

`

This prevents that player from attacking mobs or other players with the locked weapon, while others retain access.

Restore access when needed

When you're ready to allow the weapon again, run:

`

/itemdisabled enable <item> <player_name>

`

Omit the player name to re-enable it server-wide. Players will receive a notification when they attempt to use a locked weapon.