跳到主要内容

Creating Events

webapp_banner.jpg

This guide is for EliteMobs 7.3.4 and later

What are Custom Events?

Custom Events here refer to events that occur randomly in-game, whether based on player actions or having a timed trigger. The plugin comes preloaded with a number of Custom Events, such as the Balrog event, the Kraken event and the Treasure Goblin events, to name a few.

This system is called Custom Events because the events can not only be customized but created from scratch. What follows is a guide on how to create and customize your own events.

Common configuration settings

The following settings can/should be used for both action and timed events.


isEnabled

Sets if the event is enabled.

KeyValuesDefault
isEnabledBooleantrue
Example
isEnabled: true

eventType

Sets the type of event.

KeyValuesDefault
eventTypeBREAK_BLOCK / FISH / TILL_SOIL / TIMEDnone

Note that BREAK_BLOCK, FISH and TILL_SOIL are Action Events and TIMED is Timed Events

Example
eventType: BREAK_BLOCK

bossFilenames

Sets the list of bosses which will be spawned. Mandatory!

KeyValuesDefault
bossFilenamesString Listnone
Example
bossFilenames:
- balrog.yml
- my_event_boss.yml

announcementPriority

Sets the announcement priority.

KeyValuesDefault
announcementPriorityIntegernone
Example
announcementPriority: 1

startMessage

Sets the message sent at the start of the event.

KeyValuesDefault
startMessageStringnone
Example
startMessage: An event has started!

create_events_start_message.jpg


endMessage

Sets the message sent at the end of the event.

KeyValuesDefault
endMessageStringnone
Example
endMessage: An event has ended!

create_events_end_message.jpg


eventStartCommands

Sets the commands that run at the start of the event.

KeyValuesDefault
eventStartCommandsString Listnone
Example
eventStartCommands:
- say The event now starts!!
- "$chance=0.5$ say What a spawn!"

create_events_start_commands.jpg


eventEndCommands

Sets the commands that run at the end of the event.

KeyValuesDefault
eventEndCommandsString Listnone
Example
eventEndCommands:
- say The event ends, so sad.
- "$chance=0.5$ say Too slow bud!"

create_events_end_commands.jpg


Event Config Example
isEnabled: true
bossFilenames:
- "cool_boss.yml"
- "other_cool_boss.yml"
announcementPriority: 3
startMessage: "Cool event is starting!"
endMessage: "Cool event is ending!"
eventStartCommands:
- say The event started!
eventEndCommands:
- say The event ended!

Action Events

Events that have a chance of running when a specific action, such as breaking a block or fishing, happen.

chance

Sets the chance of the event happening when the action happens.

KeyValuesDefault
chanceValue between 0.0 and 1.00
Example
chance: 0.001

breakableMaterials

Sets the list of materials to check if the action is set to BREAK_BLOCK.

KeyValuesDefault
breakableMaterialsList of materialsnone
Example
breakableMaterials:
- BEEHIVE
- BIRCH_WOOD

Config Example
chance: 0.001
breakableMaterials:
- COAL_ORE

Sets a 0.1% chance of running the event when a coal ore block is broken, assuming that the event type is BREAK_BLOCK.

Timed Events

Timed Events are events that happen at configurable time intervals. Once the cooldown for a timed event is over, a random timed event is picked from the list of timed events based on the weight of the event.

spawnType

Sets the Custom Spawn used by the event, which defines where the boss can spawn.

KeyValuesDefault
spawnTypeFilenamenone
Example
spawnType: nether_spawn.yml

localCooldown

Sets the amount of time, in minutes, before this event can be picked again.

KeyValuesDefault
localCooldownInteger0
Example
localCooldown: 120

globalCooldown

Sets the amount of time, in minutes, before the next event will be picked.

KeyValuesDefault
globalCooldownInteger0
Example
globalCooldown: 60

weight

Sets the weight of the event, affecting the chance that it will be picked over other events. Recommended: 100.

KeyValuesDefault
weightDouble0
Example
weight: 60.5

eventDuration

Sets the maximum duration of the event, in minutes.

KeyValuesDefault
eventDurationInteger0
Example
eventDuration: 30

eventEndsWithBossDeath

Sets if the event ends with the boss death.

KeyValuesDefault
eventEndsWithBossDeathBooleantrue
Example
eventEndsWithBossDeath: true

eventEndTime

Sets the in-game time at which the event will end.

KeyValuesDefault
eventEndTimeBooleantrue
Example
eventEndTime: true

minimumPlayerCount

Sets the minimum amount of online players before the event will start.

KeyValuesDefault
minimumPlayerCountInteger1
Example
minimumPlayerCount: true

Note that events get queued, meaning they will only start once the conditions defined in the customSpawn are met.

Events Config Example
isEnabled: true
bossFilenames:
- "cool_boss.yml"
- "other_cool_boss.yml"
announcementPriority: 3
startMessage: "Cool event is starting!"
endMessage: "Cool event is ending!"
eventStartCommands:
- say The event started!
eventEndCommands:
- say The event ended!
customSpawn: "myCoolSpawn.yml"
localCooldown: 30
globalCooldown: 15
weight: 100
eventDuration: 20
eventEndsWithBossDeath: true
eventEndTime: 10000
minimumPlayerCount: 5