Event System Overview
The war event system is managed byEventManager and WarEvent classes, providing:
- Scheduled automatic events based on configurable time frames
- Real-time scoring for kills and mob defeats
- Boss bar progress display
- Discord webhook integration
- Configurable rewards for top performers
Event Configuration
War events are configured in theevents.yml file under events.clan-war-event:
The event automatically starts at the configured time frames if the minimum player count is met.
Starting and Ending Events
Automatic Scheduling
Events start automatically when:- Current server time matches a configured
event-time-frame - Online player count meets or exceeds
minimum-player-online - Events are enabled in the configuration
Manual Control
Administrators can manually start or end events:Manual start bypasses the minimum player requirement. Use the optional parameter to enforce it:
/clansplusadmin event start trueEvent Duration
Events run for the configuredevent-time duration (in seconds). A boss bar displays the remaining time to all online players.
Scoring System
Score Sources
Clans earn points during war events from multiple sources:Player Kills
Killing enemy clan members awards points:- Configured in
score-settings.player - Only counts kills against non-allied clans
- Dodge skill can prevent kills from counting
- Boost Score skill adds bonus points
WarEvent.java:352):
Vanilla Mobs
Killing vanilla Minecraft mobs awards points based on mob type:EntityType names in uppercase.
MythicMobs
If MythicMobs plugin is installed, custom mobs can award points:MythicMobs integration is automatically detected. Points are configured by the mob’s internal name.
World Requirements
Optionally restrict scoring to specific worlds:Leaderboards
The war event tracks multiple leaderboards:Clan Score Leaderboard
Tracks total points earned by each clan during the event:- Displayed in event ending messages
- Used to determine reward distribution
- Persists to permanent clan score
Player Damage Leaderboards
Two player-specific leaderboards:- Most Damage Caused - Total damage dealt to enemy players
- Most Damage Collected (Tank) - Total damage received from enemy players
- Track damage in real-time during the event
- Are cleared when the event ends
- Can award individual player rewards
Viewing Leaderboards
Leaderboards are displayed:- In event ending broadcast messages
- Through PlaceholderAPI (during events)
- Via Discord webhooks
- In the event ending rewards
The number of top positions displayed is configured with
messages.event-ending.max-top.Event Notifications
Boss Bar
A boss bar displays event progress to all players:BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW
Supported styles: SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
Sound Effects
Configure sounds for event start and end:Join Notifications
Players joining during an active event can receive notifications:config.yml to prevent spam on join.
Rewards and Prizes
Clan Rewards
Top clans receive war points and execute custom commands:%clan%- Winning clan name%top%- Position (1, 2, 3, etc.)
Player Rewards
Reward individual players for damage performance:%player%- Player name%clan%- Player’s clan name
War points awarded to players are added to their clan’s total war point balance.
Discord Integration
War events can send rich embeds to Discord via webhooks:Starting Message
Configure indiscordsrv-warevent-starting.json:
Ending Message
Configure indiscordsrv-warevent-ending.json with leaderboard placeholders:
%topScoreClaimed_<top>_name%- Clan name at position%topScoreClaimed_<top>_score%- Clan score at position%topDamage_<top>_name%- Top damage dealer name%topTank_<top>_name%- Top tank name%totalDamagesCaused%- Total damage in event%totalScoreCollected%- Total score earned
Set the Discord webhook URL in
config.yml under soft-depend.discord-webhook.url.Combat Features
Friendly Fire Protection
During war events:- Clan members cannot damage each other
- Allied clans cannot damage each other
- Self-damage is prevented
WarEvent.java:313):
Skill Integration
Clan skills affect war event performance:- Boost Score - Adds bonus points to kills
- Critical Hit - Chance to deal increased damage
- Dodge - Chance to avoid damage entirely
- Life Steal - Heal from damage dealt
Combat Cooldown
Prevent players from using certain commands during combat:Event Statistics
The WarEvent class tracks comprehensive statistics:| Statistic | Type | Description |
|---|---|---|
playerDamagesCaused | HashMap<String, Long> | Damage dealt by each player |
playerDamagesCollected | HashMap<String, Long> | Damage taken by each player |
clanScoreCollected | HashMap<String, Long> | Points earned by each clan |
TIMELEFT | long | Remaining event time in seconds |
STARTING | boolean | Whether event is currently active |
Statistics are reset when each event ends to ensure clean data for the next event.
