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

OPmasterLEO/MasterCombat

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