Legendary Generator - Pixelmon legendary overhaul plugin

This is a discussion topic for the Ore project, Legendary Generator. View the full project on Ore for downloads and more information.


LegendaryGenerator Update 3.5.1 SF7.3

 For Pixelmon Generations and Reforged

Description

LegendaryGenerator, shortly said. Just overrides the regular Pixelmon spawning of Legendaries in all ways.

By blocking the Legendary Pokémons that get spawned by the mod itself.

While it blocks the “false” spawns, LG (LegendaryGenerator) is able to stay in control about the spawning of Legendaries at all times.

The plugin is also filled with rich features like:

  • Setting different Biomes for Legendaries to spawn.
  • Setting requirements like time of day, weather or party pokémons.
  • Ignore AFK players when attempting to spawn a Legendary.
  • Don’t spawn a Legendary at the same player twice in a row.
  • A 100% fail rate when only 1 player is online.
  • Customizable broadcasts with additional permissions and features!
    And much much more!

Required:

Depends on version:

  • Generations (latest version - 8.4.2

  • Reforged (Latest version - 8.1.2

  • Nucleus V2 for API 7.3, V1 for API 7.1 up to but not included 7.3

Permissions and Commands

========= PLAYER COMMANDS =========
/lg list
legendarygenerator.command.list

Tip: Use a plugin like SimpleCommands to create a command like /ll from the LastLegend plugin.


/lg settings
legendarygenerator.command.settings


========= ADMIN COMMANDS =========
/lg testspawn
legendarygenerator.command.admin

/lg spawn
legendarygenerator.command.admin

/lg setshinychance
legendarygenerator.command.admin

/lg giverand
legendarygenerator.command.admin

/lg setspawnchance
legendarygenerator.command.admin

/lg reload
legendarygenerator.command.admin

/lg tell
legendarygenerator.command.admin

Wiki <<=>> Discord.

A new version has been released for Legendary Generator, it is available for download here.


Plugin to spawn a random legendary on the player based on biomes

A new version has been released for Legendary Generator, it is available for download here.


  • Fixed the random legendary giver command

  • Added support of random player (@r) in both the spawn command and give commands

Renamed the commands:

    Permission: legendarygenerator.command.admin

    /legendarygenerator
    Aliases: /legendgen, /leggen

    /legendgen spawn <@r|player> [<mode>]
    /legendgen setmsg|setmessage <message>
    /legendgen giverand <@r|player> 

Note: mode is an optional command argument for the spawn command, for setting whether you want the plugin to spawn a legendary based on the player’s biome or just a random legendary in general. Will default to biome if left blank

  • Added a system to mimic Pixelmon’s natural spawn system. Plugin will run code every x minutes with a x percent chance to run the "/legendgen spawn @r " command. Numbers are configurable!

Note: I recommend turning off Pixelmon’s actual default spawner, in the pixelmon.hocon, to avoid double legendary spawns (which is highly unlikely, mind you, but possible)

  • Added the ability to toggle the mimic natural spawner on and off (for those that don’t want to use it)

  • Added the ability to set the spawn mode for the natural spawner (biome or random)

  • Added commands to change the settings for the natural spawner system:

/legendarygenerator settings toggle <true|false>
/legendarygenerator settings spawnchance <double>
/legendarygenerator settings spawnint <integer>
/legendarygenerator settings mode <biome|random>

Notes: the spawn chance works off of a double (like 0.001 for example) so when modifying that value, make sure to keep that in mind. 0.782415, 0.523, really anything with a decimal

The spawnint (spawn interval) is how often the plugin tries to run the spawn a legendary code. It is coded in minutes! 300 minutes = 5 hours. You can do the math from there.

A new version has been released for Legendary Generator, it is available for download here.


Added a configurable setting (disabled by default) to have the spawn chance increase with each failed attempt of a legendary spawning (will reset to default chance value when a legendary eventually spawns) (also includes values to customize how the chance is modified)

Added a blacklist to allow for preventing certain legendaries (looking at you, Meltan!) from being spawned by the spawning system.

Renamed the plugin from “legendarygenerator” to “LegendaryGenerator”

I’m a few versions behind updating my posting of this plugin here, sorry about that! I usually forget to update my posts here. My Discord is (and probably always will be) the best place to get the latest versions and fastest support from me!

Join my Discord here: https://discord.gg/TjzJwY8

A new version has been released for Legendary Generator, it is available for download here.


  • Added optional support of GCES into the plugin
    – basically, if GCES says you can’t catch legendaries, then no legendaries will spawn on you/be given to you

  • Fixed the <shiny> command argument actually not doing anything

A new version has been released for Legendary Generator, it is available for download here.


  • Added full LastLegend support (meaning the legendaries spawned by LegendaryGenerator will appear in the list shown to players when using the /lastlegend command)

  • Added a configuration node to toggle whether or not to have the server allow Pixelmon’s default legendary spawning system to succeed in spawning legendaries (basically a toggle button to turn off Pixelmon’s default system) (unsure if the message will still show by Pixelmon’s default system though)

  • Changed how the plugin spawns the legendary, PixelExtras is no longer required for the plugin to function

    -- When updating to this version, simply reload the config using "/sponge plugins reload" to have the plugin generate this newly added configuration node inside the config file. Doing this will allow you to set the value to whatever you want. Regardless of whether you want to use my natural spawner or Pixelmon's, you're going to want to do this because otherwise no legendaries are going to spawn!

A new version has been released for Legendary Generator, it is available for download here.


  • Fixed player-owned legendaries getting despawned/turned invisible

A new version has been released for Legendary Generator, it is available for download here.


  • Added full support of my PokeBoosters plugin (see my Discord for more info)

  • Added support of Ultra Beasts (and Ultra Space) to the plugin (plugin will select an Ultra Beast instead of a legendary if the player selected is in Ultra Space instead of the Overworld)

  • Added the ability to customize the spawn message with colors and stuff (and removing the auto formatting in the process so it no longer looks identical to Pixelmon’s message by default)

  • Added support of setting max and min spawn interval settings to the same value to designate that specific time frame

  • Added a player command “/leggen settings” that will show the command sender the current settings for spawn intervals, shiny chance, and spawn chance. Requires permission node “legendarygenerator.command.settings” (requires a permission node in case server owners want to hide this information from players)

  • Modified how I attempt to stop Pixelmon’s default spawns - should now print to your console every time the plugin stops a legendary from spawning that is not spawned directly by the plugin

  • Fixed wacky issues with LastLegend config

A new version has been released for Legendary Generator, it is available for download here.


General bug fixes, fixed Ultra Beasts not being supported in the code that stops Pixelmon’s default spawner from spawning legendaries

A new version has been released for Legendary Generator, it is available for download here.


  • Added a check for if spawn chance = 1, should 100% spawn legendary when code runs

  • Added experimental support of stopping the plugin from despawning legendaries spawned with Shrines

  • Fixed not being able to push and pull from GitHub (which is mostly a me thing I think)

A new version has been released for Legendary Generator, it is available for download here.


  • Added a check for if spawn chance = 1, should 100% spawn legendary when code runs

  • Added experimental support of stopping the plugin from despawning legendaries spawned with Shrines

  • Fixed not being able to push and pull from GitHub (which is mostly a me thing I think)

  • Fixed the plugin not pulling radius value correctly from the config, causing spawn attempts to fail

A new version has been released for Legendary Generator, it is available for download here.


Added 3 commands to the plugin for modifying the shiny chance, spawn chance, and spawn interval in-game, for those that can’t access their server files due to whatever reason

(Commands can be found in the support channel of my Discord, pinned messages)

A new version has been released for Legendary Generator, it is available for download here.


  • Added “/leggen reload” to reload the config and restart the timer without having to reload all your Sponge plugins

  • Fixed the testspawn command triggering the whole code (chance value check and all), now it will forcefully trigger a spawn regardless of chance value

  • Separated the method that checks spawn chance and Pokemon spawner into two individual methods, for ^ that reason

  • Added support of using @r or random for the command argument since everyone always seems to get confused by that

  • Added support of GCES’s legendary restriction permission:
    Legendary Generator will now check for (firstly) if you’re using GCES to restrict the player’s ability to catch legendary Pokemon. If so, Legendary Generator will make a list of online players that have unlocked that ability and pick one of those players to spawn the legendary on, instead of possibly picking a player to spawn a legendary on that hasn’t unlocked the ability to catch them yet. This setting is configurable in the Legendary Generator config. By default, it will do this method, but can be configured to ignore it and spawn from a list of all online players (though, due to the nature of the Pokemon spawner, using “all online players” mode could (though unlikely) cause the spawn chance to go through but a legendary not be spawned)

    (Might have to regen config for it, honestly unsure)

A new version has been released for Legendary Generator, it is available for download here.


  • Added “/leggen reload” to reload the config and restart the timer without having to reload all your Sponge plugins

  • Fixed the testspawn command triggering the whole code (chance value check and all), now it will forcefully trigger a spawn regardless of chance value

  • Separated the method that checks spawn chance and Pokemon spawner into two individual methods, for ^ that reason

  • Added support of using @r or random for the command argument since everyone always seems to get confused by that

  • Added support of GCES’s legendary restriction permission:
    Legendary Generator will now check for (firstly) if you’re using GCES to restrict the player’s ability to catch legendary Pokemon. If so, Legendary Generator will make a list of online players that have unlocked that ability and pick one of those players to spawn the legendary on, instead of possibly picking a player to spawn a legendary on that hasn’t unlocked the ability to catch them yet. This setting is configurable in the Legendary Generator config. By default, it will do this method, but can be configured to ignore it and spawn from a list of all online players (though, due to the nature of the Pokemon spawner, using “all online players” mode could (though unlikely) cause the spawn chance to go through but a legendary not be spawned)

    (Might have to regen config for it, honestly unsure)

A new version has been released for Legendary Generator, it is available for download here.


  • Removed a considerable amount of lag from looping through every Pokedex number when I didn’t need to

  • Added support of setting custom legendary spawns in biomes

    • A new Whitelist {} node should generate in your config file, put the Pokemon name and the biome ID you want this Pokemon to spawn in inside this node and reload Legendary Generator
    Whitelist {
      Articuno="biomesoplenty:shrubland"
    }
  • Added “/leggen tell” which is a command that will tell you the current biome ID of the biome you are standing in, for convenience with setting up these custom spawns

  • Fixed Legendary Generator not spawning legendaries on players in the Nether and the End

A new version has been released for Legendary Generator, it is available for download here.


  • Removed a considerable amount of lag from looping through every Pokedex number when I didn’t need to

  • Added support of setting custom legendary spawns in biomes

    • A new Whitelist {} node should generate in your config file, put the Pokemon name and the biome ID you want this Pokemon to spawn in inside this node and reload Legendary Generator
    Whitelist {
      Articuno="biomesoplenty:shrubland"
    }
  • Added “/leggen tell” which is a command that will tell you the current biome ID of the biome you are standing in, for convenience with setting up these custom spawns

  • Fixed Legendary Generator not spawning legendaries on players in the Nether and the End

  • Fixed Legendary Generator throwing an error with using the random player argument in the Reforged version

A new version has been released for Legendary Generator, it is available for download here.


- Rewrote the spawner system:
    - Fixed (hopefully?) errors with getting random player arguments

    - Fixed (hopefully?) errors/nothing happening when using the spawn command

    - Fixed the "shiny" command argument apparently doing nothing in one scenario

    - Added support of a white list and a black list for biomes, worlds, and dimensions
        - These can be confusing, so be careful!

- Removed support of LastLegend (Generations)/LegendaryPlus (Reforged)

- Added custom-built replacement for both of those plugins:
    - Legendary Generator will now keep track of the legendaries it spawns
    - The number of legendaries it keeps track of is configurable
    - The list will show name, time of last updated event (spawning/catching/defeating/despawning), who caught/killed it (depending on permissions, configurable), and current status (alive, despawned, captured, defeated)

- Added a capture event listener and a defeat listener for updating the active status of spawned legendaries

- Added a scheduled task that runs at a configurable interval to check for despawned legendaries

- Added support of Nucleus' Afk handler

- Added a setting in the main config to toggle whether legendaries can spawn on afk players

- Rewrote the message system:
    - Added Capture-Messages, Despawn-Messages, and Defeat-Messages
    - Added support of Boss Bars, Action Bars, Title messages, and hover text in the spawn message
    - Added support of showing different messages to different permission groups

- Added "lg" alias to Legendary Generator command

- Added "/lg list" to show the spawned legendaries list:
    - requires permission node "legendarygenerator.command.list"

- Removed the random giver command...I just didn't think it was necessary anymore

- Fixed default Pixelmon spawner's code not being registered on the right EVENT_BUS on the Reforged version (basically, it wasn't working at all)

---------------------------------------------------------------

- Fixed the config overwriting "captured" and "defeated" legendary listings with "despawned"

- Fixed the config saving itself too fast when updating the spawned legendary list, causing errors

- Fixed the plugin throwing a BoundsMustBePositive error when the command was used on a player in a biome that has no natural spawns
    Note: this won't make stuff magically spawn, you must put spawns in these biomes in the config for things to spawn there

- Added a print out message to the console when the plugin detects a biome with no natural spawns, so server owners can find those biomes easier to add spawns to them

- Fixed the spawner system not considering Nucleus to be an optional dependency, throwing errors when Nucleus was not present in the server

- Added support of GCES's individual legendary locking system

A new version has been released for Legendary Generator, it is available for download here.


- Rewrote the spawner system:
    - Fixed (hopefully?) errors with getting random player arguments

    - Fixed (hopefully?) errors/nothing happening when using the spawn command

    - Fixed the "shiny" command argument apparently doing nothing in one scenario

    - Added support of a white list and a black list for biomes, worlds, and dimensions
        - These can be confusing, so be careful!

- Removed support of LastLegend (Generations)/LegendaryPlus (Reforged)

- Added custom-built replacement for both of those plugins:
    - Legendary Generator will now keep track of the legendaries it spawns
    - The number of legendaries it keeps track of is configurable
    - The list will show name, time of last updated event (spawning/catching/defeating/despawning), who caught/killed it (depending on permissions, configurable), and current status (alive, despawned, captured, defeated)

- Added a capture event listener and a defeat listener for updating the active status of spawned legendaries

- Added a scheduled task that runs at a configurable interval to check for despawned legendaries

- Added support of Nucleus' Afk handler

- Added a setting in the main config to toggle whether legendaries can spawn on afk players

- Rewrote the message system:
    - Added Capture-Messages, Despawn-Messages, and Defeat-Messages
    - Added support of Boss Bars, Action Bars, Title messages, and hover text in the spawn message
    - Added support of showing different messages to different permission groups

- Added "lg" alias to Legendary Generator command

- Added "/lg list" to show the spawned legendaries list:
    - requires permission node "legendarygenerator.command.list"

- Removed the random giver command...I just didn't think it was necessary anymore


---------------------------------------------------------------------------

- Fixed the config overwriting "captured" and "defeated" legendary listings with "despawned"

- Fixed the config saving itself too fast when updating the spawned legendary list, causing errors

- Fixed the plugin throwing a BoundsMustBePositive error when the command was used on a player in a biome that has no natural spawns
    Note: this won't make stuff magically spawn, you must put spawns in these biomes in the config for things to spawn there

- Added a print out message to the console when the plugin detects a biome with no natural spawns, so server owners can find those biomes easier to add spawns to them

- Fixed the spawner system not considering Nucleus to be an optional dependency, throwing errors when Nucleus was not present in the server

- Added support of GCES's individual legendary locking system

A new version has been released for Legendary Generator, it is available for download here.


  • Fixed a NullPointerException being thrown trying to broadcast the fail message (hopefully, I didn’t actually test it, but in theory it should be fine now)

  • Added support of not specifying a quantity in the inventory requirement modules (for both spawn triggers and spawn requirements, including both inventory-checking systems in the triggers) to default to a quantity of 1

  • Fixed the Pokemon spawner throwing null errors

  • Fixed Party-Contains and Party-Requires throwing null errors when, say, there was something in slot 2 but not slot 1 of the player’s party

  • Fixed Inventory-Requires removing the items before finishing the rest of the requirement checks

  • Fixed the time listing having values less than 10 not be displayed with a 0 → “9” vs “09”

  • Fixed the plugin thinking a legendary had despawned if it had moved away from its spawn location

  • Added a break out of the loop in the spawn selection method so it won’t keep looping through after selecting a Pokemon

A new version has been released for Legendary Generator, it is available for download here.


  • Fixed a NullPointerException being thrown trying to broadcast the fail message (hopefully, I didn’t actually test it, but in theory it should be fine now)

  • Added support of not specifying a quantity in the inventory requirement modules (for both spawn triggers and spawn requirements, including both inventory-checking systems in the triggers) to default to a quantity of 1

  • Fixed the Pokemon spawner throwing null errors

  • Fixed Party-Contains and Party-Requires throwing null errors when, say, there was something in slot 2 but not slot 1 of the player’s party

  • Fixed Inventory-Requires removing the items before finishing the rest of the requirement checks

  • Fixed the time listing having values less than 10 not be displayed with a 0 → “9” vs “09”

  • Fixed the plugin thinking a legendary had despawned if it had moved away from its spawn location

  • Added a break out of the loop in the spawn selection method so it won’t keep looping through after selecting a Pokemon