Content generated with AI — it may contain mistakes.

ExyliaProtections/GuidesUpdated in v1.1.0

Raids

Lives, the core's health, kills, what a raid opens, siege windows, the offline shield, raid states and announcements, with every raids key.

Page 9 of 2515 min read

Raids give every protection a number of lives. Enemies take them by hitting the core, by blowing it up and by killing members inside. A protection with no lives left is raidable for a while: enemies may break, place and open containers in it, and anybody may walk in. When the raid ends the protection gets some lives back and a cooldown during which it cannot lose any.

Raids are off by default: they change how the whole server plays. Turn them on with submodules.raids in config.yml; every key on this page sits under raids in that file. Lives, raids and cooldowns are stored with the protection, so they are the same on every server of a network.

Turn on raids#

Switch them on

Run /protectionsadmin, click Settings, then Systems, and turn on Raids. Or set submodules.raids: true in config.yml and run /protectionsadmin reload.

Pick the numbers

Under Settings, then Raids, set the lives per tier, the core's health, how long a raid lasts and the cooldown. The defaults are 3, 4 and 5 lives for small, medium and large, a raid of 30 minutes and a cooldown of 120.

Optional: choose when raids happen

By default lives can be lost at any time. To limit it to certain hours, see Siege windows.

Check that it works#

With a second account that is not a member, break the core of a test protection: nothing breaks, and you see the action bar Core » 149/150 ┃ Lives » 3/3. After enough hits the protection loses a life, and the owner is told. Open the core's screen as the owner and click Lives in Defense: it shows the state (Safe, Shielded, ...). Hits are refused with a reason when the offline shield is up, so test with the owner online.

Who counts as an enemy#

A player is an enemy of a protection unless they are:

  • the owner,
  • a member, including through a clan added to it, and a tenant renting the whole protection,
  • a clan ally of the owner, while allies-are-friends is true (the default) and a clan plugin is installed.

Only enemies damage a core, take lives through kills and get the raid permissions. Anybody else breaking the core is refused as usual. The owner breaking it, or a player holding exyliaprotections.admin, is asked whether to pick it up, as always.

Lives#

Keys and defaults
KeyDefaultWhat it does
tier-livessmall: 3, medium: 4, large: 5Lives per tier
default-lives3Lives of a tier left out of tier-lives
regen-minutes60Minutes for one life to grow back. 0 turns it off
restore-price5000What buying one life back costs. 0 turns it off
restore-currencyblankCurrency of that price. Blank is the default currency

A protection's maximum is its tier's lives plus the bonus-lives of its level while upgrades are on (see Land tools). It is never below 1. Lowering a tier's lives in the config caps what protections already hold.

Growing back. One life grows back every regen-minutes, up to the maximum. The clock starts when the first life is lost, not when the protection was made, and unfinished progress is kept: with 60 minutes a life, a protection that lost two has one back after 60 minutes and both after 120. Nothing grows back while it is raidable.

Buying one back. Any member clicks Lives in the protection's Defense section, confirms, and pays restore-price in restore-currency for one life. It is refused while the protection is raidable or already full, and allowed during the cooldown. When the write fails, the price is paid back.

The core's health#

An enemy who breaks the core does not break it. The core takes damage instead, and loses a life when its health runs out.

Keys and defaults
KeyDefaultWhat it does
core-health150Health per life
tool-damageNETHERITE_PICKAXE: 4, DIAMOND_PICKAXE: 3, IRON_PICKAXE: 2Damage per hit by the item in the main hand
default-damage1Damage of a hit with anything else
hit-cooldown-millis500A player's hits closer together than this are ignored, silently
core-heal-seconds30Seconds without a hit before a damaged core is back to full health
hit-soundBLOCK_ANVIL_LAND|0.4|1.6The sound the attacker hears on each hit
allow-hidden-corefalseWhether cores may be hidden while raids are on. Off: every hidden core is shown again when raids turn on
selection-corestrueWhether land protected by selection gets a core while raids are on

Every hit deals at least 1. At the defaults one life costs 150 hits with an empty hand, or 38 with a netherite pickaxe. When health reaches 0 the protection loses a life and the core starts again at full health. After each hit the attacker sees an action bar, raids.hit-actionbar in the messages file: ⚔ Core » %health%/%max_health% ┃ Lives » %lives%/%max_lives%, which also takes %name%.

The core's health is kept only in the memory of the protection's server. A restart heals it, which changes little, because a core left alone for core-heal-seconds heals anyway.

Cores for selected land#

Land protected by selection has no core of its own. With selection-cores on (the default), a protection selected while raids are on gets one, placed on the first free block on the surface at its centre. Land selected before gets its core when raids turn on, on a reload, or when the server starts. A column with no free block within the protection's heights keeps it without one, and the console says so.

A protection without a core, and one whose core is hidden, loses lives only through kills. With allow-hidden-core: false, hiding a core is refused while raids are on, and cores hidden before raids were turned on are shown again: the block is put back wherever nothing took its place.

Explosions#

TNT, TNT minecarts and end crystals that go off within explosion-core-radius blocks of a shown core damage it by explosion-core-damage, through any walls, so burying a core does not keep it safe. Creepers and other mobs never do. A blast counts for the player who set it off, and never against land that player defends; one nobody set off, such as a cannon lit by redstone, counts as raids.unknown-raider in the messages file ("An explosion"). It counts even when the blocks were kept standing, but not when another plugin called the blast off. The same rules as a hit apply: cooldown, siege windows and the offline shield.

Keys and defaults
KeyDefaultWhat it does
explosion-core-radius4Blocks from a core within which those explosions damage it. 0 turns it off
explosion-core-damage25Core health one explosion takes. 0 turns it off
Core hits under the WORLDGUARD backend

Under the WORLDGUARD backend every protection is a WorldGuard region whose owner and members are the only ones allowed to build, so WorldGuard cancels an outsider's break of the core before this plugin sees it. With raids on, such a cancelled break by an enemy who is not the owner still counts as a hit; the core stays where it is either way. See Backends.

Kills#

Keys and defaults
KeyDefaultWhat it does
lives-per-kill1Lives an enemy takes by killing a member inside. 0 turns it off
kill-cooldown-minutes10Minutes before killing the same member in the same protection takes a life again

The victim must be the owner or a member, killed by an enemy player while standing inside that protection. The offline shield never applies to a kill, since the victim was online. A raid already running, the cooldown and closed siege windows still do. A kill that takes nothing is not told to the killer.

When lives cannot be taken#

A hit takes nothing, and the attacker is told why, when:

  1. raids are off,
  2. the protection is already raidable,
  3. it is in the cooldown after a raid,
  4. siege windows are on and none is open,
  5. the offline shield is up.

The attacker sees these refusals at most once every two seconds.

While it can lose lives#

A protection that can lose lives right now (raids on, not raidable yet, not cooling down, the offline shield down, and inside a window when siege windows are on) opens up to its enemies:

Keys and defaults
KeyDefaultWhat it does
attackers-ignore-locktrueEnemies may walk in although it is locked or they are banned from it, or a lock would keep its core out of reach
siege-pvptrueEnemies and defenders may fight inside even with its pvp flag off. Defenders among themselves still follow the flag

The raid#

Taking the last life starts the raid.

Keys and defaults
KeyDefaultWhat it does
raidable-minutes30How long the raid lasts
raidable-permissionsbreak, place, containers, doors, redstone, bucketsWhat enemies may do inside. Any role permission key
explosions-while-raidablefalseWhether explosions break blocks even with the protection's explosions flag off
lives-after-raid1Lives it has once the raid ends. Kept between 1 and the maximum
cooldown-minutes120Minutes after the raid during which it cannot lose lives

While it lasts:

  • Every player online on that server with raid announcements on is told that %raider% raided %name%, and for how long it is open (%time%, written like 30m; %minutes% still works).
  • Enemies have raidable-permissions inside, whatever the roles say. Members keep their own rights.
  • Anybody may enter, whatever the lock or the bans say.
  • Everybody standing inside sees a boss bar, raids.raidable-bar in the messages file: ⚔ %name% is raidable » %time_left% ⌚, red, draining as time runs out. It also takes %owner% and %raider%.
  • The protection cannot be picked up, moved, deleted, listed for sale, given away, offered for rent, upgraded or grown by a new core. A sale already listed is cancelled and the seller told.
  • Member perks stop, its public warp is refused or hidden, and new rents are refused.
  • On BlueMap and Dynmap it is drawn in the raidable colour at the next redraw.

The same refusal of pickup, move, delete, sale, gift, rent offer, upgrade and growing by a new core applies while the core is damaged and not yet healed.

The server ends raids once a second. When time runs out the protection has lives-after-raid lives and starts its cooldown. Short of the last life, each lost life is told to the attacker and to every defender online on that server, and written to the protection's log.

With the WORLDGUARD backend

While a protection is raidable its mirrored WorldGuard region lets everybody build and drops its entry denial. That is wider than raidable-permissions, which this plugin enforces itself. The region goes back to normal when the raid ends.

Siege windows#

With windows on, lives can only be lost at the times you choose.

Keys and defaults
KeyDefaultWhat it does
siege-windows.enabledfalseWhether lives can only be lost inside a window
siege-windows.timezoneblankTime zone the windows are read in, like Europe/Madrid. Blank or unknown is the server's
siege-windows.windowsSATURDAY 18:00-22:00, SUNDAY 18:00-22:00The windows
plugins/ExyliaProtections/config.yml
yaml
raids:
  siege-windows:
    enabled: true
    timezone: "Europe/Madrid"
    windows:
      - "SATURDAY 18:00-22:00"
      - "FRIDAY 23:00-02:00"
      - "DAILY 12:00-12:30"

A window is a day in English (MONDAY to SUNDAY), or DAILY for every day, a space, then HH:MM-HH:MM. The start is inside the window and the end is not. A window that ends before it starts runs past midnight into the next day: FRIDAY 23:00-02:00 is open on Saturday at 01:30. Lines that cannot be read are skipped.

When a window opens or closes, every player online with raid announcements on is told. A raid that started inside a window runs its full raidable-minutes, even past the window's end. With effects.no-flight-during-siege on, member flight stops while a window is open (see Land tools).

The offline shield#

The shield stops a core from being hit while nobody who defends the protection is online.

Keys and defaults
KeyDefaultWhat it does
offline-shield.enabledtrueWhether the shield is used
offline-shield.grace-minutes10Minutes after the last defender leaves this server before the shield goes up
offline-shield.clan-members-countfalseWhether members of a clan added to the protection count as defenders

The defenders are the owner and the player members, plus the members of added clans when clan-members-count is on. A defender online on the protection's server, or one who left it less than grace-minutes ago, keeps the shield down.

On a network the other servers are asked next, about the first 32 defenders. If none of them is online anywhere, the shield is up. If the answer does not come, the shield stays up and the land stays protected. The grace only counts players who left this server.

The shield blocks hits on the core only, never kills.

Raid states#

The Lives button, the Defense section and %exyliaprotections_protections_raid_state% show one of five states, checked in this order:

StateShown asWhen
RaidableRaidableA raid is running
Cooling downCooling downIn the cooldown after a raid
ShieldedShieldedEvery defender is offline, as far as this server can tell without asking the network
Under siegeUnder siegeSiege windows on and one open. With windows off, while the core is damaged
SafeSafeAnything else

With raids off the Defense section reads Off. The Lives button also shows the core's health, the time left of a raid or cooldown, and the restore price. The labels are state-safe, state-shielded, state-siege, state-raidable and state-cooldown in the messages file.

Announcements#

Raids, siege windows opening and closing, and protections abandoned by upkeep with upkeep.announce on, are sent to every player online on the server where they happen, and to its console. There is no network-wide announcement.

With ExyliaSurvivalCore installed, each player can mute them in /settings with the Raid announcements switch, the raid-announcements setting. The service is looked up on every announcement, so it applies as soon as the survival core is enabled. Without the survival core, or for a player it has no record of, everybody receives them.

The survival core also gets statistics from raids: protections.raids for the raider who took the last life, and protections.lives_lost for the owner of the protection that lost them.

Placeholders#

These read the protection the player stands in. They are blank outside one and while raids are off.

PlaceholderWhat it returns
%exyliaprotections_protections_lives%Lives left
%exyliaprotections_protections_max_lives%Lives at most
%exyliaprotections_protections_raid_state%The state label above

Raid replays#

With raids.replays.enabled on, the server records the minute before a protection becomes raidable so staff can watch how the core was taken. Replays go to ExyliaStaff's replays when its replay module is on, and to this plugin's own tables otherwise. It needs submodules.raids on and ExyliaLib's shared recording, and watching a replay needs replay support.

/protectionsadmin replays lists the replays of the protection you stand in: left-click watches one, shift-right-click deletes it. While watching, the controls show as an overlay; /protectionsadmin replays leave ends it.

Keys and defaults
KeyDefaultWhat it does
raids.replays.enabledfalseRecords raids.
raids.replays.seconds60Seconds before the raid each replay reaches back (10–300).
raids.replays.after-seconds3Seconds it carries on after the protection becomes raidable.
raids.replays.radius32Blocks around the core it covers (8–96).
raids.replays.keep-days30Days a replay kept by this plugin stays; 0 keeps them for good.

Admin#

Admins set a protection's lives (ending any raid and cooldown) or clear its raid for every life back, after a confirmation, from the admin screen, and the tier editor writes a tier's tier-lives. See Administration.

Sieges and the WORLDGUARD backend

Whether a siege lets enemies in or fight changes with the clock and with who is online, which a region written once cannot follow. With raids on, a mirrored region therefore gets no entry denial while attackers-ignore-lock is on and no pvp flag while siege-pvp is on; this plugin enforces both itself in either backend.

All keys#

The whole raids section of config.yml
plugins/ExyliaProtections/config.yml
yaml
submodules:
  raids: false
raids:
  tier-lives:
    small: 3
    medium: 4
    large: 5
  default-lives: 3
  core-health: 150
  tool-damage:
    NETHERITE_PICKAXE: 4
    DIAMOND_PICKAXE: 3
    IRON_PICKAXE: 2
  default-damage: 1
  replays:
    enabled: false
    seconds: 60
    after-seconds: 3
    radius: 32
    keep-days: 30
  hit-cooldown-millis: 500
  core-heal-seconds: 30
  hit-sound: "BLOCK_ANVIL_LAND|0.4|1.6"
  lives-per-kill: 1
  kill-cooldown-minutes: 10
  allies-are-friends: true
  raidable-minutes: 30
  lives-after-raid: 1
  cooldown-minutes: 120
  raidable-permissions: [break, place, containers, doors, redstone, buckets]
  explosions-while-raidable: false
  regen-minutes: 60
  restore-price: 5000
  restore-currency: ""
  allow-hidden-core: false
  explosion-core-radius: 4
  explosion-core-damage: 25
  attackers-ignore-lock: true
  siege-pvp: true
  selection-cores: true
  siege-windows:
    enabled: false
    timezone: ""
    windows:
      - "SATURDAY 18:00-22:00"
      - "SUNDAY 18:00-22:00"
  offline-shield:
    enabled: true
    grace-minutes: 10
    clan-members-count: false

The hit action bar and the raidable boss bar are raids.hit-actionbar and raids.raidable-bar in lang/<language>/messages.yml; files from before version 5 of config.yml had them in the config and are moved over on the first start.

Something missing on this page? Tell us on Discord