DUXPLIMA Documentation

Events

The seven event types, every key of an event, how several events pay at once, and the shipped ten.

An event pays experience into one track when something happens. Events live in any file in events/, under an events { } block, keyed by an id.

events {
  mining-ores {
    track = "mining"
    type = "mining"
    filter = ["DIAMOND_ORE", "DEEPSLATE_DIAMOND_ORE"]
    minimum = 10
    maximum = 25
    chance = 1.0
    cooldown-ms = 0
    action-bar = true
  }
}

The keys

KeyDefaultWhat it does
the block nameThe event's id: 1 to 48 lower-case letters, digits and hyphens. Unique across every file in events/
track"global"The track it pays into. A track no file declares makes the event pay nothing, with a console line
typeWhat happened; see the table below. Required
filter[]The blocks, mobs, items or foods it answers to, by name, without regard to case. Empty is everything of that type
amount1A fixed amount
minimum, maximumA range instead of amount; each payment rolls a whole number between them
chance1.0The probability it pays, 0.0 to 1.0
cooldown-ms0The least time between two payments of this event to one player
action-bartrueShow the gain over the hotbar, +12 Mining, for hud.gain-notice-ms
minimum-length0For chat only: the shortest message, in characters, that pays

The cooldown is taken only when the event pays, so a run of failed chance rolls does not hold it open. Cooldowns are kept in memory and forgotten when the player leaves.

The types

typeFires whenfilter names
playtimeEvery experience.playtime-interval-ms, for each player who is not idlenothing
miningA player breaks a blockThe block, such as DIAMOND_ORE
combatA player kills a mob or a playerThe entity type, such as ZOMBIE or PLAYER
fishingA player catches something on a lineThe item caught, such as COD
eatingA player eats or drinks an itemThe item, such as COOKED_BEEF or POTION
craftingA player takes a crafted resultThe result, such as IRON_PICKAXE. Pays per item of the result: a recipe that makes 4 pays 4 times the amount
chatA player sends a chat message of at least minimum-length charactersnothing

A block a player placed pays nothing when it is broken; see Anti-abuse. A kill pays only the player who struck last.

Several events at once

Every event that matches pays, each with its own chance and cooldown. Killing a player pays both combat-any and combat-player in the shipped files; mining diamond ore pays mining-any and mining-ores. Write the filters so the sums are what you mean.

The amount paid

The amount rolled is multiplied by the multipliers, rounded down, and then held to the hourly cap.

The shipped events

IdFileTrackTypeFilterAmountChanceCooldownAction bar
playtimegeneralglobalplaytime101.00no
fishinggeneralglobalfishing5 to 151.00yes
eatinggeneralglobaleating20.510 sno
craftinggeneralglobalcrafting11.00no
chatgeneralglobalchat, 12 characters11.060 sno
mining-anyminingminingmining11.00no
mining-oresminingminingminingcoal, iron, gold, diamond and emerald ores and their deepslate forms, ancient debris10 to 251.00yes
combat-anycombatcombatcombat31.00no
combat-playercombatcombatcombatPLAYER25 to 501.0120 syes
combat-bosscombatcombatcombatENDER_DRAGON, WITHER, WARDEN5001.00yes

When a file is wrong

Two events with one id, a type the plugin does not know, a chance outside 0 to 1 or a negative amount stop the load, and the console names the file and the event. At a reload the rules that worked stay.

Related: Tracks, Event files, Anti-abuse