Closes#793
Please note this is not a simple fix and applies it through a large
series of changes that may need to be noted in case of further troubles
in the future.
To accomplish this correctly, if a player is a really dead fighter, his
state and position will not be updated in a number of places. This is
all handled by the respawn hook for really dead fighters, which by the
way I rewrote because yolo. It makes a (potentially incorrect)
assumption that there is no reason a zone should hold a previous player
state when they join, so it is deleted for safety purposes. If not, and
the player leaves the zone, they may lose items. This may fix other
related inventory reset issues.
Warzone now contains a few new methods to make adding and removing players from the zone easier. This was made in response to every join mechanism having to rewrite the same ~25 lines of code to handle adding players to a team. This was also done to replace the even more bulky code used to return stolen structures.
This also removes a few unused jobs as I am trying to transition away from them, as they don't really help if they are not being used for async tasks, batches, or timers.
A better way of managing teleports at the end of a game or when leaving normally has been added.
Nimitz file format. Support for custom blocks. Old warzone volume files get converted to .sl3 when you first run your server with these changes - this may take a while if you have many warzones.
Thanks @cmastudios for all the hard work on these changes.
This fixes some issues found during @taoneill's review of the code. It
also adds a few features with blocks, such as a modify block whitelist.
KDR updates are now stored at the end of each battle in a warzone.
Closes#681, closes#672, closes#682, closes#683, closes#689, ping
#688.
BlockInfo kept making me cringe every time I had to look at the code. More importantly it only had support for storing item IDs and no data. It was way obsolete versus new API.
Most player-interfaced features such as event responders, signs, and
some player commands now have their messages stored externally in a
resource bundle. This allows for easy localization of the plugin by
copying the main messages.properties file and translating all the
messages into the language of choice.
Also thanks to @AlexMerser21 for the partial russian localization of the
plugin. This means that War servers can now show messages in the russian
language simply by starting the minecraft server with the flag
-Duser.language=ru.
Item/damage/anything ID's have now become deprecated in bukkit presumedly
in preparation for any sort of official server modding API. This switches
war from using IDs in most cases to bukkit-provided classes such as
ItemStack.
Players are no longer silently kicked out of their team if they try to join
a non-existant team with /join. Fix an inconsistency with the format of the
team join notification message.
With the new warzone configuration property "scoreboard", zone makers can
set the type of scoreboard to be used. This may be "none", "points", or
"lifepool". If the scoreboard type is not "none", then a scoreboard will
be shown on the right side of the screen in the warzone. The shown
scoreboard will display the configured option.
Also, 3-year-old feature request COMPLETED! Use the command
/zone <warzone-name> scoreboard to view a scoreboard from anywhere.
TeamKind has been changed to store colors in a DyeColor object instead
of using a byte value store. This improves readability and makes the
code future-proof.
All listeners are now unregistered when the plugin gets unloaded. This
removes the need for listeners to check if War is loaded and prevents
duplicate registration. I would prefer if the ability to unload and load
the War plugin was completely removed, however, as there are plugins out
there such as PlugMan that are dedicated to cleanly reloading plugins.
The main purpose of this was to clean up all issues and problems
reported by the eclipse java IDE. 0 warnings are shown by the IDE now.
/setteam <color> now will add an additional spawn point if the team already
exists.
When a player joins a team in a warzone, they will be sent to any one of
their teams spawn points, picked at random.
This change required major modifications to the underlying teams subsystem
in order to support multiple spawn points for the team.
Backward compatible with 1.4.5-R0.2 and previous. Switched version to
War v1.7.4-PREVIEW. Lobbies and warhubs should line up properly now, at
least. Commands such as '/setzonelobby east' still use the wrong
directions.
Change flag, monument, bomb, cake and spawn look by typing "/zonecfg
material:<main/stand/light>" while holding the block of your choosing.
Complements the lobbymaterial and warhubmaterial settings.
Brought back synchronization.