Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3fa5bfa
I've added new options to Pearl and Trident that reset the timer when…
Pawelusze Dec 14, 2025
fa7e220
I made the corrections that gemini noticed
Pawelusze Dec 14, 2025
e48a01f
The improvements suggested by the team have been implemented
Pawelusze Dec 29, 2025
f4bdbb7
Implemented suggestions from the team
Pawelusze Dec 29, 2025
51d4e34
Bump packetevents version to support future MC versions
Jakubk15 Dec 29, 2025
2e899de
Make tridents throw check work on all tridents, regardless of enchant…
Jakubk15 Dec 29, 2025
0be6867
Merge remote-tracking branch 'origin/feature/add-reset-timer' into fe…
Pawelusze Jan 4, 2026
ab4e804
Implemented suggestions from the team and fixed `FightTridentControll…
Pawelusze Feb 2, 2026
5ec350a
Corrected comments and field names
Pawelusze Feb 3, 2026
ee6cac5
Implemented CitralFlo suggestions
Pawelusze Feb 4, 2026
68fb2ef
Implemented CitralFlo suggestions again
Pawelusze Feb 5, 2026
5efe39b
Merge branch 'master' into feature/add-reset-timer
CitralFlo Feb 6, 2026
0841c22
Follow igoyek's review from 21.10.25
CitralFlo Feb 6, 2026
76e84ab
CR
Rollczi Feb 7, 2026
07ab306
Simplify naming - extract logic to service for Pearls
CitralFlo Feb 7, 2026
795c7b6
make it more logical
CitralFlo Feb 7, 2026
984449b
Refactor trident-related classes and services for improved clarity an…
CitralFlo Feb 7, 2026
3b0bd15
Rename trident cooldown methods to improve clarity and update comment…
CitralFlo Feb 7, 2026
486789d
Fixes after tests - everything should be working now!
CitralFlo Feb 8, 2026
70b3c7b
Remove commented line
CitralFlo Feb 8, 2026
996e95c
Add cooldown to enderpearl - hack by:https://www.spigotmc.org/threads…
CitralFlo Feb 8, 2026
3b19294
Bump minecraft version in runServer task to 1.21.11
Jakubk15 Feb 8, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.eternalcode.combat.fight.FightManager;
import com.eternalcode.combat.fight.drop.DropService;
import com.eternalcode.combat.fight.effect.FightEffectService;
import com.eternalcode.combat.fight.pearl.FightPearlService;
import com.eternalcode.combat.fight.pearl.PearlService;
import com.eternalcode.combat.region.RegionProvider;
import com.eternalcode.combat.fight.tagout.FightTagOutService;

Expand All @@ -14,7 +14,7 @@ public interface EternalCombatApi {

RegionProvider getRegionProvider();

FightPearlService getFightPearlService();
PearlService getFightPearlService();

FightTagOutService getFightTagOutService();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ public enum CauseOfTag {
*/
CRYSTAL,

/**
* Trident usage extending combat tag.
*/
TRIDENT,

/**
* Ender pearl usage extending combat tag.
*/
ENDER_PEARL,


/**
* 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
@@ -1,16 +1,16 @@
package com.eternalcode.combat.fight.pearl;

import java.time.Duration;
import java.time.Instant;
import java.util.UUID;
import org.bukkit.entity.Player;

public interface FightPearlService {
public interface PearlService {

Instant getDelay(UUID uuid);
boolean shouldCancelEvent(UUID playerId);

Duration getRemainingDelay(UUID uuid);

boolean hasDelay(UUID uuid);

void markDelay(UUID uuid);
void handleDelay(Player uuid);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.eternalcode.combat.fight.trident;

import java.time.Duration;
import java.util.UUID;
import org.bukkit.entity.Player;

public interface TridentService {

/**
* returns remaining delay for the player to use trident again
* @param uuid unique id of the player
* @return remaining duration left to use trident again by the player or zero
*/
Duration getRemainingDelay(UUID uuid);

/**
* checks if player still has delay left to use trident
* @param uuid unique id of the player
* @return true if user still has cooldown left to use trident
*/
boolean hasDelay(UUID uuid);

/**
* marks start of the delay for the user
* @param uuid unique id of the player
*/
void markDelay(UUID uuid);

/**
* handles the trident cooldown for the player, should be called when player uses riptide in combat
* @param player the player who used riptide in combat needed to apply cooldown to item
*/
void handleTridentDelay(Player player);

}
6 changes: 3 additions & 3 deletions eternalcombat-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription

import io.papermc.hangarpublishplugin.model.Platforms
import org.gradle.kotlin.dsl.shadowJar
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription

plugins {
`eternalcombat-java`
Expand Down Expand Up @@ -93,7 +93,7 @@ bukkit {

tasks {
runServer {
minecraftVersion("1.21.10")
minecraftVersion("1.21.11")
downloadPlugins.modrinth("WorldEdit", Versions.WORLDEDIT)
downloadPlugins.modrinth("PacketEvents", "${Versions.PACKETEVENTS}+spigot")
downloadPlugins.modrinth("WorldGuard", Versions.WORLDGUARD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
import com.eternalcode.combat.fight.firework.FireworkController;
import com.eternalcode.combat.fight.knockback.KnockbackService;
import com.eternalcode.combat.fight.tagout.FightTagOutService;
import com.eternalcode.combat.fight.pearl.FightPearlService;
import com.eternalcode.combat.fight.pearl.PearlService;
import com.eternalcode.combat.fight.trident.TridentController;
import com.eternalcode.combat.fight.trident.TridentService;
import com.eternalcode.combat.fight.trident.TridentServiceImpl;
import com.eternalcode.combat.handler.InvalidUsageHandlerImpl;
import com.eternalcode.combat.handler.MissingPermissionHandlerImpl;
import com.eternalcode.combat.config.ConfigService;
Expand All @@ -40,8 +43,8 @@
import com.eternalcode.combat.fight.effect.FightEffectServiceImpl;
import com.eternalcode.combat.fight.logout.LogoutController;
import com.eternalcode.combat.fight.logout.LogoutService;
import com.eternalcode.combat.fight.pearl.FightPearlController;
import com.eternalcode.combat.fight.pearl.FightPearlServiceImpl;
import com.eternalcode.combat.fight.pearl.PearlController;
import com.eternalcode.combat.fight.pearl.PearlServiceImpl;
import com.eternalcode.combat.fight.tagout.FightTagOutController;
import com.eternalcode.combat.fight.tagout.FightTagOutServiceImpl;
import com.eternalcode.combat.fight.tagout.FightTagOutCommand;
Expand Down Expand Up @@ -80,7 +83,8 @@ public final class CombatPlugin extends JavaPlugin implements EternalCombatApi {
private static final int BSTATS_METRICS_ID = 17803;

private FightManager fightManager;
private FightPearlService fightPearlService;
private PearlService pearlService;
private TridentService tridentService;
private FightTagOutService fightTagOutService;
private FightEffectService fightEffectService;

Expand Down Expand Up @@ -108,7 +112,8 @@ public void onEnable() {
MinecraftScheduler scheduler = CombatSchedulerAdapter.getAdaptiveScheduler(this);

this.fightManager = new FightManagerImpl(eventManager);
this.fightPearlService = new FightPearlServiceImpl(pluginConfig.pearl);
this.pearlService = new PearlServiceImpl(this.fightManager, pluginConfig, scheduler);
this.tridentService = new TridentServiceImpl(this.fightManager, pluginConfig);
this.fightTagOutService = new FightTagOutServiceImpl();
this.fightEffectService = new FightEffectServiceImpl();

Expand Down Expand Up @@ -179,7 +184,8 @@ public void onEnable() {
new FightBypassPermissionController(server, pluginConfig),
new FightBypassCreativeController(server, pluginConfig),
new FightActionBlockerController(this.fightManager, noticeService, pluginConfig, server),
new FightPearlController(pluginConfig.pearl, noticeService, this.fightManager, this.fightPearlService),
new PearlController(pluginConfig, this.pearlService, noticeService),
new TridentController(pluginConfig, noticeService, this.fightManager, this.tridentService),
new UpdaterNotificationController(updaterService, pluginConfig, this.audienceProvider, miniMessage),
new KnockbackRegionController(noticeService, this.regionProvider, this.fightManager, knockbackService, server),
new FightEffectController(pluginConfig.effect, this.fightEffectService, this.fightManager, server),
Expand Down Expand Up @@ -237,8 +243,8 @@ public RegionProvider getRegionProvider() {
}

@Override
public FightPearlService getFightPearlService() {
return this.fightPearlService;
public PearlService getFightPearlService() {
return this.pearlService;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import com.eternalcode.combat.fight.drop.DropSettings;
import com.eternalcode.combat.fight.effect.FightEffectSettings;
import com.eternalcode.combat.fight.knockback.KnockbackSettings;
import com.eternalcode.combat.fight.pearl.FightPearlSettings;
import com.eternalcode.combat.fight.pearl.PearlSettings;
import com.eternalcode.combat.fight.trident.TridentSettings;
import eu.okaeri.configs.OkaeriConfig;
import eu.okaeri.configs.annotation.Comment;
import java.time.Duration;
Expand Down Expand Up @@ -33,7 +34,14 @@ public class PluginConfig extends OkaeriConfig {
"# Settings related to Ender Pearls.",
"# Configure cooldowns, restrictions, and other behaviors for Ender Pearls during combat."
})
public FightPearlSettings pearl = new FightPearlSettings();
public PearlSettings pearl = new PearlSettings();

@Comment({
" ",
"# Settings related to Trident",
"# Configure cooldowns, restrictions, and other behaviors for Trident during combat."
})
public TridentSettings trident = new TridentSettings();

@Comment({
" ",
Expand Down

This file was deleted.

This file was deleted.

Loading