Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
76d5b6d
Disable drop feature entirely if DropType equals UNCHANGED
Jakubk15 Feb 8, 2025
abcbcb3
comment out dependsOn from shadowJar task
Jakubk15 Feb 8, 2025
2ab0a42
Clarify comment in config
Jakubk15 Feb 8, 2025
fe034df
Merge branch '2.0' into v2.0/angelchest-compat
Jakubk15 Mar 16, 2025
1ac36b8
fix build
Jakubk15 Mar 16, 2025
726f1aa
GH-189 EternalCombat 2.0. (#189)
vLuckyyy Mar 22, 2025
da555c6
GH-190 Remove unused dependencies.
vLuckyyy Mar 22, 2025
f338fc4
Update ShadowJar and gradle.
vLuckyyy Mar 22, 2025
bd4fd13
Update renovate settings and remove whitesource.
vLuckyyy Mar 22, 2025
8c5038e
dependency: Update minor (#210)
renovate[bot] Mar 22, 2025
7f13049
Fix java settings.
vLuckyyy Mar 22, 2025
4cd8367
GH-186 Make readme great again. (#208)
vLuckyyy Mar 22, 2025
95fb636
Merge branch '2.0' into v2.0/angelchest-compat
Jakubk15 Mar 22, 2025
f81237c
fix imports
Jakubk15 Mar 22, 2025
824313c
announcer -> noticeService
vLuckyyy Mar 22, 2025
0540e39
dependency: Update all-major (#211)
renovate[bot] Mar 22, 2025
64e366c
dependency: Update patch (#209)
renovate[bot] Mar 22, 2025
0da9208
Update eternalcode-commons.
vLuckyyy Mar 22, 2025
9b8b0a8
Fix PacketEvents relocation and initialization.
vLuckyyy Mar 24, 2025
a235b79
Remove check for updates for packetevents.
vLuckyyy Mar 24, 2025
0b119a2
Release v2.0.0
vLuckyyy Mar 25, 2025
bae1b80
Release v2.0.1-SNAPSHOT.
vLuckyyy Mar 26, 2025
d9f98d3
Fix time formatting for combat message.
vLuckyyy Mar 26, 2025
0509585
Fix PlayerTeleportEvent warn message.
vLuckyyy Mar 26, 2025
7f30d79
Fix placeholder in "adminPlayerNotInCombat"
vLuckyyy Mar 26, 2025
312d8e0
Release v2.0.1
vLuckyyy Mar 26, 2025
a8b48b8
GH-217 Fix NPE in BorderBlockController (#217)
Rollczi Apr 22, 2025
31d41c9
GH-220 Ignore thorns when causing combat log (#220)
CitralFlo Apr 22, 2025
411e78d
GH-213 Fix bossbar configuration serialization (#213)
Rollczi May 11, 2025
2dc6cbf
Add option to display milliseconds for last second of combat (#219)
CitralFlo May 11, 2025
7ce6d8b
GH-221 Add EventPriority to config for player quit event, add whiteli…
MassiveLag May 19, 2025
b87e640
dependency: Update minor (#215)
renovate[bot] May 19, 2025
d6bf4e6
GH-225 Add better way to check restricted command - previous idea onl…
CitralFlo May 24, 2025
f9bc56b
GH-227 Sort combat regions by priority which supports overlapping reg…
CitralFlo Jun 10, 2025
9e914d6
Release v2.1.0
vLuckyyy Jun 14, 2025
241898d
GH-226 Add Lands support. (#226)
vLuckyyy Jun 17, 2025
f2ab289
dependency: Update minor (#228)
renovate[bot] Jun 17, 2025
ba5fa97
dependency: Update dependency net.kyori:adventure-text-minimessage to…
renovate[bot] Jun 19, 2025
487fc97
GH-232 Fix head drop (#232)
vLuckyyy Jun 24, 2025
7a152e0
GH-233 Fix pearl cooldown (#233)
vLuckyyy Jul 11, 2025
4c30b7d
Migrate renovate config.
vLuckyyy Jul 11, 2025
861aad1
dependency: Update dependency com.github.angeschossen:LandsAPI to v7.…
renovate[bot] Jul 11, 2025
b9c625c
dependency: Update dependency com.github.ben-manes.caffeine:caffeine …
renovate[bot] Jul 11, 2025
40cac29
dependency: Update dependency com.gradleup.shadow:com.gradleup.shadow…
renovate[bot] Jul 11, 2025
690678c
Release v2.1.1
vLuckyyy Jul 11, 2025
dad09ba
GH-218 Add CrystalPVP expansion (#218)
CitralFlo Jul 22, 2025
75cc94f
Merge branch 'master' into v2.0/angelchest-compat
Jakubk15 Jul 27, 2025
d2a9821
merge conflicts
Jakubk15 Jul 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .whitesource

This file was deleted.

148 changes: 98 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,96 +2,144 @@

![](/assets/readme-banner.png)

[![Supports Paper](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/supported/paper_vector.svg)](https://papermc.io)
[![Supports Spigot](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/supported/spigot_vector.svg)](https://spigotmc.org)
[![Available on SpigotMC](https://raw.githubusercontent.com/vLuckyyy/badges/main/available-on-spigotmc.svg)](https://www.spigotmc.org/resources/eternalcombat-%E2%9C%94%EF%B8%8F-enchance-your-combat-system-with-eternalcombat.109056/)
[![Available on Modrinth](https://raw.githubusercontent.com/vLuckyyy/badges/main/avaiable-on-modrinth.svg)](https://modrinth.com/plugin/eternalcombat)
[![Available on Hangar](https://raw.githubusercontent.com/vLuckyyy/badges/main/avaiable-on-hangar.svg)](https://hangar.papermc.io/EternalCodeTeam/eternalcombat)

[![Patreon](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/donate/patreon-plural_vector.svg)](https://www.patreon.com/eternalcode)
[![Website](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/documentation/website_vector.svg)](https://eternalcode.pl/)
[![Discord](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/social/discord-plural_vector.svg)](https://discord.gg/FQ7jmGBd6c)

[![Gradle](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/built-with/gradle_vector.svg)](https://gradle.org/)
[![Java](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/cozy/built-with/java17_vector.svg)](https://www.java.com/)
[![Chat on Discord](https://raw.githubusercontent.com/vLuckyyy/badges/main//chat-with-us-on-discord.svg)](https://discord.com/invite/FQ7jmGBd6c)
[![Read the Docs](https://raw.githubusercontent.com/vLuckyyy/badges/main/read-the-documentation.svg)](https://docs.eternalcode.pl/eternalcombat/introduction)
[![Available on BStats](https://raw.githubusercontent.com/vLuckyyy/badges/main/available-on-bstats.svg)](https://bstats.org/plugin/bukkit/EternalCombat/17803)
</div>

### Information

EternalCombat has been tested on Minecraft versions 1.17.1 to 1.21.1, but it should work on most other versions. If you
encounter any compatibility issues, please report them in the
[Issues tab](https://github.com/EternalCodeTeam/EternalCombat/issues). The plugin requires Java 17 or later, so please
make sure it is installed on your server.
EternalCombat 2.0 has been tested on Minecraft versions **1.17.1 to 1.21.5**, but it should work seamlessly on most
other versions too.
If you run into any compatibility issues, please let us know in
the [Issues tab](https://github.com/EternalCodeTeam/EternalCombat/issues).
The plugin requires **Java 17 or later**, so
ensure your server is ready.
Ready for action?
Install EternalCombat and dive in now!

### How Does EternalCombat Work?

Take your server’s PvP experience to epic heights with **EternalCombat 2.0**! Our robust combat logging system ensures
fair, heart-pounding battles that keep players on their toes. Here’s a rundown of what makes it stand out:

- **Combat Logging**
No more dodging fights by logging out! Once players are in combat, they’re committed until the showdown ends. Watch it
in action:
![](/assets/combatlog.gif)

- **Spawn Protection (Configurable)**
Stop players from fleeing to safety! Block access to spawn or safe zones during combat – tweak it to fit your server’s
rules. See how it works:
![](/assets/border.gif)

- **Fully Customizable Combat**
Tailor the combat experience to your liking with a ton of options! From disabling elytra to setting drop rates for
defeated players, you’re in control. Here’s what you can tweak:

| Feature | Description |
|----------------------|-----------------------------------------------------------------|
| Elytra & Inventory | Disable elytra or inventory access during combat. |
| Commands | Whitelist or blacklist specific commands in combat. |
| Damage & Projectiles | Customize damage causes and projectile tagging settings. |
| Ender Pearls | Add cooldowns to pearl usage in fights. |
| Block Placement | Enable or disable block placement during combat. |
| Drop Rates | Set a percentage of items dropped by defeated players. |
| Temporary Effects | Apply special effects to players in combat for added intensity. |
| And More! | Dive into the config for even more fine-tuning options! |

Curious for more? Check out our quick and exciting YouTube presentation [here](https://youtu.be/5pELO5B0Hhk) to see
EternalCombat in full swing and learn why it’s a game-changer for your server!

## PlaceholderAPI
### Permissions for EternalCombat

EternalCombat supports PlaceholderAPI, which allows you to use placeholders in other plugins that support it.
To use placeholders, follow PlaceholderAPI's [instructions](https://wiki.placeholderapi.com/users/) and use the placeholders provided by EternalCombat.
Provided placeholders:
- `%eternalcombat_opponent%` - Returns the name of the player with whom the player is fighting.
- `%eternalcombat_opponent_health%` - Returns opponent health in format `00.00`
- `%eternalcombat_remaining_seconds%` - Returns the number of seconds remaining until the player is no longer in combat.
- `%eternalcombat_remaining_millis%` - Returns the number of milliseconds remaining until the player is no longer in combat.
Control who can use EternalCombat’s powerful features with these permissions:

If the player is not in combat, the placeholders will return an empty string.
If combat was not caused by other player, opponent placeholders will return empty string.
| Permission | Description |
|--------------------------------|--------------------------------------------------------------------------|
| `eternalcombat.status` | Check a player’s combat status with `/combatlog status <player>`. |
| `eternalcombat.tag` | Start a fight between players using `/combatlog tag <player> [player2]`. |
| `eternalcombat.untag` | Remove a player from combat with `/combatlog untag <player>`. |
| `eternalcombat.reload` | Reload the plugin with `/combatlog reload`. |
| `eternalcombat.receiveupdates` | Receive notifications about new plugin versions on join. |
| `eternalcombat.bypass` | Bypass combat tagging, need's `excludeAdminsFromCombat` to be enabled |

## Building
Build EternalCombat using:
## PlaceholderAPI

`./gradlew shadowJar`
EternalCombat 2.0 fully supports **PlaceholderAPI**, letting you integrate placeholders into other compatible plugins.
Follow the [PlaceholderAPI instructions](https://wiki.placeholderapi.com/users/) to get started.
Here are the available
placeholders:

### Permissions for EternalCombat
| Placeholder | Description |
|-------------------------------------|---------------------------------------------------------------|
| `%eternalcombat_opponent%` | Returns the name of the player you’re fighting. |
| `%eternalcombat_opponent_health%` | Returns the opponent’s health in `00.00` format. |
| `%eternalcombat_remaining_seconds%` | Returns seconds remaining until the player exits combat. |
| `%eternalcombat_remaining_millis%` | Returns milliseconds remaining until the player exits combat. |

- `eternalcombat.status` - Allows to check if the player is in combat `/combatlog status <player>`
- `eternalcombat.tag` - Allows to create fights between two
players `/combatlog tag <first_player> <optional_second_player>`
- `eternalcombat.untag` - Allows to remove player from fight `/combatlog untag <player>`
- `eternalcombat.reload` - Allows to reload plugin `/combatlog reload`
- `eternalcombat.receiveupdates` - Allows you to receive notifications about the new version of the plugin when
attaching
If a player isn’t in combat, placeholders return an empty string.
If combat wasn’t triggered by another player,
opponent-related placeholders will also return empty.

### Developer API

#### 1. Add repository:

with Gradle:
With Gradle:

```kts
maven {
url = uri("https://repo.eternalcode.pl/releases")
}
```

with Maven:
With Maven:

```xml

<repository>
<id>eternalcode-reposilite-releases</id>
<name>EternalCode Repository</name>
<url>https://repo.eternalcode.pl/releases</url>
<id>eternalcode-reposilite-releases</id>
<name>EternalCode Repository</name>
<url>https://repo.eternalcode.pl/releases</url>
</repository>
```

#### 2. Add dependency:

with Gradle:
With Gradle:

```kts
compileOnly("com.eternalcode:eternalcombat-api:1.3.2")
compileOnly("com.eternalcode:eternalcombat-api:2.1.1")
```

with Maven:
With Maven:

```xml

<dependency>
<groupId>com.eternalcode</groupId>
<artifactId>eternalcombat-api</artifactId>
<version>1.3.2</version>
<scope>provided</scope>
<groupId>com.eternalcode</groupId>
<artifactId>eternalcombat-api</artifactId>
<version>2.1.1</version>
<scope>provided</scope>
</dependency>
```

### Contributing

We welcome all contributions to the EternalCombat project! Please check out [contributing](.github/CONTRIBUTING.md) for
more information on how to contribute and our [code of conduct](./.github/CODE_OF_CONDUCT.md)
We’d love your help to make EternalCombat even better!
Check out our [contributing guide](.github/CONTRIBUTING.md) for
details on how to get involved and our [code of conduct](./.github/CODE_OF_CONDUCT.md).

### Reporting Issues

If you find an issue with the plugin, please report it in
the [Issues tab](https://github.com/EternalCodeTeam/EternalCombat/issues). Please provide as much information as
possible, including the version of Minecraft and the plugin you are using, as well as any error messagesSettings or logs
Found a bug?
Report it in the [Issues tab](https://github.com/eternalcodeteam/eternalcombat/issues).
Please include as much detail as possible, like your Minecraft and plugin
versions, along with any error messages or logs.
Ready to transform your server’s combat experience?
Download EternalCombat 2.0 now and let the battles begin!
Binary file added assets/border.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/combatlog.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/readme-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ repositories {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.25")
implementation("io.github.goooler.shadow:shadow-gradle-plugin:8.1.8")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20")
implementation("com.gradleup.shadow:com.gradleup.shadow.gradle.plugin:8.3.8")
implementation("net.minecrell:plugin-yml:0.6.0")
implementation("xyz.jpenilla:run-task:2.3.0")
implementation("xyz.jpenilla:run-task:2.3.1")
}

sourceSets {
Expand Down
32 changes: 15 additions & 17 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,29 @@ object Versions {

const val SPIGOT_API = "1.17.1-R0.1-SNAPSHOT"

const val JUNIT_JUPITER_API = "5.10.3"
const val JUNIT_JUPITER_PARAMS = "5.10.3"
const val JUNIT_JUPITER_ENGINE = "5.10.3"
const val JUNIT_JUPITER_API = "5.13.1"
const val JUNIT_JUPITER_PARAMS = "5.13.1"
const val JUNIT_JUPITER_ENGINE = "5.13.1"

const val JETBRAINS_ANNOTATIONS = "24.1.0"
const val JETBRAINS_ANNOTATIONS = "26.0.2"

const val ETERNALCODE_COMMONS = "1.1.3"
const val MULTIFICATION = "1.1.4"
const val PACKETS_EVENTS = "2.7.0"
const val ETERNALCODE_COMMONS = "1.1.6"
const val MULTIFICATION = "1.2.1"
const val PACKETS_EVENTS = "2.8.0"

const val ADVENTURE_PLATFORM_BUKKIT = "4.3.4"
const val ADVENTURE_API = "4.17.0"
const val ADVENTURE_PLATFORM_BUKKIT = "4.4.0"
const val ADVENTURE_API = "4.23.0"

const val LITE_COMMANDS = "3.7.0"
const val OKAERI_CONFIGS_YAML_BUKKIT = "5.0.3"
const val OKAERI_CONFIGS_SERDES_COMMONS = "5.0.3"
const val OKAERI_CONFIGS_SERDES_BUKKIT = "5.0.3"
const val LITE_COMMANDS = "3.10.0"
const val OKAERI_CONFIGS_YAML_BUKKIT = "5.0.6"
const val OKAERI_CONFIGS_SERDES_COMMONS = "5.0.6"
const val OKAERI_CONFIGS_SERDES_BUKKIT = "5.0.6"

const val PANDA_UTILITIES = "0.5.2-alpha"
const val GIT_CHECK = "1.0.0"
const val APACHE_COMMONS = "2.16.1"

const val CAFFEINE = "3.1.8"
const val CAFFEINE = "3.2.1"

const val B_STATS_BUKKIT = "3.0.2"
const val B_STATS_BUKKIT = "3.1.0"
const val WORLD_GUARD_BUKKIT = "7.0.9"

const val PLACEHOLDER_API = "2.11.6"
Expand Down
7 changes: 1 addition & 6 deletions buildSrc/src/main/kotlin/eternalcombat-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ plugins {
}

group = "com.eternalcode"
version = "2.0.0-SNAPSHOT"

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
version = "2.1.1"

tasks.compileJava {
options.compilerArgs = listOf("-Xlint:deprecation", "-parameters")
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/eternalcombat-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "com.eternalcode"
version = "2.0.0-SNAPSHOT"
version = "2.1.1"

java {
withSourcesJar()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ repositories {
maven("https://maven.enginehub.org/repo/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.codemc.io/repository/maven-releases/")
maven("https://jitpack.io/")
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public enum CauseOfTag {
*/
COMMAND,

/**
* Crystal or anchor explosion caused the tag.
*/
CRYSTAL,

/**
* A custom cause, typically defined by external plugins or systems, applied the combat tag.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.eternalcode.combat.region;

import org.bukkit.World;

public record Point(World world, double x, double z) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public interface Region {

Location getCenter();
Point getCenter();

Location getMin();

Expand Down
Loading
Loading