Перейти к содержимому
Mineforgian

Don't Kill Friends!

Protect your tamed animals from damage, even when you're offline! Lightweight plugin with HEX color support and full configurability for Minecraft 1.16.5-1.21.11.

Загрузки
1K
Подписчики
13
Обновлён
12 июня 2026 г.
Лицензия
All-Rights-Reserved

Опубликован 18 июля 2024 г.

Исходный код

Title

Bukkit Spigot Paper Purpur Folia

DontKillFriends

Protect your tamed animals from damage, even when you're offline!

DontKillFriends is a lightweight Minecraft plugin that prevents other players from harming your beloved pets. Whether you're online or offline, your tamed animals stay safe from both player attacks and environmental damage.

Gallery Discord

What it does

  • Blocks player damage to tamed animals (wolves, cats, horses, parrots, and more)
  • Protects offline players' pets — griefers can't touch them while the owner is away
  • Shields pets from environmental damage: fire, lava, drowning, explosions, void, Warden sonic boom, and more
  • Stops hostile mobs from targeting or attacking tamed pets
  • Prevents tamed pets from fighting each other
  • Intercepts /kill commands that would destroy named tamed mobs
  • Notifies pet owners on login when someone tried to attack their animals

Features

  • Offline protection — pets stay safe when the owner is offline
  • Bypass permissiondontkillfriends.bypass for admins
  • 8 languages — English, Russian, Spanish, German, French, Portuguese, Chinese, Japanese
  • HEX colors — full &#RRGGBB color support in messages
  • Folia support — works on regionized servers out of the box
  • Configurable — toggle every damage type individually
  • Lightweight — no database, minimal overhead
  • bStats opt-out — disable metrics with bstats: false

Commands

  • /dontkillfriends version — show plugin version (dontkillfriends.version)
  • /dontkillfriends reload — reload config and language (dontkillfriends.reload)
  • /dkf — alias for /dontkillfriends

Permissions

  • dontkillfriends.version (op) — view plugin version
  • dontkillfriends.reload (op) — reload configuration
  • dontkillfriends.bypass (op) — bypass all pet protection

Compatibility

  • Minecraft: 1.16.5 – 1.21.11
  • Platforms: Bukkit, Spigot, Paper, Purpur, Folia
  • Java: 8+

Ченджлог

1.3Релиз26.1, 26.1.1, 26.1.2 · 12 июня 2026 г.

Changelog - DontKillFriends

Version 1.3 - 1000 Downloads!

Major Features

  • bStats Integration - Anonymous usage statistics with opt-out via bstats: false in config
  • Warden Sonic Boom Protection - Tamed pets are now protected from Warden sonic boom damage (immortal-from-sonic-boom)
  • Code Refactoring - Split monolithic main class into focused listeners, command handler, and utilities

Added

  • immortal-from-sonic-boom config option for Warden damage (Minecraft 1.19+)
  • bstats config option to disable metrics collection
  • Kill command console messages in language files

Improved

  • Memory Safety - Pending attack notifications are capped, expire after 7 days, and clear on plugin disable
  • Thread Safety - Notification storage uses ConcurrentHashMap and synchronized lists
  • Folia Schedulers - Proper runDelayed support for join notifications and update checks
  • Language Manager - Cached English fallback instead of disk reads on every message lookup
  • Config - English-only comments, removed ASCII art headers

Fixed

  • Sonic Boom - Warden sonic boom (SONIC_BOOM damage cause) was not blocked before this release
  • Notification Leak - Attack attempts no longer accumulate indefinitely for players who never rejoin

Technical

  • Extracted PetProtectionListener, KillCommandListener, PlayerJoinListener
  • Extracted PluginSettings, ColorUtil, MessageService, PetOwnerInfo
  • bStats 3.2.1 with package relocation via maven-shade-plugin

Configuration

# New options in v1.3
immortal-from-sonic-boom: true
bstats: true

Compatibility

  • Minecraft: 1.16.5 - 1.21.11
  • Server Software: Bukkit, Spigot, Paper, Purpur, Folia
  • Java: 8+
1.2.1Релиз1.21.9, 1.21.10, 1.21.11 · 29 декабря 2025 г.

Changelog - DontKillFriends v1.2.1

Version 1.2.1 - Bug Fix

Fixed

  • Folia Notification System - Fixed Adventure API reflection errors on Folia 1.21.8+ by using BungeeCord Chat API fallback
  • Notification Delivery - Notifications now work correctly on Folia servers without reflection errors

Technical

  • Improved Adventure API component creation with interface-based reflection
  • Added Folia platform detection to use BungeeCord Chat API instead of Adventure API on Folia
1.2Релиз1.21.9, 1.21.10, 1.21.11 · 29 декабря 2025 г.

Changelog - DontKillFriends v1.2

Version 1.2 - FOLIA SUPPORT!

Major Features

  • Folia Support - Full compatibility with Folia! Single JAR works on Bukkit/Spigot/Paper and Folia
  • Attack Notification System - Players receive notifications when someone attempts to attack their tamed pets (even when offline)
  • Multi-Language Support - 8 languages included (English, Russian, Spanish, German, French, Portuguese, Chinese, Japanese)
  • Modrinth Update Checker - Automatic version checking with console notifications

Added

  • Pet Protection Options:

    • prevent-tamed-pets-attack - Prevent tamed pets from attacking each other
    • prevent-mobs-attack-pets - Prevent hostile mobs from attacking tamed pets
    • immortal-from-cramming - Protect from entity cramming damage
    • immortal-from-void - Protect from void damage and /kill command
  • Localization System - Language files in messages/ folder with configurable language selection

  • Rich Notifications - Hoverable tooltips showing attacked pets with grouped attempts and count display

  • Command Interception - Intercepts /kill command for both players and console

Improved

  • Package Migration - Renamed from ru.gubin to fun.gubinmc
  • Bypass Permission - Admins with dontkillfriends.bypass can now attack offline pets
  • Message System - Empty messages are ignored, online/offline status always shown
  • Color Support - Fixed HEX and legacy color codes on all platforms (Spigot 1.16.5+)
  • Spigot Compatibility - Enhanced support with proper fallback for BungeeCord Chat API

Fixed

  • Folia Loading - Plugin now loads correctly on Folia servers
  • Folia Schedulers - Fixed scheduler errors and method signatures
  • Color Display - Fixed HEX colors in notifications and legacy codes on Spigot
  • Offline Pet Protection - Fixed bypass check order for admin attacks

Technical

  • Platform detection using reflection
  • Reflection-based Folia scheduler calls
  • Asynchronous update checking
  • Component-based messages with Adventure API fallback

Configuration

# New options in v1.2
prevent-tamed-pets-attack: true
prevent-mobs-attack-pets: true
immortal-from-cramming: true
immortal-from-void: true
language: "en_US.yml"
check-for-updates: true

Compatibility

  • Minecraft: 1.16.5 - 1.21.11
  • Server Software: Bukkit, Spigot, Paper, Purpur, Folia
  • Java: 8+

Migration Notes

  • Old message strings moved to messages/ folder
  • Set language: "en_US.yml" in config.yml to choose language
  • Folia support is automatic - no configuration needed
1.1.3Релиз1.21.6, 1.21.7, 1.21.8 · 3 августа 2025 г.

Changelog - DontKillFriends v1.1.3

Version 1.1.3 - Campfire!!

Added

  • Campfire Protection: Added protection from campfire damage (both regular and soul campfires)
  • New configuration option immortal-from-campfire (default: true)
  • Configuration value caching for improved performance

Improved

  • Enhanced performance by caching frequently accessed configuration values
  • Better code organization and readability
  • More efficient event handling
  • Added default values to all configuration getters for better reliability

Fixed

  • Fixed pets not being protected from campfire damage
  • Improved campfire detection to work with both regular and soul campfires

Technical Changes

  • Added configuration value caching system
  • Improved method structure for better maintainability
  • Enhanced debug logging consistency
  • Better error handling for missing configuration values
1.1.2Релиз1.21.6, 1.21.7, 1.21.8 · 23 июля 2025 г.

Changelog - DontKillFriends v1.1.2

Version 1.1.2 - Configuration Improvements

New Features:

  • Configurable Offline Owner Message - Added offline-owner-suffix setting in config.yml for customizable "(Owner offline)" message
  • Improved Version Command - Updated author name to gubinmc and added clickable Modrinth profile link
  • Better Configuration Comments - Added helpful comment showing how to disable suffix with empty string ""

Configuration Changes:

# New configurable setting
offline-owner-suffix: " &#FFD93D(Owner offline)" # Выключить - "" | Disable - ""

Customization Examples:

# Custom Russian message
offline-owner-suffix: " &#FFA500(Владелец не в сети)"

# Disable suffix completely  
offline-owner-suffix: ""

# More detailed English message
offline-owner-suffix: " &#FF6B6B(Owner offline - pet protected)"

# Short and simple
offline-owner-suffix: " &#FFD93D(Offline)"

Command Updates:

Technical Changes:

  • Removed hardcoded "(Owner offline)" message from Java code
  • All offline owner messages now use configurable setting
  • Improved code maintainability and customization

Benefits:

  • Server admins can fully customize offline owner messages
  • Support for HEX colors in offline messages
  • Can disable offline suffix completely
  • Better branding with updated author info
  • Easy access to developer profile

Compatibility:

  • Minecraft: 1.16.5 - 1.21.8
  • Server Software: Bukkit, Spigot, Paper, Purpur
  • Java: 8+
1.1.1Релиз1.21.6, 1.21.7, 1.21.8 · 23 июля 2025 г.

Changelog - DontKillFriends v1.1.1

Version 1.1.1 - FINAL RELEASE

New Features:

  • HEX Color Support - Added support for HEX colors in messages using &#RRGGBB format
  • Debug Logs Control - Added debug-logs: false setting in config.yml for clean console output
  • Improved Security - /dkf version command now requires dontkillfriends.version permission (OP only)

Major Bug Fixes:

  • FIXED: Offline Pet Protection - Resolved critical issue where tamed animals became vulnerable when owner logged off
  • FIXED: Owner Detection - Now properly handles both Player and OfflinePlayer owner types
  • FIXED: Environmental Damage - Added complete protection from fire, drowning, explosions, etc. for offline pets

Removed Features:

  • Author Command Removed - Completely removed /dkf author command for cleaner interface
  • Unnecessary Permissions - Removed unused dontkillfriends.use permission

Visual Improvements:

  • Colorful Messages - Version command shows beautiful HEX colored output
  • Updated Config - Removed old version strings and added HEX color examples
  • Professional Appearance - Clean, modern command responses

Protection Features:

  • Protects tamed animals from player attacks
  • Shields pets from environmental damage (fire, drowning, explosions, etc.)
  • Works even when pet owner is offline
  • Configurable damage type protection
  • Bypass permission for administrators

Commands & Permissions:

  • /dkf version - Show plugin version (requires dontkillfriends.version)
  • /dkf reload - Reload configuration (requires dontkillfriends.reload)
  • dontkillfriends.bypass - Bypass pet protection (OP only)
1.1Релиз1.21.6, 1.21.7, 1.21.8 · 22 июля 2025 г.

DontKillFriends - Changelog

Version 1.1 - Fixes and Improvements

Major Fixes:

  1. MAIN FIX: Offline Pets Protection

    • Fixed a critical bug where tamed mobs became killable after the owner logged off the server
    • Added owner.isOnline() check to protect offline players' pets
    • Added new config setting protect-offline-pets in config.yml
  2. Fixes in pom.xml:

    • Corrected incorrect tag <n> to <name>
    • Updated version from 1.0 to 1.1
  3. Grammatical fixes in config.yml:

    • "перезагрузки" changed to "перезагрузке" ("reload" form)
    • "plugin restart" changed to "plugin reload"
    • Improved comments and descriptions

Code Improvements:

  1. Extended Damage Protection:

    • Added protection against BLOCK_EXPLOSION
    • Added protection against HOT_FLOOR (magma blocks)
    • Added protection against POISON and WITHER
  2. Improved Command Handling:

    • Added support for commands from console
    • Improved handling of unknown commands
    • Added event priority EventPriority.HIGH
  3. Import Optimization:

    • Removed unused imports
    • Added import for EventPriority

Compatibility:

  • Full compatibility with Minecraft 1.16 - 1.21.8
  • Improved plugin stability
  • Optimized performance

Configuration:

New setting in config.yml:

protect-offline-pets: true # Protect pets of offline players

Комментарии

Загружаем…