The new challenge selection system, picks a random challenge from
the list as a starting point. Once the challenge is ended, the next
one in the list will be selected. That process continues, until the
index is out of bounds, and from that point, a new starting point
will be selected. During that process, any challenge that is picked,
is also reviewed to make sure it's suitable according to the player
count. If that's not the case, the selection process will continue
until one challenge is found. If there is no appropriate challenge,
the game will be ended.
In addition to those changes, there are a couple of bug fixes and changes.
At first, some methods that keep track of player lists were renamed and
secondly, the enchantment lore is now hidden on challenges that use items.
Players that die during a challenge have the ability to fly
around as spectators. Although, once the challenge was ended
their fly mode was removed and they would fall for a very short
amount of time, which was noticeable. With that fix, players
now get reset once they are teleported to the spawn locations
of the next challenge. That happened because during the player
reset and spawn teleportation, the map would be generated, as a
result, causing a very small notable delay.
Moreover, win placement was fixed. In the previous version, the
third player would appear as second and the second player would
appear as the third one. The cause of this issue was that, after
the second and the third player is added to the winner list, the
last player that is remaining alive is added as first. To fix that,
I've implemented a swap method that changes the location of the
second with the third player.
The removeExtraBlocks() method was changed, in order to include all
arena blocks. The previous version did not remove all extra blocks,
as it was using the getArenaSize() method inside the for-loop, which
returns a different integer depending on the challengers.
To fix that, I've implemented the '_arenaStartSize' field to store the
starting arena size value that is used in the map generation method.
Separated functionality into different methods in order to improve
readability and maintainability. All four abstract methods were
updated, in order to make sure they work as intended without any
second thoughts.
Moreover, a PlayerQuitEvent listener was added to remove players from
the '_cooldown' array list and a null check in the onEnd method, to
prevent any null pointer exceptions.
Also, there were some minor display changes, regarding titles and chat
messages on the moveTextAndSound() and cannotMoveTextAndSound() methods.
Lastly, the bedrock layer was removed from map generation.
Added comments on game classes, except challenges
and statistics trackers.
Removed challenge validity checks from onCollide method in Anvil Dance
and Falling Blocks, since that is now handled on the Collide method
located in the main game class.
Separated functionality into different methods in order to improve
readability and maintainability. All four abstract methods were
updated, in order to make sure they work as intended without any
second thoughts.
Also, a new PlayerQuitEvent listener is added, in order to remove
players from the '_survivedWaves' hash map, which keeps track of
the waves every player survived.
Lastly, onCollide if-statement logic was reversed to reduce and
simplify the lines of code inside the method.
- Cancel teleport event to prevent the game from breaking.
- Block Lobbers: Fix falling block spawning and item drops.
- Color Change: Fix platform not spawning after first stage.