Beastmaster wolf spawning suffered from the same issue as the Wizards
"Summon Wolves" spell: spigot has an issue when setting an owner to a
wolf or ocelot without a previous owner. See SpigotUtil for details.
Elo and Division should be displaying properly
Cleaned the code up a bit
Added endElo() to Game.java to handle team Elo code
Added event listener to check for GameState.End in TDM to call endElo()
This fixes the Summon Wolves spell in Wizards.
Explanation:
- Wolves keep track of their most recent owner.
- When a wolf is assigned a new owner, it updates the data
watcher with the new owner's UUID
- During this process, the old owner's UUID is checked
against the new one
- If the wolf didn't have a previous owner, the old owner's
UUID is the empty string.
- UUID.fromString() is called on the empty string, and throws
an exception.
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.
Consequently, elo code is actually being called now
Bukkit.broadcastMessage calls have shown where things are breaking
handleElo() added to EloManager to facilitate movement of team elo code
preparing to use EloManager's getNewRatings() method to
calculate team elos
Previously, a player would erratically become a spectator if s/he
spammed the "spectate next player" action between rounds (i.e.
left-click while spectating a player).
EloRanking turned on for Domination, Team Deathmatch, Turf Wars, CTF
Database QoL changes made to EloManager and EloRepository
--Unfortunately, Database still seems to not be updating properly
--Something on my end, or something to do with the queries? Unsure.
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.
Remove the--now unnecessary--classes that inherited from GameOption.
Consequently, the creation and implementation of GameOptions should be much more efficient.
Note: it may be necessary to add decimal points to doubles and to cast 'long' data types as 'long'.
The above note generally applies to numerical values, but may apply to other values, as well.
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.