Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

OPmasterLEO/MasterCombat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MasterCombat

โš ๏ธ PROJECT ABANDONED โš ๏ธ

This project is no longer maintained or supported.

No further updates, bug fixes, or support will be provided.

Downloads License Stars Forks

JitPack JitCI


๐ŸŽฎ About

MasterCombat is a modern Minecraft combat plugin inspired by DonutSMP and made for MasterSMP (mastersmp.net), developed by OPmasterLEO.
It features advanced combat tagging, PvP protection for new players, action bar timers, WorldGuard region support, and more.

โš”๏ธ Core Features

Feature Description
๐Ÿท๏ธ Combat Tagging Smart tagging system based on real damage, not just hits
๐Ÿ›ก๏ธ PvP Protection Configurable newbie protection system
โฑ๏ธ Action Bar Timer Visual combat duration display
๐ŸŒ WorldGuard Support Respects PvP-denied regions
โšก Folia Support Full async scheduling compatibility
๐Ÿ’ฅ Advanced Damage Linking Accurate attacker tracking for:
โ€ข End Crystal
โ€ข TNT
โ€ข Respawn Anchor
โ€ข Bed
โ€ข Pet
โ€ข Projectile
โ€ข Fishing Rod
โœจ Glowing Indicator Visual effect for tagged players
๐Ÿšซ Command Blocking Customizable command restrictions
๐Ÿ”„ Update System Automatic updates with download support

Any issues or suggestions should be reported in the Issues tab.
You are free to DM me on Discord (opmasterleo)!

๐Ÿ“ฅ Installation

๐Ÿš€ Quick Start Guide

  1. ๐Ÿ“ฆ Download latest jar from GitHub Releases
  2. ๐Ÿ“ Place MasterCombat-v<version>.jar in your server's plugins folder
  3. ๐Ÿ”„ Restart your server โš ๏ธ Do not use /reload

๐Ÿ”„ Updating

Step Action
1๏ธโƒฃ Run /combat update to check for updates
2๏ธโƒฃ If available, run command again to download
3๏ธโƒฃ Restart server to apply update
4๏ธโƒฃ (Optional) Delete old config.yml for defaults

๐Ÿ’ก Updates can be checked from both in-game and console

โš™๏ธ Configuration

๐Ÿ“ Location: plugins/MasterCombat/config.yml

๐Ÿ”ง Customizable Features:
โ”œโ”€โ”€ โฑ๏ธ Combat duration
โ”œโ”€โ”€ ๐Ÿ›ก๏ธ Protection time
โ”œโ”€โ”€ ๐Ÿšซ Blocked commands
โ”œโ”€โ”€ โœจ Glowing effects
โ””โ”€โ”€ ๐Ÿ“ Messages (PlaceholderAPI support)

๐ŸŽฎ Commands

Command Description Permission
/combat reload ๐Ÿ”„ Reload configuration combat.admin
/combat toggle ๐Ÿ”€ Toggle combat tagging combat.admin
/combat visibility ๐Ÿ‘๏ธ Toggle combat UI visibility none
/combat update ๐Ÿ“ฅ Check/download updates combat.admin
/combat api ๐Ÿ“Š View API status combat.admin
/combat protection ๐Ÿ›ก๏ธ Check protection time combat.protection
/removeprotect ๐Ÿšซ Disable newbie protection combat.protection

๐Ÿ’ก Command names are configurable in settings

๐Ÿ”‘ Permissions

Permission Description Default
combat.admin ๐Ÿ‘‘ Administrative access op
combat.protection ๐Ÿ›ก๏ธ Protection commands true

๐Ÿ’ก Permissions can be managed with any permission plugin

๐Ÿ“š API Usage

Maven Configuration

Add the JitPack repository to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Add the dependency:

<dependency>
    <groupId>com.github.OPmasterLEO</groupId>
    <artifactId>MasterCombat</artifactId>
    <version>VERSION</version>  <!-- Replace with latest version from JitPack badge -->
</dependency>

Gradle Configuration

Add the JitPack repository:

repositories {
    maven { url 'https://jitpack.io' }
}

Add the dependency:

dependencies {
    implementation 'com.github.OPmasterLEO:MasterCombat:VERSION'  // Replace VERSION
}

๐Ÿ’ก Check the JitPack badge at the top for the latest version number

API Methods

Method Description Returns
tagPlayer(UUID) Tag a player for combat void
untagPlayer(UUID) Remove combat tag void
getMasterCombatState(UUID) Get combat state ("Fighting"/"Idle") String
isPlayerGlowing(UUID) Check if player is glowing boolean
getMasterCombatStateWithGlow(UUID) State with glow annotation String
getRemainingCombatTime(UUID) Get remaining combat seconds int
getTotalCombatTime(UUID) Get total combat duration long
getCombatOpponent(UUID) Get opponent's UUID UUID
isCombatSystemEnabled() Check if system is active boolean
getActiveCombatCount() Count active combat players int
setCombatVisibility(UUID, boolean) Show/hide combat UI void
isCombatVisible(UUID) Check UI visibility boolean

๐Ÿ’ก Combat Visibility Feature: Hide combat UI (messages, action bar timer) while keeping mechanics active. Perfect for custom UIs or stealth modes!

Example Usage

import net.opmasterleo.combat.api.MasterCombatAPI;
import net.opmasterleo.combat.api.MasterCombatAPIProvider;

public class Example {
    public void example() {
        // Get API instance
        MasterCombatAPI api = MasterCombatAPIProvider.get();
        
        // Basic combat operations
        api.tagPlayer(player.getUniqueId());
        api.untagPlayer(player.getUniqueId());
        
        // Check combat status
        String state = api.getMasterCombatState(player.getUniqueId());
        boolean glowing = api.isPlayerGlowing(player.getUniqueId());
        String stateWithGlow = api.getMasterCombatStateWithGlow(player.getUniqueId());
        
        // Combat timing information
        int remainingTime = api.getRemainingCombatTime(player.getUniqueId());
        long totalTime = api.getTotalCombatTime(player.getUniqueId());
        
        // Combat relationships
        UUID opponent = api.getCombatOpponent(player.getUniqueId());
        
        // System status
        boolean systemEnabled = api.isCombatSystemEnabled();
        int activeCombats = api.getActiveCombatCount();
        
        // Combat visibility control (NEW in v5.2.4+)
        api.setCombatVisibility(player.getUniqueId(), false); // Hide combat UI
        boolean isVisible = api.isCombatVisible(player.getUniqueId());
        api.setCombatVisibility(player.getUniqueId(), true); // Show combat UI
        
        // Example: Print combat status
        if (api.isCombatSystemEnabled()) {
            System.out.printf("Player %s is %s with %d seconds remaining%n",
                player.getName(),
                api.getMasterCombatStateWithGlow(player.getUniqueId()),
                api.getRemainingCombatTime(player.getUniqueId()));
                
            UUID opponentId = api.getCombatOpponent(player.getUniqueId());
            if (opponentId != null) {
                System.out.printf("Fighting against: %s%n",
                    Bukkit.getPlayer(opponentId).getName());
            }
            
            // Check if player has UI visible
            if (!api.isCombatVisible(player.getUniqueId())) {
                System.out.println("Player has combat UI hidden (combat still active)");
            }
        }
    }
}

๐Ÿงฉ Placeholders

MasterCombat supports placeholders in its messages and UI. These resolve automatically, and if PlaceholderAPI is installed, any PAPI placeholders inside your messages will be applied too.

Built-in placeholders provided by the plugin (all prefixed with mastercombat_):

Placeholder Description
%mastercombat_time% Remaining combat time formatted as MM:SS
%mastercombat_command% The configured โ€œdisable protectionโ€ command name (from NewbieProtection.settings.disableCommand, defaults to removeprotect)
%mastercombat_prefix% Message prefix from config (Messages.Prefix)
%mastercombat_duration% Configured combat duration in seconds (General.duration)
%mastercombat_enabled% Whether combat system is currently enabled (true/false)
%mastercombat_status% Plugin status: Fighting or Idle
%mastercombat_visibility% Playerโ€™s combat UI visibility: แดษด or แด๊œฐ๊œฐ (lowercase)

Notes:

  • You can also use any PlaceholderAPI placeholders if PlaceholderAPI is present.
  • Developers can register additional custom placeholders at runtime via PlaceholderAPI.registerCustomPlaceholder(String placeholder, String value).
  • %mastercombat_time% is only meaningful in contexts where the message is rendered with a known remaining time (e.g., actionbar or combat messages).
  • Legacy tokens like %prefix%, %combat_enabled%, %combat_duration%, and %command% are still accepted for backward compatibility, but new configs should prefer the mastercombat_ variants.

Example (config):

Messages:
    Prefix: "&7[&cCombat&7] "
    NowInCombat:
        type: both
        text: "%mastercombat_prefix% &fYou are now in combat for &c%mastercombat_time%&f."
    ElytraDisabled:
        type: actionbar
        text: "%mastercombat_prefix% &cElytra disabled during combat (&f%mastercombat_time%&c left)"

๐Ÿ”ง Server Compatibility

This plugin features advanced multi-threading support across all major Minecraft server platforms:

Modern Platforms

Platform Version Key Features
Paper 1.16.5+ โœจ Native async scheduler
โšก Multi-threaded worker pool
Folia Latest ๐ŸŒ Region-aware scheduling
โšก Native async support
Canvas Latest ๐ŸŒ Region-aware tasks
โšก Async capabilities

Legacy Support

Platform Version Key Features
Legacy Paper Pre-1.16.5 ๐Ÿ”„ Custom thread pool
โš™๏ธ Legacy task compatibility
Modern Spigot 1.14+ โšก Async scheduling
๐Ÿ”„ Multi-thread support
Legacy Spigot Pre-1.14 ๐Ÿ”„ Custom thread pool
โš™๏ธ Backward compatibility

Special Platform Support

Platform Features
ArcLight ๐Ÿ”’ ClassLoader-aware execution
โšก Specialized task handling

๐Ÿ’ซ Advanced Threading Features

  • Adaptive Threading: Auto-scales worker pool (2-16 threads) based on CPU cores
  • Smart Scheduling: Automatic platform detection for optimal task distribution
  • Region Awareness: Enhanced performance with Folia/Canvas region support
  • Legacy Support: Seamless operation on older server versions
  • Custom Pooling: Dedicated thread management for legacy platforms

๐Ÿ“ For detailed compatibility information and latest updates, check our GitHub Releases page.

๐Ÿ”’ Security Policy

Reporting a Vulnerability

Method Contact
๐Ÿ› GitHub Issues Create Issue
๐Ÿ’ฌ Discord DM opmasterleo

โšก Quick Response Guarantee: All security reports receive priority attention

๐Ÿ›ก๏ธ Supported Versions: Security fixes are backported to maintained releases


bStats

About

A advanced DonutSMP copy combat plugin with extra features.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages