Manage allies and rivals
Alliances are mutual and asked for; rivalries are one-sided and declared. What each one changes.
Let clans team up with allies, declare rivals, and decide how friendly fire, name colours and the truce after a kick behave.
Before you start#
- Both clans need the
alliesmodule for alliances and therivalsmodule for rivalries (both on by default), see Turn clan systems on and off. - The member needs the rank permission, see Ranks:
SEND_ALLIANCE_REQUEST,ACCEPT_ALLIANCE,REMOVE_ALLYorMANAGE_RIVALS.
Steps#
An alliance is a request and an answer. A rivalry is a declaration with nothing to accept.
Ask for the alliance
As a member of the first clan, run /clan ally add <clan>.
Answer it
Members of the other clan who have ACCEPT_ALLIANCE are told. They run /clan ally accept <clan> (or /clan ally decline <clan>). The request expires after 60 seconds by default (settings.invite-expire-seconds; 0 keeps it open until answered).
Declare a rival if you want one
Run /clan rival add <clan>, or run /clan, click Rivals then Declare rival. The other clan becomes your rival without answering, and does not become yours in return.
To end them, /clan ally remove <clan> (it ends the alliance for both clans) and /clan rival remove <clan>.
Check that it works#
Run /clan and click Allies or Rivals: the other clan is listed. Allied members cannot hurt each other while at least one clan has friendly fire off. A clan is refused when it is at its cap (5 allies and 10 rivals by default, plus level bonuses, see Levels), when the clans are already allied, or when you try to rival an ally.
What an alliance changes#
- Friendly fire. Allies cannot hurt each other unless both clans have friendly fire on.
- Colour. Allies are painted according to the visibility mode, see below.
- Waypoints. An ally's clan home appears as a waypoint for your members.
- Ally chat.
/clan chatcycles to a channel that reaches your clan and every ally;@sends a single line there. See Chat and mail. - Placeholders. Ally lists and totals, see Placeholders.
What a rivalry changes#
rivals:
kill-exp-multiplier: 2.0
kill-stat-multiplier: 1.0
notify-target-on-declare: true| Setting | Effect |
|---|---|
kill-exp-multiplier | Kill EXP is multiplied by this when the victim was in a rival clan. 1.0 is no bonus. |
kill-stat-multiplier | The clan's recorded kill count is multiplied by this for a rival kill (rounded half up). |
notify-target-on-declare | Whether the declared clan is told, at most once every two minutes per declaring clan. |
Rivals are also what /clan camp reads. kill-stat-multiplier only changes the clan's kills leaderboard; a player's own kill count still records one.
How a player is coloured#
settings:
visibility-mode: DISABLED| Mode | Who is painted |
|---|---|
DISABLED | Nobody. The shipped default. Names are what TAB or your own plugin draws. |
CLAN_ONLY | Clanmates and yourself, green. |
ALLY_ONLY | Allies and yourself, aqua. |
CLAN_AND_ALLY_MIXED | Clanmates and yourself green; allies aqua and glowing. |
UNIFIED | Clanmates, allies and yourself, all in one colour. |
The colour is per viewer, so two players can see the same third player differently. It needs PacketEvents; without it every mode behaves as DISABLED. An unknown value falls back to DISABLED and is reported in the console.
Out of the box the plugin touches no nametag and creates no scoreboard team. A focus still makes its target glow, but not red, because red needs the team that DISABLED never creates. Choose one of the other four modes to get the colours back.
Friendly fire#
/clan ff toggles it for the clan and needs TOGGLE_FRIENDLY_FIRE.
| Pair | Damage lands when |
|---|---|
| Same clan | The clan has friendly fire on, or the world is in forced-ff-worlds |
| Mutual allies | Both clans have it on, or the world is forced |
| Anyone else | Always, unless a kick truce is running |
forced-ff-worlds (shipped [], under settings) overrides every clan's choice: use it for an arena world where everyone fights everyone. A player with no clan is never protected. Projectiles count for whoever fired them.
The truce after a kick#
kick-protection:
enabled: true
duration-seconds: 120Kicking or banning a player starts a two-minute truce between them and the clan they left. While it runs no damage passes in either direction between that player and anybody still in the clan, or in a clan allied with it. The attacker is told why, with the seconds left. It starts from every route out: the kick and ban buttons, /clan kick, /clan ban and /clanadmin forcekick.
It is checked before the friendly-fire rules, so a kicked player cannot be finished off in an arena world either. Set enabled: false to make a kicked player fair game immediately.
Going further#
Admins can write relations directly, with no request, no cap check and no rank check:
/clanadmin addally <clanA> <clanB>and/clanadmin removeally <clanA> <clanB>/clanadmin addrival <clanA> <clanB>and/clanadmin removerival <clanA> <clanB>
Technical details
Alliances and rivalries live in the table clan_relations, stored per direction: one row means "clan A regards clan B this way". An alliance needs both rows, a rivalry one. Accepting an alliance writes both rows at once and removing deletes both. Pending requests live in clan_alliance_requests, so they survive a restart and can be answered from any server of a network; only members with ACCEPT_ALLIANCE are told a request arrived, and the asking clan is told when it expires. See Database.
| Refused when | Message |
|---|---|
| Either clan is at its alliance cap | errors.max-allies / errors.target-max-allies |
| The clans are already allied | errors.already-allies |
| A request is already pending | errors.alliance-request-already-sent |
| Accepting with nothing pending | errors.alliance-request-not-found |
| At the rival cap | errors.max-rivals |
| Already declared as a rival | errors.already-rivals |
| The target is an ally | errors.cannot-rival-ally |
Every clan reachable through alliances is put on one client-side team, so allies show as teammates on a modified client. Where TAB is installed its own team handling is paused for a player this plugin is colouring and resumed when they leave a clan. On a network the truce follows the kicked player to whichever server they join.
Something missing on this page? Tell us on Discord