Skip to content

Releases: 2008Choco/DragonEggDrop

Fixes, Fixes & More Fixes!

07 Feb 14:13
Compare
Choose a tag to compare

Overview

In this release, I've spent a little bit of time trying to devise a way to fix up a lot of the old code written by PixelStix to try and improve the efficiency and fix a bunch of bugs in the meantime. Well, I've managed to do exactly that! Most fixes have to do with the respawn process and the dragon itself, but this update is mainly composed of bug fixes and slight efficiency improvements. Everyone loves those, I know it! I highly recommend updating to this version, but if you really don't want all these juicy bug fixes, you don't have to!

Changelog

  • Rewrote the dragon respawn code to be much more efficient (Only a single runnable, compared to the 5 created previously)
  • Fixed the bar colour/style defaulting to red and segmented_12. They now default to pink and solid as per usual
  • Fixed awkward data parsing in the "dragon-names" configuration option. Whitespace between the "=" shouldn't be much of an issue anymore
  • Fixed the dragon's name displaying "name=Dragon Name" if that was the only value present (Such as the case of "Endy"). See here for example
  • Fixed dragon names not reloading properly when executing /ded reload
  • Fixed the "Particles.type" option not being checked upon startup
  • Fixed #2: If a dragon is present in the world when the countdown finishes, players will be warned. See here for example
  • Changed the author name in the plugin.yml to my name (It's my fork :P). PixelStix is still credited in the "/ded" command execution as "Original Author"

MORE Configuration!

05 Feb 17:47
Compare
Choose a tag to compare

Overview

I was requested over on the Discussion Thread to make a couple additions to the configuration file, (see here and here), and I listened once again and have added those exact options into this release! There's also just a quick little fix I wanted to make as I'm sure it was bothering some people. Albeit, a small release, but who doesn't love new features, am I right?

Changelog

  • Added a "perform-update-checks" configuration option to toggle the update checker
  • Replaced the "announce-color-one" and "announce-color-two" options with a fancier, and more configurable, "announce-messages" option! See below for updated usage
  • Fixed "join-respawn-delay" and "death-respawn-delay" configuration options not updating with /ded reload

New Configuration Options

perform-update-checks: true

# Announcement message animation
announce-messages:
- '&6Dragon respawning in &e%time% &6seconds'
- '&eDragon respawning in &6%time% &eseconds'

Configurable Boss Bar Styles

05 Feb 03:21
Compare
Choose a tag to compare

Overview

It's been a couple days since the last update, hasn't it!? Well, I've been busy with another project (which is also open sourced on GitHub, GeneratorsPlus), and haven't found the time to get around to updating. However, to make up for that, I've got some really nice looking features for you all to manipulate for your dragons. As some of you may know, Boss Bars are capable of being styled to be segmented or coloured, and that's what I've permitted you to do! Do not hesitate to thank Sequatious on the resource's Discussion Thread requesting this feature! I listened, and I most definitely provided! Enjoy the update, everyone!

Changelog

  • Changed the way "dragon-names" parses its data, and it now permits the ability to set the boss bar style and colour
  • Changed the default configured values to be more colourful and stylish 😄
  • Fixed the Ender Dragon not respawning after death even if configured to do so
  • API: Removed a bunch of methods from DEDManager including #setDragonBossBarTitle(String, Object), #getEnderDragonBattleFromWorld(World) and #getEnderDragonBattleFromDragon(EnderDragon). Use NMSAbstract instead
  • API: Added a DragonTemplate class to allow developers to add their own dragon templates

Configuration values for "dragon-names":

# Give the dragon a custom name, bar style and bar colour. Or not, your choice.
# If more than one option, one will be chosen at random.
# Names do support color/format codes i.e. &4 (red).
# Set to: dragon-names: [] for none.
# Format: "name=DRAGON'S NAME|style=STYLE|color=COLOR"
# format and style are optional. See their respective Javadocs for valid values
# Style: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarStyle.html
# Colour: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarColor.html
dragon-names:
- 'name=&aEndy'
- 'name=&bFalcor|colour=RED'
- 'name=&cHaiku|colour=GREEN'
- "name=&dMylanth|style=SEGMENTED_6|colour=WHITE"
- "name=&eKelarth|style=SEGMENTED_6|colour=YELLOW"
- "name=&1Mnerolth the Insane|style=SEGMENTED_10|colour=RED"
- "name=&2Verioth the Chosen|style=SEGMENTED_10|colour=GREEN"
- "name=&3Barroth the Gentle|style=SEGMENTED_10|color=PINK"
- "name=&4Bassilith, Lord of Ice|style=SEGMENTED_12|color=BLUE"
- "name=&5Inilth, Lord of Fire|style=SEGMENTED_12|color=RED"
- "name=&6Nveryioth, Lord of Light|style=SEGMENTED_20|color=YELLOW"
- "name=&8Tilenth, Lord of Death|style=SEGMENTED_20|color=PURPLE"

If you would like to copy and paste the above, please do feel free to do so. I've used all possible values and syntaxes supported by the plugin, so I hope you guys enjoy the flexibility :) If you really don't want to update, do not worry, your current names are still supported such that those are the only names present. For example

dragon-names:
- 'Your Dragon's Name' # This IS valid
- 'Your Dragon's Name|colour=WHITE' # This IS NOT valid
- 'name=Your Dragon's Name|colour=WHITE' # This IS valid

Critical Bug Fixes

02 Feb 00:50
Compare
Choose a tag to compare

Overview

I know what you're thinking... "Choco! You just released an update 3 hours ago! What are you doing releasing another version!?". Well... the short and quick of it all is that I may have accidentally broken the entire plugin when implementing the API! I'll admit, I hadn't tested it ahead of time like I usually do 😛 I typically test releases before actually drafting release notes, but this time I had not had enough time and resulted in a buggy release. But fear not! This update fixes that and a bit more!

Changelog

  • The predefined "OPEN_END_HELIX" particle shape no longer forces 6 particle streams. You may use however many streams you would like
  • Fixed a bunch of NullPointerExceptions being thrown and breaking the plugin entirely
  • API: Noted in the Javadocs for BattleStateChangeEvent#getDragon() and #getDragonBattle() that they can return null

API Additions & Config Changes

01 Feb 22:07
Compare
Choose a tag to compare

Overview

Now that I'm satisfied with the equations, I've decided to take a break from that and work on some API changes that I intended on creating for those that wish to listen for specific instances of the dragon respawn implementation. Of course, I have also received tons of feedback from you all using the plugin, and I've been listening! Feature requests, bug reports, and plenty more! I'm loving the support I've gotten for taking over this project, and I don't regret it for a second! I appreciate it more than anything, so please do keep up the bug reports and feature requests ❤️

This is a rather small release, but that's alright because you don't need large releases to benefit the community! I hope you all enjoy this update, especially developers

Changelog

  • Separated the "respawn" configuration value into "respawn-on-join" and "respawn-on-death" (You will have to add these to your configuration file manually). See below for the new configuration file
  • Fixed the "chest-spawn-chance" configuration value having 1 / 100th of its configured value
  • API: Added a new "BattleState" enum containing the various states of the Ender Dragon battle
  • API: Added a new BattleStateChangeEvent to allow developers to listen for various state changes during the Ender Dragon battle
  • API: Added a #getEnderDragonBattle(Object) method to the NMSAbstract interface to get the Ender Dragon associated with a specific EnderDragonBattle object.

New Configuration File Options:

Particles:
    egg-start-y: 180.0
    type: 'FLAME'
    amount: 4
    extra: 0
    x-offset: 0.001
    y-offset: 0.001
    z-offset: 0.001
    speed-multiplier: 1
    stream-count: 6
    interval: 1
    Advanced:
        preset-shape: 'OPEN_END_HELIX'
        x-coord-expression: 'cos(theta)'
        z-coord-expression: 'sin(theta)'

lightning-amount: 4
drop-type: egg

chest-spawn-chance: 20
loot-chest-title: 'Loot Chest'
min-loot: 2
max-loot: 6

egg-name: ''
egg-lore: []

respawn-on-join: false
join-respawn-delay: 60

respawn-on-death: true
death-respawn-delay: 300

announce-respawn: true
announce-color-one: '&6'
announce-color-two: '&e'

dragon-names:
- '&aEndy'
- '&bFalcor'
- '&cHaiku'
- "&dMylanth"
- "&eKelarth"
- "&1Mnerolth the Insane"
- "&2Verioth the Chosen"
- "&3Barroth the Gentle"
- "&4Bassilith, Lord of Ice"
- "&5Inilth, Lord of Fire"
- "&6Nveryioth, Lord of Light"
- "&8Tilenth, Lord of Death"

Bug Fixes & Stability Improvements

31 Jan 20:35
Compare
Choose a tag to compare

Overview

After yesterday's release, there were a couple of things that needed a little tidying up, because I left a lot of uncleaned code when implementing the new algorithm. I'll be honest, I was quite eager to release it to you all. Of course, I spent a lot of time on fixing as many bugs as I could and cleaned up a lot of the algorithm, and here we are today. Nothing super fancy in terms of features other than some new functions for the equations, but I highly recommend updating as it fixes numerous issues that I noticed when reviewing the code.

Changelog

  • Updates are now automatically checked asynchronously (your server performance shall not suffer 😄) every 30 minutes rather than only once when the server starts up. Online OP'd players will be notified
  • Added a little reminder to the /ded command if there is a new version available
  • Removed the neg function, as you could accomplish the exact same thing with "-3" (for example)
  • Added a bunch of new equation functions including:
    • abs: Get the absolute value of its operand (i.e. abs(-2) results in 2)
    • log: Get the log base 10 value of its operand (i.e. log(10) results in 1)
    • csc: The reciprocal of sinus, cosecant. (i.e. csc(180) results in -1.2482)
    • sec: The reciprocal of cosine, secant. (i.e. sec(180) results in -1.6709)
    • cot: The reciprocal of tangent, cotangent. (i.e. cot(180) results in -0.7469)
  • Cleaned up a bunch of the particle code to be more organized in a fancy little ParticleShapeDefinition class
  • Fixed potential NullPointerExceptions when using variables that are not supported
  • Fixed the "Particles.type" configuration option not changing the particles from FLAME
  • Fixed a couple memory leaks that were not maintained in previous versions

Reminder

Just a reminder to please use the GitHub Issue Tracker when submitting bugs, as I will notice them first. It's always highly recommended to post there. I can keep track of bug progress, label tickets and reply personally; and finally but most importantly, mention them in update notes! It would make life a little bit easier for me. Thank you very much!

Particle Equations + Update Checker

30 Jan 20:11
Compare
Choose a tag to compare

Overview

As I started in the previous release, I planned on creating some new content-filled updates for this plugin, and I have in fact followed through with that statement. Today I bring you a version that I'm really quite happy with, and I believe will bring a new type of customization for the plugin that not a lot of other plugins have accomplished yet. That, and of course, an update checker for those that want to know when I make a release but do not bother to check the resource page all that much.

As some of you may have seen on the main page of the resource page, there were a couple of .gifs added to the page since the previous release. Here is one of the more interesting ones:

Custom Particle Effects

Changelog

  • Completely rewrote the Particle system for Ender Dragon death (configuration file changed for this)
  • Redid the particle portion of the configuration file (thus requiring a configuration version bump from 1 -> 2) - Please backup your configuration files JUST IN CASE
  • Allowed the ability to write your own custom particle equations! Variables and placeholders are available in the equations, which will be explained down below. Please see this section if you plan on writing your own equations)
  • Wrote a couple pre-defined particle effect equations if you're not super mathematical, (can be specified in configuration file), including "ball", "helix", and "open_end_helix" (default), which can be seen in the above gif
  • Added an update checker which will tell operators if a new version is available on join
  • Added more default names for Ender Dragons (I thought I would get creative)
  • Fixed dead Ender Dragon's not respawning if a player leaves an end world and enters another.

Custom Equation Writing

If you're reading this section, you're most likely interested in writing some custom equations for the particles displayed after the Ender Dragon's death. This release includes an advanced recursion algorithm that allows for the parsing of custom functions, and this allows you all to write your own equations based on variables passed from the plugin. There are a couple of things I should note before you get hacking away at those equations, though!

  • These equations are fixed on the x and z plains. You cannot modify the y coordinate
  • The particles are constantly moving downwards
  • There is no way to change the center of the particle effects. It will always center at 0.5, 0.5, (the center of the portal)

Let's get started with what you're going to be looking at for writing your own equation. First, set the following configuration option to "CUSTOM":

Particles:
    Advanced:
        preset-shape: "CUSTOM"
        x-coord-expression: cos(theta)
        z-coord-expression: sin(theta)

This lets the plugin know to use the custom equations specified below, which are default to the equation of a circle. Pretty basic stuff. As you can see, the expression parsing supports some functions and a couple variables which are later replaced by the plugin based on the current iteration of the particle loop. On top of that, basic arithmetic functions including addition (+), subtraction (-), multiplication (*), division (/) and power (^) are all supported as well. Here are other supported values:

Variables

Variable Description Possible Values
x The x coordinate of the particles Typically, unless modified, this is set to 0.5
z The z coordinate of the particles Typically, unless modified, this is set to 0.5
t The current time position of the animation Starting at 0, incremented 1 every iteration
theta A placeholder for theta (in degrees) Starting at 0 degrees, incremented 5 every iteration

Supported Functions

Function Description Example
sqrt Square root a specified value sqrt(25) ... results in 5
neg Invert a value to a negative (Alternatively, - and a number) neg(23) ... results in -23
sin The sine trigonometric function sin(30) or sin30 ... results in 0.5
cos The cosine trigonometric function cos(45) or cos45 ... results in 0.7071
tan The tan trigonometric function tan(60) or tan60 ... results in 1.7320
rad Convert a value from degrees to radians rad(180) ... results in 3.1415, or, pi
deg Convert a value from radians to degrees deg(6.2832) ... results in 360

Examples

For example, taking a look at the equation for an open-end helix, this is what we have:

x-coord-expression: cos(theta) * (100 / t)
z-coord-expression: sin(theta) * (100 / t)

Though this equation is rather special. In the code, this is how it's being parsed, and it's forcibly setting a specific configuration value, (which you may want to take a look at as well)

this.particleStreamInterval = 360 / 6;
this.xExpression = MathUtils.parseExpression("cos(theta) * (100 / t)", variables);
this.zExpression = MathUtils.parseExpression("sin(theta) * (100 / t)", variables);

The configuration option, "Particles.stream-count", allows you to modify the amount of particle lines that are displayed in the animation. This is what gives the helix 6 lines of particles trailing down. These particles are all separated at an even interval of theta (i.e. 6 lines are all separated 60 degrees between each other respectively. Thus, "theta" can change 6 times in a single animation time, t).

It is important for you to pay attention to what you write in these equations, as they can potentially break all particle effects in the long run. If you really do not want to mess around with any equations, please do feel free to check out the pre-defined options, "BALL", "HELIX" and "OPEN_END_HELIX".

Submitting your Animations

If you have written any equations you are proud of, do not hesitate to inform me of them in the ticket tracker, and I will write them in as predefined functions. Please include a gif (or another video format) in the ticket tracker so I may see them in action! I'd be more than happy to see people's creativity unleashed to see what they can really do! I'm excited about this feature mostly because of the community aspect that it brings.

Version Independence: 1.9.x - 1.11.x Support

28 Jan 18:27
Compare
Choose a tag to compare

After half a year of inactivity from the original author, NinjaStix, (who did a fantastic job might I add), I have decided to update this plugin and provide not only support for 1.11.x, but also for 1.9.x! Code implementation was done directly and only supported 1.10.x versions, which I felt was poorly implemented. I decided to take the initiative to release a proper version with support for all new Ender Dragon battle updates to allow for rewards for all of your players, whether you play on 1.9 or on 1.11!

NOTE: I have not tested whether it works on any version other than 1.11.2. If you are willing to test this on newer versions, please send me a PM on the website stating that this works on other versions. I would very much appreciate the help.

Nothing has changed externally for this plugin... yet. I have found a love for this project and due to that, I plan to update this plugin relatively consistently as long as NinjaStix decides not to return. Or, alternatively, I would be more than welcome to manage a fork and provide releases :) This is a unique plugin and I'm impressed with the work that was put in by NinjaStix. I commend him for his work. All copyright still remains in his possession, and the license is present in every class I added/modified. Anyways, let me proceed with what has changed internally:

  • Added support for version 1.9.0 - 1.9.4, 1.10.0 - 1.10.2 and 1.11.0 - 1.11.2
  • Fixed a couple issues regarding the efficiency of the plugin as well as a few memory leaks
  • Documented all the code to provide insight as to what methods do
  • Reorganized the package structure rather than being a 1-dimentional package layer
  • Compiled the plugin with Java 8! Servers running Java 7 will not be able to use this update. Please update your server.

If you have ANY issues regarding this plugin, please do not hesitate to leave a Ticket in the Issue Tracker. That is what it's meant for. Do it... it's waiting for you. Look at that shiny link... you know you want to. CLICK IT!

I hope you all enjoy this release!
(The original project can be found here)

EDIT: For those of you that have used the loot.yml in previous releases and are having issues, please see the following issue regarding a fix for this issue