Description
Let every player choose how hostile mobs treat them—without changing the experience for everyone else on the server.
Selective Peaceful Mobs is a configurable NeoForge mod for Minecraft 1.21.1. Players with peaceful mobs enabled are ignored by hostile mobs until they attack. Other players can leave the feature off and continue playing with normal vanilla hostility at the same time.
Features
- Per-player peaceful mob behavior.
- Peaceful and normal-hostility players can play together on the same server.
- Hostile mobs temporarily retaliate when a peaceful player attacks them.
- Direct attacks and player-fired projectiles trigger retaliation.
- Optional same-type group aggro within a configurable radius.
- Player choices persist across dimensions, reconnects, and server restarts.
- Players can manage their own setting; operators can manage other players.
- Configurable server default for players who have not chosen a setting.
- Configurable always-hostile mob list.
How it works
| Player setting | Result |
|---|---|
| Peaceful ON | Hostile mobs ignore the player unless that player provokes them. |
| Peaceful OFF | Hostile mobs behave normally toward the player. |
| No saved choice | The server's configured default is used. |
When a protected player attacks a hostile mob, that mob can target the player for the configured provocation time. If group aggro is enabled, nearby mobs of the same type can retaliate too. Once provocation expires, the mobs return to ignoring that player.
The Ender Dragon, Warden, and Wither are always hostile by default. Server owners can change this list.
Player commands
/peacefulmobs on
/peacefulmobs off
/peacefulmobs status
/peacefulmobs reset
onenables peaceful mob behavior for you.offrestores normal mob hostility for you.statusshows your effective setting and whether it comes from your choice or the server default.resetremoves your saved choice and returns you to the server default.
Operator commands
These commands require vanilla permission level 2 or higher:
/peacefulmobs set <player> <true|false>
/peacefulmobs check <player>
/peacefulmobs reset <player>
Configuration
The generated configuration file is:
config/selective-peaceful-mobs-server.toml
Server owners can configure:
- Whether peaceful behavior is enabled by default.
- Whether individual player choices are enabled and saved.
- Provocation duration, from 1 to 3,600 seconds.
- Same-type group aggro.
- Group aggro radius, from 1 to 128 blocks.
- Whether creative and spectator players are always ignored.
- The list of mobs that remain hostile to protected players.
Default values:
[general]
defaultPeaceful = true
rememberPlayerChoice = true
provokedTimeSeconds = 30
groupAggro = true
groupAggroRadius = 16
ignoreCreativeAndSpectator = true
[alwayshostilemobs]
mobs = ["minecraft:ender_dragon", "minecraft:warden", "minecraft:wither"]
Frequently asked questions
Does this change the world's difficulty or stop hostile mobs from spawning?
No. It changes which players hostile mobs are allowed to target; it does not change the difficulty or spawning rules.
Can peaceful and non-peaceful players play together?
Yes. The setting is evaluated per player, so a mob can ignore one player and target another.
Can peaceful players still fight mobs?
Yes. Attacking a hostile mob temporarily provokes it, preserving risk and retaliation.
Can operators force a setting for another player?
Yes. Operators can set, inspect, or reset another player's choice with the admin commands above.
Does it work with modded mobs?
It should work automatically with most modded mobs that use Minecraft's normal hostile classifications and targeting systems. Mobs with fully custom attack logic may require compatibility work.


