Loot System Rewrite, Bug Fixes & QOL
Overview
With 75 commits to the repository, this update is officially the largest release for DragonEggDrop as of 1.4.0-BETA1 which implemented dragon templates! I've worked hard on this update to make sure the loot system is as flexible as possible while also providing some useful default loot for those who don't bother configuring the plugin and just want an install-and-play solution. With that being said, the loot system may be confusing to those unfamiliar with Minecraft's loot tables or the JSON syntax and for those not confident, the wiki has been updated to accommodate for the changes in this update!
To those still having issues with the new loot system, please do not hesitate to contact me on my support Discord or on the SpigotMC resource discussion thread.
NOTE: YOU MUST UPDATE YOUR SERVER IN ORDER TO USE THIS VERSION OF DragonEggDrop!!! IT USES NEW API ADDED RECENTLY AND WILL NOT WORK ON SERVERS VERSION 1.15.2 RELEASED BEFORE March 24th 2020!!!
Changelog
Because the changelog is as large as it is, changes have been broken up into individual categories
Core Changes
- Depend on Spigot API instead of Bukkit. This plugin will no longer work on CraftBukkit servers. Sorry.
- After I have made a successful change to Bukkit, DragonEggDrop should now be mostly future-proof! 1.15.2+ support from this point forth. Therefore, YOU MUST UPDATE YOUR SERVER IN ORDER TO USE THIS UPDATE!!!!!
- Restructured and cleaned up the entire project. Codebase has changed significantly. Developers, any plugins depending on DragonEggDrop will break! Please review the Javadocs
- Replaced all instances of "2008Choco" to "Choco"
New Features & Removals
- Added bStats Metrics. These can be disabled in the configuration file by setting "metrics" to false
- Overhaul the loot system. Dragon templates now pool their loot from loot tables.
- Default loot tables can be found in the
DragonEggDrop/loot_tables
directory - Proper loot tables have been created by default which hopefully make sense. Of course you may change these or create your own templates. No more sticks!
- These loot tables take inspiration from Minecraft's vanilla loot table system (with changes to accommodate for DragonEggDrop's specific needs). The default loot tables should give you an idea of how they work. Copy/paste does wonders! See the DragonEggDrop Wiki for information on how they work.
- Dragon templates have changed significantly (mostly to accommodate for changes in the new loot system):
- Removed
egg-spawn-chance
,egg-name
andegg-lore
- Removed
chest-spawn-chance
,chest-name
,min-loot
andmax-loot
- Removed
death-commands
- Removed
announce-respawn
- Removed
loot
has been changed to value as a string rather than a configuration section. This value should be the name of the loot table to use (as found in theDragonEggDrop/loot_tables
directory - without the file extension)- Dragons that do not specify a loot table (or if the loot table is invalid) will generate a dragon egg as per vanilla behaviour
- Default loot tables can be found in the
- Added
spawn-announcement
, a list of strings to send to players when the template has been spawned. If not set or empty, no message will be sent - Added an additional (optional) argument to the
/dragonrespawn
command to specify which loot table to use when respawning the next dragon/dragonrespawn start [time] [world] [template] [loot_table]
- Added a damage history framework. Damage history for the dragon may be queried by developers, though for server owners this may be used with placeholders!
- Added support for PlaceholderAPI. The following placeholders are supported:
%dragoneggdrop_dragon%
: The formatted name of the dragon currently being faught%dragoneggdrop_dragon_<world>%
: The formatted name of the dragon currently being faught in the specified world%dragoneggdrop_slain_dragon%
: The formatted name of the dragon that was most recently slain%dragoneggdrop_slain_dragon_<world>%
: The formatted name of the dragon that was most recently slain in the specified world%dragoneggdrop_respawn_time%
: The formatted time remaining for the dragon to respawn%dragoneggdrop_respawn_time_<world>%
: The formatted time remaining for the dragon to respawn in the specified world%dragoneggdrop_top_damager%
: The name of the player that's done the most damage to the current dragon%dragoneggdrop_top_damager_<position>%
: The name of the player that's done the x most amount of damage to the current dragon (i.e. position 1 = top damage, position 2 = second most damage, etc.)%dragoneggdrop_top_damager_<position>_<world>%
: The name of the player that's done x most amount of damage to the current dragon in the specified world%dragoneggdrop_top_damage%
: The damage done by the top damager to the current dragon%dragoneggdrop_top_damage_<position>%
: The damage done by the player that's done x most amount of damage to the current dragon%dragoneggdrop_top_damage_<position>_<world>%
: The damage done by the player that's done x most amount of damage to the current dragon in the specified world- All the above may be used in any configurable message in DragonEggDrop's config.
- Added a
announce-message-radius
config option to set the radius of action bar announcement messages. This may be used to prevent players on end isles from receiving the message. All players in the end will receive the message by default (-1
) - Removed the
/dragontemplate [template] edit
command. Due to the nature of loot pools, this would have been difficult to implement
Quality Of Life Changes
- End crystals may now be destroyed by creative mode players while they are being created in an automatic respawn process. In such a situation, the respawn will cancel.
- A fizz sound will now be played when a player attempts to manually respawn the dragon if
allow-crystal-respawn
is set tofalse
- End crystal items are now given an outwards velocity when a player attempts to manually respawn the dragon if
allow-crystal-respawn
is set tofalse
. This to prevent the items from falling into the portal - The
/dragontemplate <template> info
command will now show the exact % chance to spawn a dragon using the specified template (rounded to two decimal places) /dragontemplates
and/templates
may now be used as short forms for/dragontemplate list
and/template list
. The former two commands still function as expected (i.e. you can still do/dragontemplates <template> info
)/dragontemplates
now uses hoverable messages to show per-template information when its name is hovered over in chat- Command feedback is now more detailed and consistent (as such, removed
/dragoneggdrop help
- Bukkit's/help dragoneggdrop
will do the same) - More information is logged to the console on startup for debug & administrative purposes
Bug Fixes
- Fixed non templated dragons remaining non templated (#21 on GitHub)
- Fixed dragons respawned using end crystals not being templated
- Fixed right clicking the portal not functioning as intended. It will now show the player the time remaining for the dragon to spawn
- Fixed the time not being formatted properly in the message sent when right clicking the portal
- Fixed the time parsing message not properly pluralizing. "1 minute" (& similar units) will no longer be plural
- Fixed the respawn action bar message not listing "weeks" or "days". Previously only "hours" were shown resulting in hundreds of hours
- Fixed the error message not showing the correct argument if an invalid template was specified when executing
/dragonrespawn
- Fixed the
/dragontemplate
command tab completion suggestingview
as the second argument despite/dragontemplate list
being typed - Fixed a warning message being sent in the console on first generation of dragon templates
- Fixed instances of
allow-crystal-respawn
not working as intended - Fixed infinite lightning spawning on the portal when loot is generated (hopefully...)