Configuration
On this page(3)
SnHostGiveaway ships with the following YAML files. New keys are auto-merged on boot; your edits and comments are preserved.
config.yml
# ============================================================
# SnHostGiveaway - configuration
# Managed by SnLib: new keys are auto-merged on boot; your values and
# comments are preserved. Do NOT add a config-version key (retired).
# Set update-configs: false to freeze this file (SnLib only warns about
# missing keys instead of inserting them).
# Sections marked "# sn:extensible" are yours: entries you delete there
# stay deleted.
# ============================================================
# Active language code; loads lang/messages_<code>.yml (falls back to en).
lang: en
# Master switch of the SnLib auto-updater for this plugin's managed files.
update-configs: true
# Runtime debug output (also toggleable live via /giveaway debug).
debug:
# Master toggle of the debug output.
enabled: false
# Verbosity threshold: OFF, INFO, DEBUG or TRACE.
level: DEBUG
# Category filter; an empty list lets every category through.
categories: []
# ------------------------------------------------------------
# Main command.
# ------------------------------------------------------------
command:
# Aliases of /giveaway. Re-read on /giveaway reload.
aliases: [gw]
# ------------------------------------------------------------
# Database. type=sqlite needs nothing else; type=mysql reads host/port/etc.
# ------------------------------------------------------------
database:
# sqlite or mysql
type: sqlite
# MySQL connection (ignored when type is sqlite). Every server needs its OWN database (or table
# prefix): startup recovery refunds every unfinished giveaway it finds in it.
host: localhost
port: 3306
database: snhostgiveaway
username: root
password: ""
# ------------------------------------------------------------
# Economies a giveaway can be hosted in. The map key is the economy id:
# it is what players type in /giveaway host <id> <amount>, lowercase.
#
# type: vault the server's Vault economy. Needs Vault plus an economy
# plugin (EssentialsX, CMI, ...) registered with it.
# type: command give-command / take-command run as console, and
# balance-placeholder (PlaceholderAPI) to read the balance.
# type: edtools an EdTools currency, named by "currency".
# type: sncredits SnCredits through its Paper bridge (SnCredits-Bridge).
# Whole credits only (decimals is always 0). The prize is
# taken with the bridge console command and the giveaway
# starts once the proxy confirms the new balance; with no
# confirmation within confirm-timeout the giveaway is refused
# and the console logs what to check and refund by hand.
# An enabled economy whose plugin is missing is not offered to players, and
# the console names it once per load.
#
# min, max and the typed amount are in whole units; "decimals" sets how many
# fractional digits are accepted (0 to 4). Changing "decimals" of an economy
# while one of its giveaways is still unpaid rescales that prize.
#
# New example entries are never added to an existing file; delete the whole
# "economies:" block to get the current examples back.
# ------------------------------------------------------------
# sn:extensible
economies:
credits:
# Backend: vault, command, edtools or sncredits.
type: sncredits
# Whether players can host giveaways in this economy.
enabled: true
# Name shown in messages and in the show.
display-name: "&6Credits"
# How an amount is shown; {amount} is the number with grouping separators.
format: "&6{amount} Credits"
# Smallest amount a giveaway may be hosted with (k/m/b suffixes accepted).
min: 10
# Largest amount a giveaway may be hosted with; 0 means no cap.
max: 0
# Extra permission needed to host in this economy; empty needs none.
permission: ""
# Item the show uses as the prize icon.
icon: SUNFLOWER
# SnCredits-Bridge console command, without the slash; "give" and
# "remove" are sent through it to the proxy.
command: "credits"
# Ticks to wait for the proxy to confirm the prize was taken (20 = 1s).
confirm-timeout: 100
gems:
# Backend: vault, command, edtools or sncredits.
type: edtools
# Whether players can host giveaways in this economy.
enabled: true
# Name shown in messages and in the show.
display-name: "&bGems"
# How an amount is shown; {amount} is the number with grouping separators.
format: "&b{amount} Gems"
# Fractional digits accepted and shown (0 to 4).
decimals: 0
# Smallest amount a giveaway may be hosted with (k/m/b suffixes accepted).
min: 10
# Largest amount a giveaway may be hosted with; 0 means no cap.
max: 0
# Extra permission needed to host in this economy; empty needs none.
permission: ""
# Item the show uses as the prize icon.
icon: EMERALD
# EdTools currency id. Prizes are credited without boosters.
currency: "gems"
money:
# Backend: vault, command, edtools or sncredits.
type: vault
# Whether players can host giveaways in this economy.
enabled: false
# Name shown in messages and in the show.
display-name: "&aMoney"
# How an amount is shown; {amount} is the number with grouping separators.
format: "&a${amount}"
# Fractional digits accepted and shown (0 to 4).
decimals: 2
# Smallest amount a giveaway may be hosted with (k/m/b suffixes accepted).
min: 1000
# Largest amount a giveaway may be hosted with; 0 means no cap.
max: 0
# Extra permission needed to host in this economy; empty needs none.
permission: ""
# Item the show uses as the prize icon.
icon: GOLD_INGOT
tokens:
# Backend: vault, command, edtools or sncredits.
type: command
# Whether players can host giveaways in this economy.
enabled: false
# Name shown in messages and in the show.
display-name: "&eTokens"
# How an amount is shown; {amount} is the number with grouping separators.
format: "&e{amount} Tokens"
# Fractional digits accepted and shown (0 to 4).
decimals: 0
# Smallest amount a giveaway may be hosted with (k/m/b suffixes accepted).
min: 100
# Largest amount a giveaway may be hosted with; 0 means no cap.
max: 0
# Extra permission needed to host in this economy; empty needs none.
permission: ""
# Item the show uses as the prize icon.
icon: SUNFLOWER
# Console command that pays a winner or refunds a host; {player} and
# {amount} are replaced. Required: without it the economy is not loaded.
give-command: "tokens give {player} {amount}"
# Console command that takes the prize from the host; {player} and
# {amount} are replaced.
take-command: "tokens take {player} {amount}"
# PlaceholderAPI placeholder with the player's balance as an exact,
# unabbreviated number. It is the only proof that take-command worked: a
# render that rounds ("1.5M") cannot show a small amount leaving, so such
# amounts are refused before anything is taken.
balance-placeholder: "%tokens_balance%"
# ------------------------------------------------------------
# Giveaway rules. Everyone online takes part except the host, players
# with snhostgiveaway.exempt and vanished players.
# ------------------------------------------------------------
giveaway:
# Fewest participants (counted after every filter) a giveaway needs to start.
min-participants: 1
# Throws of the payout phase; the counter over the winner climbs to the
# full prize in this many steps (at most 64). 0 shows no counter.
payout-steps: 4
# Only one account per IP address takes part: the one with the most
# playtime. Accounts on the host's IP never take part. Behind a proxy it
# needs the real player IPs forwarded (Velocity modern forwarding).
one-account-per-ip: true
# ------------------------------------------------------------
# Limits.
# ------------------------------------------------------------
limits:
# Time a player waits between two hosted giveaways (30s, 10m, 1h, 1d).
# 0 disables it. snhostgiveaway.bypass.cooldown skips it.
host-cooldown: 1h
# Materials that cannot be given away with /giveaway host hand.
hand-blacklist:
- BEDROCK
- BARRIER
- COMMAND_BLOCK
- CHAIN_COMMAND_BLOCK
- REPEATING_COMMAND_BLOCK
- STRUCTURE_BLOCK
- JIGSAW
- DEBUG_STICK
- SPAWNER
- END_PORTAL_FRAME
# ------------------------------------------------------------
# Chat announcements, sent to every online player (also to those who
# turned the show off with /giveaway toggle).
# ------------------------------------------------------------
announcements:
# Announce a giveaway when it starts.
start: true
# Announce the winner when the roulette stops.
winner: true
# Announce a giveaway cancelled with /giveaway cancel.
cancel: trueshow.yml
# ============================================================
# SnHostGiveaway - show.yml
# The per-player giveaway show: texts, timeline, stage, colors, blocks, sounds and particles.
# Managed by SnLib: new keys are merged on every start; your values and comments are kept.
# /giveaway reload re-reads this file; a show that is already running keeps the values it
# started with.
# ============================================================
# Worlds where players do not see the show (names, any case). Taking part, the winner, the payout
# and the chat announcements are unchanged there; only the show itself (the stage, the titles and
# the sounds) is left out. A player who changes world mid-show loses it or gets it at once. The
# preview (/giveaway preview) ignores this list.
hidden-worlds: []
# Texts of the show. Color codes, &#RRGGBB hex and MiniMessage work.
# Placeholders: {host} the sponsor, {prize} the prize, {winner} the winner,
# {name} the participant under the roulette pointer, {count} the number of participants,
# {step} the payout label of the current throw (counter only).
texts:
# Title lines over the sponsor while the show opens.
entry-title:
- "&e&lGIVEAWAY"
- "&7sponsored by"
- "₢f2&l{host}"
- "&7Prize: &a{prize}"
# Title lines over the roulette while it spins.
roulette-title:
- "₢f2&lGIVEAWAY &8- &a{prize}"
- "&7{count} participants"
# Title lines once the roulette stopped on the winner.
winner-title:
- "&a&lWINNER!"
- "&7Prize: &a{prize}"
# Name under the center head while the roulette spins.
roulette-name: "&f{name}"
# Name under the center head once the roulette stopped.
winner-name: "&6&l{winner}"
# Marker over the center head of the roulette.
marker-top: "&e▼"
# Marker under the center head of the roulette.
marker-bottom: "&e▲"
# Tag lines over the winner mannequin.
winner-tag:
- "&a&lWINNER"
- "&6{winner}"
# Counter over the winner, rewritten on every payout throw.
counter: "&a&l{step}"
# Length of each phase in ticks (20 ticks = 1 second). The show's timeline advances every
# 2 ticks, so odd values round up. The defaults last about 20 seconds.
timeline:
# Phase 1: the sponsor appears seated, with the title.
entry: 50
# Phase 2: the sponsor glides aside and the panel appears.
transition: 30
# Phase 3: the roulette spins and rests on the winner (includes roulette.final-hold).
roulette: 160
# Phase 4: the winner is revealed and appears on the platform.
winner: 40
# Phase 5: the sponsor throws the prize to the winner.
payout: 100
# Phase 6: everything vanishes in one puff; the show ends this long after it.
close: 20
# Ticks the elements take to shrink away in the final puff (never longer than close).
vanish: 4
# Ticks the sponsor takes to glide aside.
glide: 20
# Ticks an element takes to grow in when it appears.
grow: 8
# Ticks the winning head takes for its full turn in place when it is revealed (0 = no turn, up to 200).
head-spin: 16
# Ticks after the reveal before the winning head flies to the winner (never before the turn ends).
head-fly-delay: 20
# Ticks the winning head takes to fly to the winner.
head-fly: 12
# Ticks one thrown prize takes to reach the winner (shortened when the throws do not fit).
throw-flight: 10
# The roulette strip.
roulette:
# Heads that scroll past the center before the strip stops on the winner.
steps: 36
# Strength of the slowdown: 1 = constant speed, higher = faster start and a longer slowdown.
ease-power: 3.0
# Ticks the strip rests on the winner before the winner phase.
final-hold: 16
# Degrees between two heads on the curved strip.
slot-angle: 8.0
# Radius in blocks of the curve the heads sit on.
radius: 7.0
# Extra turn in degrees of every head around its vertical axis (180 shows the back of the heads).
head-turn: 0.0
# Width in blocks of the highlight behind the center head.
highlight-width: 0.95
# Height in blocks of the highlight behind the center head.
highlight-height: 0.95
# The stage in front of each viewer. Distances are in blocks; heights are above the stage floor;
# sideways offsets are to the viewer's right (negative = left); depth is away from the viewer
# when negative.
stage:
# How the stage keeps up with a viewer who moves or turns:
# locked = the texts, the panel and the roulette turn with the camera at once, so they are
# always in front; the mannequins catch up a moment later.
# smooth = the whole stage moves as one block and settles in front of the viewer.
# off = the stage stays where it was drawn.
# In both following modes the stage glides after a viewer who walks.
follow: locked
# Ticks a followed move takes to glide (1 to 10; 3 keeps the props in step with the mannequins).
follow-glide: 3
# Distance from the viewer's eyes to the stage.
distance: 6.0
# Closest the stage comes when a wall is in the way.
min-distance: 2.5
# A teleport farther than this from the stage redraws the show in front of the viewer.
reanchor-distance: 12.0
# Height of the stage floor relative to the eyes of a standing viewer (-1.62 = the viewer's feet).
floor: -1.62
# Sideways offset of the sponsor (to the left) and the winner (to the right).
side: 4.2
# Height of the bottom line of the title over the roulette.
title-height: 3.0
# Height of the bottom line of the title while the show opens, over the sponsor.
entry-title-height: 2.4
# Height of the center of the roulette heads.
strip-height: 1.9
# Height of the name under the center head.
name-height: 0.65
# Gap between the center of the roulette heads and each marker.
marker-gap: 0.5
# Height of the center of the panel. The panel's center and size are as it looks at the heads:
# it stands behind them and is drawn larger to make up for the distance.
panel-center: 1.69
# Width of the panel (never narrower than the strip of heads).
panel-width: 6.6
# Height of the panel (the defaults end it just under the title and just under the name).
panel-height: 2.38
# Depth of the panel behind the heads (pushed further back when a head would poke through it).
panel-depth: -0.9
# Height of the winner tag above the platform.
tag-height: 2.15
# Height of the payout counter above the platform.
counter-height: 2.75
# Height of the arc of a thrown prize above the straight line.
throw-arc: 1.2
# Height of the arc of the winning head when it flies to the winner.
head-fly-arc: 0.6
# Sizes (1 = normal size).
scales:
# Title lines.
title: 1.0
# Name under the center head.
name: 0.9
# Center head of the roulette.
center-head: 1.5
# Other heads of the roulette.
side-head: 1.0
# Winning head when it is revealed.
winner-head: 2.2
# Markers over and under the center head.
marker: 1.4
# Winner tag.
tag: 1.0
# Payout counter.
counter: 1.3
# Thrown prize.
prize: 0.7
# Seat block under the sponsor (side of the block in blocks).
seat: 1.0
# Width and depth of the winner platform in blocks.
platform-width: 1.2
# Height of the winner platform in blocks.
platform-height: 0.3
# Colors as #RRGGBB, or #AARRGGBB where transparency applies (AA = 00 transparent, FF opaque).
colors:
# Highlight behind the center head (#AARRGGBB).
highlight: "#A0FFD23C"
# Glow outline of the winning head (#RRGGBB).
glow: "#FFC21A"
# Panel behind the roulette (#AARRGGBB).
panel-background: "#90141420"
# Background of the texts (#AARRGGBB, 00 = none).
text-background: "#00000000"
# Block materials.
blocks:
# Block the sponsor sits on. A stair is turned with its back behind the sponsor, who sits on
# the step; a slab is sat on as a lower half; any other block is sat on as a whole cube.
seat: QUARTZ_STAIRS
# Platform under the winner.
platform: GOLD_BLOCK
# Sounds and particles per moment of the show. Particle names are vanilla ids (end_rod) or Bukkit
# names of any version (END_ROD, VILLAGER_HAPPY); particles that need extra data (dust, block)
# are not supported. Sound names are vanilla ids (block.note_block.hat) or Bukkit names
# (BLOCK_NOTE_BLOCK_HAT). A sound from a resource pack is written with its namespace
# (okimc:bravo). A name set to none turns that effect off.
effects:
# The sponsor appears.
entry:
particle:
# Particle name.
name: FIREWORK
# Number of particles.
count: 40
# Spread in blocks on each axis.
spread: 0.5
# Particle speed.
speed: 0.12
sound:
# Sound name.
name: ENTITY_PLAYER_LEVELUP
# Sound volume.
volume: 1.0
# Sound pitch (0.5 to 2.0).
pitch: 1.2
# The trail behind the gliding sponsor (played every update while it glides).
trail:
particle:
# Particle name.
name: CLOUD
# Number of particles.
count: 2
# Spread in blocks on each axis.
spread: 0.05
# Particle speed.
speed: 0.0
# The panel appears.
panel:
sound:
# Sound name.
name: BLOCK_BEACON_ACTIVATE
# Sound volume.
volume: 0.8
# Sound pitch (0.5 to 2.0).
pitch: 1.4
# Each step of the roulette.
step:
sound:
# Sound name.
name: BLOCK_NOTE_BLOCK_HAT
# Sound volume.
volume: 0.8
# Sound pitch (0.5 to 2.0).
pitch: 1.6
# The winner is revealed.
winner:
particle:
# Particle name.
name: TOTEM_OF_UNDYING
# Number of particles.
count: 60
# Spread in blocks on each axis.
spread: 0.4
# Particle speed.
speed: 0.35
sound:
# Sound name.
name: UI_TOAST_CHALLENGE_COMPLETE
# Sound volume.
volume: 0.9
# Sound pitch (0.5 to 2.0).
pitch: 1.0
# The winner mannequin appears on the platform.
arrive:
particle:
# Particle name.
name: END_ROD
# Number of particles.
count: 25
# Spread in blocks on each axis.
spread: 0.4
# Particle speed.
speed: 0.05
sound:
# Sound name.
name: ENTITY_PLAYER_LEVELUP
# Sound volume.
volume: 0.8
# Sound pitch (0.5 to 2.0).
pitch: 1.5
# The sponsor throws the prize.
throw:
sound:
# Sound name.
name: ENTITY_SNOWBALL_THROW
# Sound volume.
volume: 0.8
# Sound pitch (0.5 to 2.0).
pitch: 1.0
# A thrown prize reaches the winner.
hit:
particle:
# Particle name.
name: HAPPY_VILLAGER
# Number of particles.
count: 12
# Spread in blocks on each axis.
spread: 0.35
# Particle speed.
speed: 0.0
sound:
# Sound name.
name: ENTITY_EXPERIENCE_ORB_PICKUP
# Sound volume.
volume: 0.8
# Sound pitch (0.5 to 2.0).
pitch: 1.2
# Everything vanishes (one burst on each element of the stage).
close:
particle:
# Particle name.
name: POOF
# Number of particles of each burst.
count: 20
# Spread in blocks on each axis.
spread: 0.45
# Particle speed.
speed: 0.05
sound:
# Sound name.
name: ENTITY_ITEM_PICKUP
# Sound volume.
volume: 0.8
# Sound pitch (0.5 to 2.0).
pitch: 0.6
# Players whose game is older than 1.19.4 (joined through ViaVersion, ViaBackwards or ViaRewind)
# cannot draw the show's holograms, and Geyser drops most of them for Bedrock players. They never
# get them; they follow the same show through a title per phase, the roulette and the payout
# counter on the action bar, and the show's sounds. Old games need ViaVersion on this server (on
# the proxy only, the server cannot tell a player's version); Bedrock players are recognised by
# Floodgate or by their Floodgate UUID.
# Placeholders: {host}, {prize}, {winner}, {count}, {name} (roulette-bar), {step} (counter-bar).
legacy:
# false = those players see nothing of the show (they still get the chat announcements).
enabled: true
# true = Bedrock players get this title version; false = they get the hologram show like Java.
bedrock: true
# Title and subtitle while the show opens.
entry-title: "&e&lGIVEAWAY"
entry-subtitle: "&7by ₢f2{host} &8- &a{prize}"
# Title and subtitle while the roulette spins.
roulette-title: "₢f2&lGIVEAWAY"
roulette-subtitle: "&a{prize} &8- &7{count} participants"
# Action bar with the participant under the roulette pointer, rewritten on every step.
roulette-bar: "&8» &f{name} &8«"
# Title and subtitle once the winner is drawn, shown until the show closes.
winner-title: "&a&lWINNER!"
winner-subtitle: "&6{winner} &7won &a{prize}"
# Action bar on every payout throw.
counter-bar: "&a&l{step}"
# Ticks the first title takes to fade in (0 to 100).
fade-in: 5
# Ticks the last title takes to fade out (0 to 100).
fade-out: 10Economy types
vault: no extra keys; uses the server Vault economy.edtools:currency, the EdTools currency id. Prizes are credited without boosters.command:give-commandandtake-command(run as console;{player}and{amount}are replaced) andbalance-placeholder, a PlaceholderAPI placeholder that returns the exact balance. An amount that cannot be verified is refused before anything is taken.sncredits:command(the bridge console command, defaultcredits) andconfirm-timeoutin ticks. Credits are whole numbers.
A debit through SnCredits is confirmed only by a balance drop of exactly the debited amount. A payment or income during confirm-timeout refuses the giveaway, and the console logs a SEVERE line asking you to check that balance by hand.
The economies: block is yours. Delete or rename the shipped entries freely. Changing decimals of an economy while one of its giveaways is unpaid rescales that prize.