Skip to content

BattleLock Plugin cho Minecraft 26.3

Plugin Paper đơn giản ngăn chặn combat logging và sử dụng lệnh trong PvP.

lượt xem
23 lượt xem
Đã cập nhật
Đã cập nhật 19.09.2026

BattleLock Plugin

BattleLock is a Minecraft Paper 26.3 plugin that prevents command use and deters combat logging during PvP. Although it was custom built for minecraftoffline.net, any server can use it.

The plugin works by "tagging" players engaged in pvp combat. Tagged players cannot use a configurable list of commands. And if a tagged player logs out during combat, an NPC is created in their place that can be killed by other players. If the NPC is killed, it drops all of the combat logger's items as a means of punishment.

Features

  • Deters combat logging by creating killable NPCs when players log out during PvP.
  • Automatically tags players when they engage in PvP combat.
  • Blocks command usage during combat (except for configurable whitelist).
  • Combat tags automatically expire after a configurable duration.
  • NPCs hold the player's inventory and drop items if killed.
  • Clear player messaging with combat timers.
  • Works with direct attacks and projectiles (arrows, etc.).
  • Combat loggers will lose their items no matter when they return (including after server restarts).

Installation

  • Download the latest release here.
  • Place the .jar file in your Minecraft server's plugins folder.
  • Restart your server.

Configuration

In config.yml, you can configure:

Combat tag duration in seconds

How long players remain in combat after receiving/dealing damage

combat-tag-duration: 15

Combat log NPC despawn time in seconds

How long a combat log NPC remains before disappearing

combat-log-despawn-time: 30

List of commands allowed during combat

Players can use these commands even while in combat

allowed-commands:

  • "tell"
  • "msg"
  • "r"
  • "w"
  • "me"

How It Works

  • When a player engages in PvP combat (attacking or being attacked by another player), both players are "tagged".
  • Tagged players cannot use most commands (except those in the allowed list).
  • If a tagged player logs out, a villager NPC is spawned in their place with:
  • The player's name
  • The player's health (capped at 20)
  • The player's inventory (stored internally)
  • Other players can kill this NPC, causing it to drop the combat logger's items.
  • If the NPC survives until the player returns, they get their inventory back.
  • If the NPC is killed, the player will lose all their items when they return.

Some Notes

  • Only player-vs-player combat triggers tagging (mobs attacking players doesn't count).
  • If a player dies during combat, they are automatically untagged.
  • The NPC will automatically despawn after the configured time if no one kills it.
  • Combat loggers are notified what happened to their NPC when they return.
  • Punishment records never expire and that includes if a player waits months to return or the server restarts multiple times.

For Plugin Developers

BattleLock marks combat log NPCs using PersistentDataContainer for easy detection by other plugins:

  • Namespace: battlelock
  • Key: combat_log_player_id
  • Type: PersistentDataType.STRING (contains the player's UUID as a string)

Example Usage

import org.bukkit.NamespacedKey; import org.bukkit.entity.Entity; import org.bukkit.persistence.PersistentDataType;

// Check if an entity is a BattleLock combat log NPC NamespacedKey battleLockKey = new NamespacedKey("battlelock", "combat_log_player_id"); if (entity.getPersistentDataContainer().has(battleLockKey, PersistentDataType.STRING)) { // This is a BattleLock combat log NPC String playerUUID = entity.getPersistentDataContainer().get(battleLockKey, PersistentDataType.STRING); // Use the UUID as needed }

Cách cài đặt BattleLock

  1. A server on Paper

    The plugin runs on the server core for Minecraft 26.2–26.3; players do not need to install anything.

  2. File goes into the plugins folder

    Download the file BattleLock-1.9.jar (40 KB) and put it into the server’s plugins folder.

  3. Restart the server

    On startup the plugin creates its own settings folder in plugins.

  4. Use the “To server” button

    On Millida Hosting, the button at the top of the page uploads the file to your server and restarts it for you.

Phiên bản

Kèm phụ thuộc

MinecraftLoaderTệpNgàyHành động
26.3Paper26.339.8 KB
26.2Paper26.239.8 KB—

Câu hỏi thường gặp

Which Minecraft versions does BattleLock work on?

There are files for 26.3, 26.2. The newest is 26.3.

Where can I download BattleLock safely?

On this page: the file BattleLock-1.9.jar (40 KB) is stored on Millida’s server, with no link shorteners. SHA-1 checksum: a975394412bfc00fd0e249d277f737edcc01a752.

Đánh giá

Hãy là người đầu tiên đánh giá BattleLock

Bình luận 0

Đăng nhập để bình luậnĐăng nhập

Plugin tương tự

Tất cả plugin

Thêm về điều này

Tác giả: Jelly-PuddingGiấy phép: MIT

Bạn là tác giả? Liên hệ với chúng tôi — chúng tôi sẽ gỡ xuống trong vòng 48 giờ.