Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Control who can use EternalCombat’s powerful features with these permissions:
| 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.tag` | Start a fight between players using `/combatlog tag <player> [player2] [duration]`. |
| `eternalcombat.untag` | Remove a player from combat with `/combatlog untag <player>`. |
| `eternalcombat.untagall` | Remove all players from combat with `/combatlog untagall`. |
| `eternalcombat.stats` | View combat statistics with `/combatlog stats`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ void status(@Context CommandSender sender, @Arg Player target) {
@Permission("eternalcombat.tag")
@Priority(PriorityValue.HIGH)
void tag(@Context CommandSender sender, @Arg Player target) {
this.tag(sender, target, this.config.settings.combatTimerDuration);
}

@Execute(name = "tag")
@Permission("eternalcombat.tag")
@Priority(PriorityValue.HIGH)
void tag(@Context CommandSender sender, @Arg Player target, @Arg Duration time) {
UUID targetUniqueId = target.getUniqueId();
Duration time = this.config.settings.combatTimerDuration;

FightTagEvent event = this.fightManager.tag(targetUniqueId, time, CauseOfTag.COMMAND);

Expand All @@ -76,7 +82,12 @@ void tag(@Context CommandSender sender, @Arg Player target) {
@Execute(name = "tag")
@Permission("eternalcombat.tag")
void tagMultiple(@Context CommandSender sender, @Arg Player firstTarget, @Arg Player secondTarget) {
Duration combatTime = this.config.settings.combatTimerDuration;
this.tagMultiple(sender, firstTarget, secondTarget, this.config.settings.combatTimerDuration);
}

@Execute(name = "tag")
@Permission("eternalcombat.tag")
void tagMultiple(@Context CommandSender sender, @Arg Player firstTarget, @Arg Player secondTarget, @Arg Duration combatTime) {
MessagesSettings messagesSettings = this.config.messagesSettings;

if (sender.equals(firstTarget) || sender.equals(secondTarget)) {
Expand Down
Loading