Combat Tag

November 04, 2022  Game Mechanic v1.0.0

Created by: PvPqnda

For Minecraft 1.17+

Datapack Features:

  • Adds a restriction to players in combat disallowing them from disconnecting from the server attempting to defy risky situations that they’re already in.

  • Players who take damage are immediately “combat tagged”, which applies a custom set timer (default 10 seconds) that is displayed to them, which indicates how long they must wait before being able to safely disconnect from the server.

  • Players who disconnect from the server while combat tagged are immediately killed upon logout, dropping their items at their last location (unless keepInventory is set to true), and are prompted with the death screen like normal (unless doImmediateRespawn is set to true) upon logging back in.

  • There are 5 customizable settings and 2 different server statistics for admins to access using the command: “/function combattag:admin_info”.
    The following are the 5 different settings:

  • Tag Duration: How long players must wait for their combat tag to expire.
    (0-60 seconds) (0 seconds prevents combat tagging)

  • Damage Source: Any / Player
    Any: Players will be combat tagged upon taking any kind of damage.
    Player: Players will only be combat tagged upon taking damage from another player within 50 blocks.

  • Tag Status: Hotbar / Crosshair / Chat
    Where the combat tag status timer is displayed to combat tagged players.

  • Tag Prefix: True / False
    When set to True, tag status messages will be prefixed with “Combat Tag”.

  • Info Trigger: True / False
    When set to True, anyone will be able to type “/trigger CombatTag” to see how many combat tags they’ve received/inflicted, and what settings are set to.

Survival & Multiplayer friendly



To install a datapack, drop the datapack file inside the "datapacks" folder inside your world folder, then type "/reload" in-game.

Media


Comments