Got my head out of my butt and figured how I was casting bytes to ints
all wrong. War map format can support block ids up to 255 now with this
ugly patch. This is just to tide people over until a format switch to
something that will supports custom blocks and items.
Closes gh-530. Weirdly, it seems that some new blocks (e.g. emerald
block) get saved with negative block type ids. For the time being, the
absolute value of the negative type id is used instead. The console spam
should be lessened as well - leading to less crashes. Still gotta find
the reason for the weird block ids, though.
Closes gh-526. Restoring a user's inventory when geting kicked. This
should technically solve an inventory reset problem. I've always found
the kick-prevention pretty hacky, anyway. Hopefully, the accidental
flying in warzones caused by War's teleporting people around has been
fixed upstream by the Bukkit folks since back in the day when this was
an issue.
Closes gh-503. Now letting players just walk through their own spawn
really fast (instead of just getting them stuck blindly), and being a
bit smarter about where I teleport them (i.e. mostly not in walls
anymore). Much less brutal than in v1.7.2.
The inventory reset bug was caused by a concurrency issue, but all this
sychronization added some now unnecessary weight. Hopefully this should
help with the lock ups that have been happenning with v1.7.2.
Prettified the /warcfg, /zonecfg, /teamcfg and other usage outputs.
Removed duplication by using command aliases. Grouped War, warzone and
team settings together for more clarity. /setteam and /setteamflag now
have pretty colors.
Closes gh-497. Before, getting warpped or dropping out of a warzone
could cause you to auto-cap the flag or the cake. Bad. Players now
simply drop their payload, get respawned and the structures get reset.
Bomb carriers are forced to drop their bomb as well.
Closes gh-496. New can't-re-enter-spawn protection was conflicting with
the minplayers/minteams check that used to bring back everyone to spawn
as soon as the limit was hit. From now on, you will only be stopped from
exiting the spawn after your next death. This is how it probably should
have been implemented from the start - much less brutal when a player
leaves the match suddenly. :)
Closes gh-493. Looks much better. Just had to drop an old ChatFixUtil
from the olden days before Bukkit at all that fancy end-of-word line
breaks built in. Should have done this much earlier. Thanks for
reminding me to remove this @cmastudios.
Temp files tend to accumulate rapidly if some zonemakers are
particularly trigger happy with /savezone. Added a warning. Should
probably add a real limit on number of oldversions that can be saved.
Closes gh-491. Players can now safely bring their own inventories in the
warzone. They still get it back after leaving, but now thei own items
can be used to replace the default loadout. You *need* to have a loadout
named "default" available in your warzone.
Closes gh-486. There will still be duplicate numbers when old versions
are deleted, as the version only takes into account the number of old
versions in the /temp/oldversion/warzone-x/ folder.
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.
For @shankomaster. This has the newer features but no endgame lock
around player deaths and flag/cake/bomb thief movements.
I'm not sure I really want to remove this, since a lock shouldn't cost
much usually and I thought through the threadsafe logic so it would work
properly.
First, make sure you have a block (or air) in you hand. Then use
/warcfg warhubmaterial:<floor/outline/gate/light> or /zonecfg
lobbymaterial:<floor/outline/gate/light>.
This is from a previous commit but: when you have AIR in your hand and
you change the floor or the floor's outline, that tells War to leave the
user-build or natural original floor in place.
New and cool: setting down the warhub now only clears the blocks needed
for players to find the gates, letting you build a nice warhub that
won't get wiped. Lobbies now also clear only a small path for players
instead of the whole volume.
Closes gh-472. The periphery of opponents' spawns can't be built on. In
other words, all teams have a "no other team can build right next to my
spawn" protection 1 block wide all around their spawn. This should let
people exit the spawn with their loadout select, then use their items to
dig themselves out of any now-harmless trap.
Closes gh-63. Warhub and lobby materials can be customized. Warzones
take warhub materials as default. Customizable materials: floor, outline
(of floor - NEW), gate, light. Only changeable through the war.yml or
warzone-x.yml file.
Closes gh-480. When you add a new loadout to a warzone, you now inherit
the default loadouts automatically - they are copied from War's default
inventories. Similarly, when you add a new loadout to a team, the
warzone's (or War's default) loadouts are copied and the new loadout is
added to that collection. This was the intended behavior.
Closes gh-444. Fixed hopelessly broken /renamezone command. Now making
backup copy of renamed and deleted warzone to temp folder. Also,
/savezone now makes backups of old versions before saving if the
keepoldzoneversion:true setting. No more will you have to suffer the
pain of a mistakenly overwritten warzone. Hurray! New standalone War
logger and log file in same temp folder. More logging added to every
command to make tracking down history easier.
Closes gh-407. Closes gh-323. Inventory reset bug was due to the
combination of the respawn timer and a badly coded loadout-equip timed
job. The end-of-game events are now synchronized to prevent simultaneous
game-end and one game from bleeding into the other.