Context (skip if you want) I tried to find a plugin out there that would prevent certain mobs colliding (AKA bumping, nudging, moving) other mobs. I.E. I wanted to have stationary villagers, I found plugins to anchor them but they were still nudgeable. So I made a plugin to do what I wanted.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- What does this plugin do?
Allows you to group mobs under 4 different mechanisms:
NEVER - Does NOT collide with anyone
ALWAYS - Always collides with everyone (AKA: Vanilla)
PUSH_OWN_TEAM - Collide only with mobs in the same group
PUSH_OTHER_TEAMS - Collide with everyone EXCEPT the same group
Allows you to define each group, infinitely as much as you want
Allows you to set a time-definition on how often the plugin should check mobs to re-link. I.E. if you just spawned a mob, the plugin will group it and apply the rule (Standard is every 10 seconds)
Only 1 permission and command: /reload, solely managed via config.yml
Note:
Full limitations of this plugin is untested; behaviours of having mobs in multiple groups is unknown. Try to keep it simple as much as you can.
Intended use is "small", not massively complex situations. I designed this for villagers to stop the community moving them, please do not downvote if you made the config super complex the plugin couldn't comprehend.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The Configuration is easy right? Mostly..
Grouping prefix - leave alone, untested changing this
Code (Text):
# Prefix added to all scoreboard team names created by this plugin.
# Change this if another plugin uses the same prefix.
team-prefix: "xc_"
Time in seconds for the plugin to detect mobs to re-apply the rule
Code (Text):
# How often (in seconds) to re-assert team membership and collision rules
# for loaded entities. This repairs changes made by other plugins/commands.
# Set to 0 to disable the repair task entirely.
repair-interval-seconds: 10
Any ignored worlds you wish to add
Code (Text):
# Worlds the plugin should completely ignore. No changes are made in these worlds.
# Example: ["lobby", "minigames"]
ignored-worlds: []
When to apply the rule
Code (Text):
# When should rules be auto-applied?
apply-triggers:
# When a player joins the server.
on-player-join: true
# When a new entity spawns (natural, spawner, breeding, commands, etc).
on-entity-spawn: true
# When a chunk becomes loaded (entities inside get processed).
on-chunk-load: true
Default AND example groupings, you can make more with unique labels
Code (Text):
# -------------------------------
# Groups (scoreboard "teams")
# -------------------------------
# Define as many groups as you need. Each group has:
# collision: one of [ALWAYS, NEVER, PUSH_OWN_TEAM, PUSH_OTHER_TEAMS]
# include: list of entity types that belong to this group
#
# IMPORTANT:
# - "PLAYER" refers to real players.
# - Keep each entity type in exactly one group for predictable results.
teams:
# Example: players and villagers never nudge anything and aren’t nudged by anything.
noclip:
# NEVER = members DO NOT collide with anyone (no push / no being pushed).
collision: NEVER
include:
- PLAYER
- VILLAGER
# Example: hostiles behave like vanilla (full collision with everyone).
hostiles:
# ALWAYS = members collide with everyone (vanilla behavior).
collision: ALWAYS
include:
- ZOMBIE
- SKELETON
- CREEPER
- SPIDER
- ENDERMAN
Full config as-is:
Code (Text):
# ===============================
# XantamCollision – config.yml
# ===============================
# Purpose: Decide which entities can push / be pushed (collide).
# Works by placing entities into scoreboard "teams" with a collision rule.
#
# What “collision” means here (plain English):
# - Collision = nudging and being nudged by hitboxes (body blocking).
# - Rules are per-group (team). Every member of a group follows that rule.
# - The four rules:
# ALWAYS -> Collide with EVERYONE (vanilla behavior).
# NEVER -> Collide with NO ONE (no push / no being pushed).
# PUSH_OWN_TEAM -> Collide ONLY with your own group.
# PUSH_OTHER_TEAMS -> Collide with everyone EXCEPT your own group.
#
# Tips:
# - Each entity type should appear in EXACTLY ONE group.
# - If a type appears in multiple groups, the last one processed on reload wins.
# - If a type appears in NONE, XantamCollision leaves it alone (vanilla behavior).
# - Type names are Bukkit enum names (e.g., PLAYER, VILLAGER, ZOMBIE, IRON_GOLEM).
# Prefix added to all scoreboard team names created by this plugin.
# Change this if another plugin uses the same prefix.
team-prefix: "xc_"
# How often (in seconds) to re-assert team membership and collision rules
# for loaded entities. This repairs changes made by other plugins/commands.
# Set to 0 to disable the repair task entirely.
repair-interval-seconds: 10
# Worlds the plugin should completely ignore. No changes are made in these worlds.
# Example: ["lobby", "minigames"]
ignored-worlds: []
# When should rules be auto-applied?
apply-triggers:
# When a player joins the server.
on-player-join: true
# When a new entity spawns (natural, spawner, breeding, commands, etc).
on-entity-spawn: true
# When a chunk becomes loaded (entities inside get processed).
on-chunk-load: true
# -------------------------------
# Groups (scoreboard "teams")
# -------------------------------
# Define as many groups as you need. Each group has:
# collision: one of [ALWAYS, NEVER, PUSH_OWN_TEAM, PUSH_OTHER_TEAMS]
# include: list of entity types that belong to this group
#
# IMPORTANT:
# - "PLAYER" refers to real players.
# - Keep each entity type in exactly one group for predictable results.
teams:
# Example: players and villagers never nudge anything and aren’t nudged by anything.
noclip:
# NEVER = members DO NOT collide with anyone (no push / no being pushed).
collision: NEVER
include:
- PLAYER
- VILLAGER
# Example: hostiles behave like vanilla (full collision with everyone).
hostiles:
# ALWAYS = members collide with everyone (vanilla behavior).
collision: ALWAYS
include:
- ZOMBIE
- SKELETON
- CREEPER
- SPIDER
- ENDERMAN
# Example (commented): members collide only with their own group.
# squads:
# # PUSH_OWN_TEAM = collide only with same-group members.
# collision: PUSH_OWN_TEAM
# include:
# - IRON_GOLEM
# - SNOW_GOLEM
# Example (commented): members collide with others, but NOT with teammates.
# no-friend-bump:
# # PUSH_OTHER_TEAMS = collide with everyone EXCEPT same-group members.
# collision: PUSH_OTHER_TEAMS
# include:
# - WARDEN
# - WITHER
# - ENDER_DRAGON
# FYI:
# - Paper has a global switch "enable-player-collisions". If disabled, players won’t
# collide regardless of groups. XantamCollision will warn you on startup/reload.
# - After /xcr, all loaded players and nearby entities are re-processed immediately.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Permission and Command As already mentioned, there is only 1 of each meant for the sysops. It's not given by default except to OP.
Permission: xantamcollision.reload
Command: /xantamcollision:xcr