-
Notifications
You must be signed in to change notification settings - Fork 0
Curses
Curses are data-driven afflictions defined entirely through YAML configuration. Create custom curses by adding files to the plugins/Afflictions/afflictions/ folder.
File: curse_weakness.yml
A debilitating curse that saps strength and slows movement. Always active.
| Level | Effects |
|---|---|
| 1 | Weakness I, Slowness I, -1 attack damage |
| 2 | Weakness I, Slowness I, -1.5 attack damage |
| 3 | Weakness II, Slowness I, -2 attack damage |
File: curse_blindness.yml
A curse that clouds vision during daylight hours. Only active during the day.
| Level | Effects |
|---|---|
| 1 | Blindness, Slowness I |
| 2 | Blindness, Slowness I |
| 3 | Blindness, Slowness II |
Duration: 10 minutes + 5 minutes per level
File: curse_decay.yml
A wasting curse that slowly drains life force. The most dangerous curse.
| Level | Effects |
|---|---|
| 1 | Wither I, Hunger I, -2 max health, 0.5 damage/5s |
| 2 | Wither I, Hunger I, -3 max health, 0.75 damage/5s |
| 3 | Wither I, Hunger II, -4 max health, 1.0 damage/5s |
| 4 | Wither I, Hunger II, -5 max health, 1.25 damage/5s |
| 5 | Wither II, Hunger III, -6 max health, 1.5 damage/5s |
Duration: 5 minutes + 1 minute per level
Create a new YAML file in plugins/Afflictions/afflictions/ with the prefix curse_:
curse_yourname.yml
display:
name: "<#ff0000>Cursed One" # What the player "is"
affliction: "<#cc0000>Your Curse" # The curse name
prefix: "<#cc0000>[C] " # Chat prefix
description: "Description here."
settings:
enabled: true
max-level: 3
stackable: false
duration:
type: permanent # permanent, fixed, or level-scaled
base-duration: 0 # seconds (for fixed/level-scaled)
level-scaling: 0 # additional seconds per level
trigger:
type: always # When effects apply
inverted: false
effects:
potions: [] # Potion effects
damage:
enabled: false
attributes: [] # Attribute modifiers
particles:
enabled: false
sound:
enabled: false
levels:
1:
title: "Level 1 Title"
2:
title: "Level 2 Title"| Type | Description |
|---|---|
always |
Effects always active |
day |
Active during daytime only |
night |
Active during nighttime only |
full_moon |
Active during full moon |
new_moon |
Active during new moon |
Set inverted: true to reverse the condition.
effects:
potions:
- type: WEAKNESS # Bukkit PotionEffectType
base-amplifier: 0 # Amplifier at level 1 (0 = level I)
level-scaling: 0.5 # Added per curse level
ambient: true # Subtle particles
particles: false # Show potion particles
icon: true # Show in HUDCommon potion types: WEAKNESS, SLOWNESS, BLINDNESS, WITHER, HUNGER, MINING_FATIGUE, POISON
effects:
damage:
enabled: true
base-damage: 1.0 # Damage at level 1
level-scaling: 0.5 # Added per level
bypass-armor: true # Ignore armor
tick-interval: 100 # Ticks between damage (20 = 1 second)effects:
attributes:
- attribute: GENERIC_MAX_HEALTH
base-amount: -2.0 # Amount at level 1
level-scaling: -1.0 # Added per level
operation: ADD_NUMBER # ADD_NUMBER, ADD_SCALAR, MULTIPLY_SCALAR_1Common attributes:
-
GENERIC_MAX_HEALTH- Maximum hearts -
GENERIC_MOVEMENT_SPEED- Walk speed -
GENERIC_ATTACK_DAMAGE- Melee damage -
GENERIC_ATTACK_SPEED- Attack cooldown -
GENERIC_ARMOR- Armor points
effects:
particles:
enabled: true
type: WITCH # Bukkit Particle type
count: 3 # Particles per spawn
offset-x: 0.3 # Random spread X
offset-y: 0.5 # Random spread Y
offset-z: 0.3 # Random spread Z
speed: 0.01 # Particle speed
height-offset: 1.0 # Height above player
tick-interval: 40 # Ticks between spawnseffects:
sound:
enabled: true
type: AMBIENT_CAVE # Bukkit Sound type
volume: 0.3 # 0.0 - 1.0
pitch: 0.8 # 0.5 - 2.0
tick-interval: 200 # Ticks between sounds
play-on-apply: true # Play when curse is applied
play-on-remove: false # Play when curse is removedmessages:
on-apply: "<#666666>A curse befalls you..."
on-remove: "<#85bb65>The curse lifts!"
on-effect-start: "<#666666>The curse activates!" # When trigger becomes true
on-effect-end: "<#85bb65>The curse fades..." # When trigger becomes false| Type | Description |
|---|---|
permanent |
Never expires |
fixed |
Expires after base-duration seconds |
level-scaled |
Duration = base-duration + (level × level-scaling)
|
By default, curses don't stack (stackable: false). Applying the same curse again refreshes duration and updates level.
With stackable: true, players can have multiple instances of the same curse.
After creating or modifying curse files:
/aff reload
New curses are automatically discovered and registered.