Skip to content

Commit b70c11a

Browse files
authored
Merge pull request #107 from ez-plugins/feature/pvp-tag
feat: PvP tag integration (CombatLogX, PvPManager, Simple Combat Log)
2 parents 4026510 + 13f08d9 commit b70c11a

31 files changed

Lines changed: 602 additions & 31 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ jobs:
158158
teams-api(optional)
159159
ezcountdown(optional)
160160
ezeconomy(optional)
161+
pvpmanager(optional)
162+
simple-combatlog(optional)
161163
162164
# ──────────────────────────────────────────────────────────────────────
163165
# 8. DISCORD NOTIFICATION

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,29 @@ Release tags use the `v` prefix (e.g. `v3.0.2`).
2020

2121
---
2222

23+
## [3.3.0] - 2026-05-16
24+
25+
### Added
26+
27+
- **PvP tag integration**: EzRTP now detects when a player enters combat and cancels their
28+
pending teleport or active countdown. Three plugins are supported out of the box:
29+
- **[CombatLogX](https://www.spigotmc.org/resources/combatlogx.31689/)** — auto-detected at startup; soft dependency.
30+
- **[PvPManager](https://modrinth.com/plugin/pvpmanager)** — auto-detected at startup; soft dependency.
31+
- **[Simple Combat Log](https://modrinth.com/plugin/simple-combatlog)** (NikeyV1/CombatLog) — auto-detected at startup; soft dependency.
32+
- All three are added to `softdepend` in `plugin.yml` so they load before EzRTP when
33+
present. No configuration change is required on servers that do not use any of them.
34+
- New `pvp-tag-integration` section in `rtp.yml`:
35+
- `cancel-countdown-on-pvp-tag` (default `true`): cancel an active countdown the moment
36+
the player is tagged.
37+
- `cancel-queued-on-pvp-tag` (default `true`): skip a queued teleport if the player is
38+
already in combat when their slot is dispatched.
39+
- New message keys `countdown-pvp-cancel` and `queue-pvp-tag-cancel` in `messages/*.yml`
40+
for the cancellation notifications.
41+
- Modrinth release metadata now declares `pvpmanager` and `simple-combatlog` as optional
42+
dependencies.
43+
44+
---
45+
2346
## [3.2.3] - 2026-05-16
2447

2548
### Fixed

docs/config/rtp.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,30 @@ Supported values: `worldguard`, `griefprevention`, `teamsapi`.
230230

231231
---
232232

233+
## PvP tag integration
234+
235+
Cancels a pending teleport or active countdown when the player enters combat.
236+
Requires one of the supported PvP tag plugins to be installed (all are soft-dependencies):
237+
[CombatLogX](https://www.spigotmc.org/resources/combatlogx.31689/),
238+
[PvPManager](https://modrinth.com/plugin/pvpmanager), or
239+
[Simple Combat Log](https://modrinth.com/plugin/simple-combatlog).
240+
241+
| Key | Default | Description |
242+
| :--- | :--- | :--- |
243+
| `pvp-tag-integration.cancel-countdown-on-pvp-tag` | `true` | Cancel an active countdown the moment the player receives a PvP tag. |
244+
| `pvp-tag-integration.cancel-queued-on-pvp-tag` | `true` | Skip a queued teleport if the player is already in combat when their slot is dispatched. |
245+
246+
```yml
247+
pvp-tag-integration:
248+
cancel-countdown-on-pvp-tag: true
249+
cancel-queued-on-pvp-tag: true
250+
```
251+
252+
If no supported PvP tag plugin is installed the section is silently ignored.
253+
See the [PvP Tag integration guide](../integrations/pvp-tag) for setup details.
254+
255+
---
256+
233257
## Particles (arrival effect)
234258

235259
An optional particle burst played at the destination when the player arrives.

docs/integrations/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ has_children: true
88

99
EzRTP integrates with several popular plugins. Browse the pages below to
1010
set up each one.
11+
12+
| Page | Plugins covered |
13+
| :--- | :--- |
14+
| [Vault / Economy](vault-economy) | Vault, EzEconomy |
15+
| [PlaceholderAPI](placeholderapi) | PlaceholderAPI |
16+
| [Chunky](chunky) | Chunky (world pre-generation) |
17+
| [Protection](protection-worldguard-griefprevention) | WorldGuard, GriefPrevention, TeamsAPI |
18+
| [PvP Tag](pvp-tag) | CombatLogX, PvPManager, Simple Combat Log |
19+
| [Network / Proxy](network-proxy) | BungeeCord / Velocity proxy destinations |

docs/integrations/pvp-tag.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: PvP Tag (CombatLogX / PvPManager / Simple Combat Log)
3+
nav_order: 5
4+
parent: Integrations
5+
---
6+
7+
# PvP Tag Integration
8+
9+
Use this integration when you want EzRTP to cancel a pending teleport or active
10+
countdown the moment a player enters combat.
11+
12+
## Supported plugins
13+
14+
All three plugins are optional soft-dependencies. EzRTP auto-detects whichever
15+
ones are present and registers them at startup. You can have more than one
16+
installed simultaneously.
17+
18+
| Plugin | Where to get it |
19+
| :--- | :--- |
20+
| [CombatLogX](https://www.spigotmc.org/resources/combatlogx.31689/) | SpigotMC (597 K+ downloads) |
21+
| [PvPManager](https://modrinth.com/plugin/pvpmanager) | Modrinth · [SpigotMC (free)](https://www.spigotmc.org/resources/pvpmanager-lite.845/) |
22+
| [Simple Combat Log](https://modrinth.com/plugin/simple-combatlog) | Modrinth · [GitHub](https://github.com/NikeyV1/CombatLog) |
23+
24+
No configuration change is required on servers that do not use any of them.
25+
26+
## What this integration does
27+
28+
- **Countdown cancellation** — if a player receives a PvP tag while a countdown is
29+
ticking, the teleport is cancelled and a configurable message is sent.
30+
- **Queue cancellation** — if a queued teleport slot is dispatched while the player
31+
is already tagged, the teleport is skipped and the player must re-queue.
32+
33+
## Where to configure it
34+
35+
File: `plugins/EzRTP/rtp.yml`
36+
37+
```yml
38+
pvp-tag-integration:
39+
cancel-countdown-on-pvp-tag: true
40+
cancel-queued-on-pvp-tag: true
41+
```
42+
43+
### Key settings
44+
45+
- `cancel-countdown-on-pvp-tag`
46+
- `true`: cancel the active countdown as soon as the player is tagged.
47+
- `false`: ignore combat tags during countdown (teleport proceeds regardless).
48+
- `cancel-queued-on-pvp-tag`
49+
- `true`: skip the queued teleport if the player is in combat at dispatch time.
50+
- `false`: dispatch the queued teleport even while in combat.
51+
52+
## Messages
53+
54+
Add or override these keys in `plugins/EzRTP/messages/en.yml`:
55+
56+
| Key | Default text |
57+
| :--- | :--- |
58+
| `countdown-pvp-cancel` | `<red>Teleport cancelled — you entered combat!</red>` |
59+
| `queue-pvp-tag-cancel` | `<red>Teleport skipped — you are in combat!</red>` |
60+
61+
## Startup log
62+
63+
When a supported plugin is detected, EzRTP logs a confirmation on enable:
64+
65+
```text
66+
[EzRTP] PvP tag integration: CombatLogX detected.
67+
[EzRTP] PvP tag integration: PvPManager detected.
68+
[EzRTP] PvP tag integration: Simple Combat Log detected.
69+
```
70+
71+
If none of the supported plugins are installed, no message is printed and the
72+
feature is effectively disabled.

ezrtp-api/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<parent>
66
<groupId>com.skyblockexp</groupId>
77
<artifactId>ezrtp-parent</artifactId>
8-
<version>3.2.3</version>
8+
<version>3.3.0</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

1212
<groupId>com.skyblockexp</groupId>
1313
<artifactId>ezrtp-api</artifactId>
14-
<version>3.2.3</version>
14+
<version>3.3.0</version>
1515
<packaging>jar</packaging>
1616
<name>EzRTP API</name>
1717
<description>Lightweight public API for EzRTP intended for third-party plugins.</description>

ezrtp-bukkit/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<parent>
66
<groupId>com.skyblockexp</groupId>
77
<artifactId>ezrtp-parent</artifactId>
8-
<version>3.2.3</version>
8+
<version>3.3.0</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

1212
<groupId>com.skyblockexp</groupId>
1313
<artifactId>ezrtp-bukkit</artifactId>
14-
<version>3.2.3</version>
14+
<version>3.3.0</version>
1515
<packaging>jar</packaging>
1616
<name>EzRTP (Bukkit)</name>
1717
<description>EzRTP Bukkit-compatible plugin module.</description>
@@ -111,7 +111,7 @@
111111
<dependency>
112112
<groupId>com.skyblockexp</groupId>
113113
<artifactId>ezrtp-common</artifactId>
114-
<version>3.2.3</version>
114+
<version>3.3.0</version>
115115
</dependency>
116116
</dependencies>
117117

ezrtp-common/pom.xml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<parent>
66
<groupId>com.skyblockexp</groupId>
77
<artifactId>ezrtp-parent</artifactId>
8-
<version>3.2.3</version>
8+
<version>3.3.0</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

1212
<groupId>com.skyblockexp</groupId>
1313
<artifactId>ezrtp-common</artifactId>
14-
<version>3.2.3</version>
14+
<version>3.3.0</version>
1515
<packaging>jar</packaging>
1616
<name>EzRTP Common</name>
1717
<description>Shared utilities for EzRTP (platform-independent)</description>
@@ -89,6 +89,34 @@
8989
<version>7.0.2</version>
9090
</dependency>
9191

92+
<!-- CombatLogX integration — optional soft-dependency; classes only loaded when plugin is present -->
93+
<dependency>
94+
<groupId>com.github.sirblobman.api</groupId>
95+
<artifactId>core</artifactId>
96+
<version>2.9-SNAPSHOT</version>
97+
<scope>provided</scope>
98+
</dependency>
99+
<dependency>
100+
<groupId>com.github.sirblobman.combatlogx</groupId>
101+
<artifactId>api</artifactId>
102+
<version>11.6-SNAPSHOT</version>
103+
<scope>provided</scope>
104+
</dependency>
105+
<!-- PvPManager integration — optional soft-dependency; classes only loaded when plugin is present -->
106+
<dependency>
107+
<groupId>me.chancesd.pvpmanager</groupId>
108+
<artifactId>pvpmanager</artifactId>
109+
<version>4.0.8</version>
110+
<scope>provided</scope>
111+
</dependency>
112+
<!-- Simple Combat Log integration — optional soft-dependency; Modrinth: simple-combatlog -->
113+
<dependency>
114+
<groupId>com.github.NikeyV1</groupId>
115+
<artifactId>CombatLog</artifactId>
116+
<version>master-SNAPSHOT</version>
117+
<scope>provided</scope>
118+
</dependency>
119+
92120
<dependency>
93121
<groupId>org.junit.jupiter</groupId>
94122
<artifactId>junit-jupiter</artifactId>

ezrtp-common/src/main/java/com/skyblockexp/ezrtp/bootstrap/EzRtpPluginBootstrap.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.bukkit.plugin.Plugin;
4040
import com.skyblockexp.ezrtp.teleport.ChunkyProvider;
4141
import com.skyblockexp.ezrtp.teleport.ChunkyRuntimeProvider;
42+
import com.skyblockexp.ezrtp.pvptag.PvpTagService;
4243
// Chunky API is optional; use runtime loader via ChunkyRuntimeProvider
4344

4445
import java.io.File;
@@ -86,6 +87,7 @@ public final class EzRtpPluginBootstrap {
8687
private UsageResetScheduler usageResetScheduler;
8788
private final HeatmapSimulationStore heatmapSimulationStore = new HeatmapSimulationStore();
8889
private com.skyblockexp.ezrtp.teleport.ChunkyWarmupCoordinator chunkyWarmupCoordinator;
90+
private PvpTagService pvpTagService;
8991

9092
public EzRtpPluginBootstrap(EzRtpPlugin plugin) {
9193
this.plugin = plugin;
@@ -238,6 +240,24 @@ public void reloadPluginConfiguration() {
238240
plugin.getLogger().info("Chunky integration disabled in configuration.");
239241
chunkyAPI = null;
240242
}
243+
244+
// Initialize PvP tag providers once; registered only when the corresponding plugin is present.
245+
if (pvpTagService == null) {
246+
pvpTagService = new PvpTagService();
247+
if (plugin.getServer().getPluginManager().isPluginEnabled("CombatLogX")) {
248+
pvpTagService.registerProvider(new com.skyblockexp.ezrtp.pvptag.CombatLogXPvpTagProvider());
249+
plugin.getLogger().info("PvP tag integration: CombatLogX detected.");
250+
}
251+
if (plugin.getServer().getPluginManager().isPluginEnabled("PvPManager")) {
252+
pvpTagService.registerProvider(new com.skyblockexp.ezrtp.pvptag.PvpManagerPvpTagProvider());
253+
plugin.getLogger().info("PvP tag integration: PvPManager detected.");
254+
}
255+
if (plugin.getServer().getPluginManager().isPluginEnabled("CombatLog")) {
256+
pvpTagService.registerProvider(new com.skyblockexp.ezrtp.pvptag.SimpleCombatLogPvpTagProvider());
257+
plugin.getLogger().info("PvP tag integration: Simple Combat Log detected.");
258+
}
259+
}
260+
241261
messageProvider = configurationService.getMessageProvider();
242262
// Initialize text rendering settings (force legacy conversion for older clients)
243263
boolean forceLegacy = configurationService.getEffectiveBaseConfiguration().getBoolean("messages.force-legacy-colors", false);
@@ -272,7 +292,7 @@ public void reloadPluginConfiguration() {
272292
teleportService = new RandomTeleportService(plugin, defaultSettings,
273293
configuration.getQueueSettings(), economyService,
274294
(player, settings) -> configuration.resolveTeleportCost(player, settings),
275-
protectionRegistry, messageProvider, ChunkLoadStrategyRegistry.get(), PlatformRuntimeRegistry.get(), chunkyAPI, chunkyWarmupCoordinator);
295+
protectionRegistry, messageProvider, ChunkLoadStrategyRegistry.get(), PlatformRuntimeRegistry.get(), chunkyAPI, chunkyWarmupCoordinator, pvpTagService);
276296
try { EzRtpAPI.registerProvider(plugin, teleportService); } catch (Throwable ignored) {}
277297
} else {
278298
teleportService.reload(defaultSettings, configuration.getQueueSettings());

0 commit comments

Comments
 (0)