MP Area Spawner 0.9.4

SPONSORED | OPEN-SOURCE | Random spawn plugin full of features!

  1. lelesape
    Native Minecraft Version:
    1.15
    Tested Minecraft Versions:
    • 1.15
    • 1.16
    Source Code:
    https://github.com/alfonsoLeandro/MPAreaSpawner
    Contributors:
    junebug12851
    AreaSpawner header.png

    Add various ways for your players to spawn in random spots!

    features.png
    • Create random spawn locations up to Minectaft world's broders
    • Spawn locations cache, for saving safe spawn locations instead of calculating one on the spot. (Save as many locations as you want)
    • Creation of safe* spawn locations
    • Create a zone in which players are not allowed to spawn in
    • Block blacklist and whitelist
    • Essentials & Multiverse integrations!
    • Manually teleport using a simple command!
    • Super efficient
    • Super User-friendly
    * "safe" according to the parameters you specify in config.

    commandsAndPermissions.png
    Commands: (areaSpawner (as) & randomSpawn(rs, rspawn))
    areaSpawner (admin command):
    -/as help - Shows a list of commands
    -/as version - Shows the version of the plugin and checks for updates
    -/as reload - Reloads the plugin and its files
    -/as regenerate - Deletes any location generated in the cache and creates new ones
    -/as locations - Shows the amount of locations saved in cache
    -/as stopCache - Stops the cahce process.
    randomSpawn (user command / travel command):
    -/rs help - Shows a list of commands
    -/rs travel - Teleports to a new random location
    -/rs forceTravel (player) - Forces a player to teleport to a new random location

    Permissions:
    -areaSpawner.version - Allows you to check the plugin's current version
    -areaSpawner.reload - Allows you to reload the plugin
    -areaSpawner.locations - Allows you to see how many safe to spawn locations are currently stored in cache
    -areaSpawner.regenerate - Allows you to regenerate safe spawn locations
    -areaSpawner.automatic - Allows you to be automatically teleported
    -areaSpawner.travel - Allows you to teleport manually using the travel command
    -areaSpawner.forceTravel - Allows you to force a player to teleport to a new random location
    -areaSpawner.cooldown.bypass - Allows a player to bypass travel command cooldowns when these are enabled
    -areaSpawner.* - Givess access to every permission available


    files.png
    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'

    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
    #
    # This is the cache file, said file is used for saving safe spawn locations
    # when the server shuts down or the plugin gets disabled. When the plugin is re-enabled
    # the locations saved in here will be validated and loaded or discarded if no longer considered safe.
    # This file should not be modified manually.
    ###############################################
    # Don't touch this! Internal use only.
    cache-settings-hash
    : 1234567890ABCDEF

    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
    #
    # Messages file. Here you will find every translatable messages.
    ###############################################
    messages
    :
      list of commands
    : '&6List of commands:'
      no permission
    : '&cNo permission'
      unknown command
    : '&cUnknown command. &fTry /%command% help'
      reloaded
    : '&aPlugin reloaded!'
      regenerating
    : '&fRegenerating every spawn location for every world in config...'
      number of locations
    : '&fThere are currently &c%locations% &flocations stored in cache.'
      you have been teleported
    : '&aYou have been teleported to a new random location.'
      travel disabled
    : '&cThat feature is disabled.'
      still in cooldown
    : '&cYou are still on cooldown for using this feature. Time left: %time%'
      not enough money
    : '&cYou don''t have enough money, you need %amount%'
      charged
    : '&eCharged: &c%price%'
      travel permission removed
    : '&cYour ability to teleport to a random spot has been removed.'
      essentials home set
    : '&fAn essentials home has been set for you in your location.'
      invalid player
    : '&cThat player is not online or does not exist.'
      player has been teleported
    : '&a%player% successfully teleported to a new random location.'
      and
    : 'and'
      day
    : 'day'
      days
    : 'days'
      hour
    : 'hour'
      hours
    : 'hours'
      minute
    : 'minute'
      minutes
    : 'minutes'
      second
    : 'second'
      seconds
    : 'seconds'


    about the sponsor.png
    DarkPrincess is the admin of PopupMC and the sponsor to several plugins the server uses. PopupMC likes to invest in high-quality plugins which they can proudly put their name on while simulatinously financially supporting developers and overseeing the projects.

    You can connect to PopupMC at this address: mc.popupmc.com and join their Discord server here

    dependencies.png

    Soft dependencies:
    • Essentials - Essentials home integration.
    • Multiverse - Multiverse world center config field.
    • Vault - Economy integration for travel command.
    reviews.png
    If you review my plugin let me know so i can put your video here

    to-do.png

    support.png
    [​IMG]

    terms of use.png
    By using this plugin you agree to the following terms:
    • You cannot sell this plugin
    • You cannot claim this plugin as yours
    • I can modify this terms at any time without any kind of notification
    If you find any bugs please let me know, also make sure to rate this plugin, thank you!

Recent Updates

  1. Performance update
  2. Bug fix
  3. Fixed bugs

Recent Reviews

  1. zyzman
    zyzman
    5/5,
    Version: 0.9.4
    Working flawly! Add pls permanent positions with some chances
    (ノ◕ヮ◕)ノ*:・゚✧ ✧゚・: *ヽ(◕ヮ◕ヽ)
    1. lelesape
      Author's Response
      Thank you for your review! Glad it is working as it should. Will implement the suggested feature in the future!
  2. TORPADREKER
    TORPADREKER
    5/5,
    Version: 0.9.1
    Good plugin to manage first-time spawns! Everything works amazingly and is very applicable for survival servers! :D
    1. lelesape
      Author's Response
      Thanks so much for your kind words! Really glad this plugin results useful to you!