Code (YAML):
#############################
# AreaSpawner #
# by lelesape #
# sponsored by DarkPrincess #
#############################
# If you find this plugin useful remember to review it on spigot. ANY suggestions will
# be heard, make sure to leave them either on the spigot plugin page, the github page for
# this project or lelesape(MasterPlugins)'s plugin support discord server: https://bit.ly/MPDiscordSv
#
# When modifying spawn settings, make sure to regenerate spawn locations
# using "/as regenerate" for applying changes.
###############################################
#Internal use only. Do not touch this.
config version
: 1
###############
# General #
###############
#Prefix for this plugin's messages.
prefix
: '&f
[&eMPAreaSpawner&f
]'
# Whether to show debug messages in console or not. Example of debug message: "generating safe spawn locations for world1"
debug
: false
#####################
# Spawn settings #
#####################
# The world to generate locations for.
# MUST exist.
spawn world
: world
# The spawn range players will be randomly spawned within
# If x center, y center, or z center are -1, defaults to the given world's spawn location
# Radius is number of blocks outward from that point
# clamp-to-limits makes sure the values don't fall outside valid areas, suggest to always have enabled
# If multiverse or essentials is enabled, -1 location values will use the spawn point in those plugins. Otherwise -1
# uses the vanilla/base game spawn point location.
# Please take into account that if the result of doing "y center" - "y range" is lower than 0, players will be able to
# spawn below bedrock and fall into the void.
spawn zone:
clamp to limits
: true
default to multiverse
: false
x center
: 0
y center
: 128
z center
: 0
x range
: 10_000_000
y range
: 127
z range
: 10_000_000
# The no spawn zone can be disabled. These are the zones where players
# cannot spawn in. They should be smaller than the spawn zones and be inside them.
no spawn zone:
enabled
: true
x center
: 0
z center
: 0
x range
: 8_000_000
z range
: 8_000_000
# List of block that will be used when checking for block safety.
# if "list is whitelist" set to false (default), this list is a blacklist -> Players will not spawn on this blocks.
# if "list is whitelist" set to true, this list is a whitelist -> Players will spawn on this blocks.
block list
:
- 'BEDROCK'
- 'PLANKS'
- 'SAPLING'
- 'TNT'
- 'STONE_PRESSURE_PLATE'
- 'WOODEN_PRESSURE_PLATE'
- 'LIGHT_WEIGHTED_PRESSURE_PLATE'
- 'HEAVY_WEIGHTED_PRESSURE_PLATE'
- 'LAVA'
- 'WATER'
- 'BED'
- 'WEB'
- 'TORCH'
- 'REDSTONE_BLOCK'
- 'CHEST'
- 'WHEAT'
- 'FURNACE'
- 'FIRE'
- 'REDSTONE'
- 'CACTUS'
- 'OBSIDIAN'
- 'PORTAL'
- 'ENCHANTING TABLE'
# Should the list above contain blocks that should be considered safe?
list is whitelist
: false
# Are block that aren't found in the whitelist safe?
# If "list is whitelist" is set to true, are blocks not found in the list considered safe?
non-list are safe
: true
# The amount of air block needed for a location to be seen as safe.
# Default: 2 (recommended).
air gap above
: 2
# When searching for a spawn range, do we start from the top of the world or
# the bottom.
# The normal behaviour is starting from the top which puts players on the
# highest block where the sky is visible.
# Alternatively, if we start from the bottom, players will spawn in the lowest
# blocks possible (often in the deepest caves).
top to bottom
: true
# If set to true, and the surface block is not ok (such as lakes) it will
# continue to try to find a safe block (like caves under the lake)
# Defaults to false.
# WARNING: if this is set to false and the y values are higher than 256, it will constantly fail
# to find a safe location. You will recognize in console when this happens, messages saying "No non-air block found".
check past surface
: false
###############
# Spawning #
###############
# Should players be teleported to a new location when respawning?
spawn on death
: true
# Should players be teleported to a new location when first joining the server?
spawn on first join
: true
# Should players be teleported to their bed when respawning? This will be ignored if they don't have a bed.
spawn on bed
: true
# Should players need a permission node for being randomly teleported? This will only affect automatic random
# spawning. random spawn command needs a different permission. The permission node for this settings is
# "areaSpawner.automatic"
use permission
: false
###############
# Essentials #
###############
# Should players be teleported to home instead of random spawn on-death
essentials home teleport
: true
# Should AreaSpawner set the user's Essentials home 'home' on first-join
# random spawn?
essentials home on first spawn
: true
# The name to give to the new home when players first join the server and get randomly teleported
# with "essentials home on first spawn" set to true.
home on first spawn name
: 'home'
###############
# Caching #
###############
# Should AreaSpawner get some spawn locations and save them to use them when the moment comes?
# HIGHLY RECOMMENDED to be enabled.
# If disabled, AreaSpawner will try to generate a new safe spawn location on the spot
# every time one is needed (not recommended).
enable cache
: true
# When the plugin is disabled or the server closes, sould AreaSpawner saves what was saved in the cache
# to a cache file (cache.yml) to then be loaded when the plugin is enabled again?
save cache to file
: true
# The amount of time to wait in between locations when generating locations for the cache.
# S -> Seconds; M -> Minutes; H -> Hours; D -> Days.
# If the unit is not S,M,H or D, it will count as S (seconds).
# Any other incorrect input will be detected as 3S (3 seconds).
time between generating locations
: 5S
# Number of spawns to calculate and save in the cache.
# The amount of spawns should not affect your server performance since spawn calculation is made async.
# The bigger your server, the more locations in cache you want, sometimes it's not necessary to have loads of locations
# in memory ready to be used, if you have a server with 25 players, rarely those 25 players will die at the same time.
# Recommended is 2*(player base).
amount of cached spawns
: 10
# Number of attempts to calculate a safe location until giving up and calculating the next one.
safe spawn attempts
: 25
# When a spawnpoint is used, should AreaSpawner remove this location?
# Recommended if: the amount of cache spawns is not very high or you just don't want the possibility for
# a player to spawn close to where another player spawned at all.
# It is also recommended to have "replace location on remove" set to true if this is also set to true.
delete location on use
: false
# When a location is removed, should AreaSpawn create a new safe location in its place?
replace location on remove
: true
# When a location that was previously considered safe but it is no longer safe
# should AreaSpawner delete them and generate a new one or just not use it?
# Definitely recommended.
delete location on unsafe
: true
# Should AreaSpawner check for safety anyways even though it's been cached
# when attempting to spawn players at a cache entry.
# Highly recommended as the location could have become unsafe since it was
# last cached.
re-check for safety on use
: true
##################
# travel command #
##################
# Should the "/travel" command be enabled for players to use?
# Requires "areaSpawner.travel" permission.
travel enabled
: true
# How much time between "/travel" uses? Set to 0 disable.
# S -> Seconds; M -> Minutes; H -> Hours; D -> Days.
# Any incorrect input will be detected as 0s (disabled)
# Permission to bypass cooldowns is "areaSpawner.cooldown.bypass"
travel cooldown
: 10S
# Will remove "areaSpawner.travel" permission from players that run the "/travel" command successfully.
# Requires Vault.
remove permission on travel
: false
# How much will a player be charged in order to run the "/travel" command successfully?
# Set to 0 to disable. Requires Vault and an economy plugin to be installed on the server.
# You can also opt-to instead use my MPCommandSettings plugin to have command charges and cooldowns
# all in one place. spigotmc.org/resources/mp-command-settings.72098
travel cost
: 0.0
# Will set an Essentials home on the traveled location if none set for the player before.
home on travel
: false
# Will set an Essentials home on the traveled location if none set for the player before.
home on travel name
: 'home'