Commit Graph

718 Commits

Author SHA1 Message Date
cmastudios
cc2b13633c Only update twice if we are changing tile data
War originally modified each block twice when loading, even if there was no metadata. Now it will only update once if there is no metadata.
2013-11-24 16:35:56 -06:00
taoneill
99bfbc5e58 Allow for concurrent zone resets without breaking reset notification.
- I'm an idiot I should've thought of this on the first go around, thanks @cmastudios
- Used a synchronized map, just in case
2013-11-19 19:26:55 -05:00
cmastudios
77b943ce5e German&Spanish translations. Thanks GatuCrafter, McServerExpertDe 2013-11-19 17:00:01 -06:00
cmastudios
2926387ee4 Add warcfg language parameter. Closes #686.
Allows for dynamic language switching.
2013-11-19 16:55:40 -06:00
cmastudios
0f35c4dc4c I have sinned a great sin.
Forgot to switch IntelliJ to use tabs.
2013-11-19 15:53:30 -06:00
cmastudios
66158ae44b Toggleable team chat. Closes gh-317.
Sorry @grinning, I tried to cherry pick your stuff but it did not work _at all_.
2013-11-19 15:47:01 -06:00
taoneill
d4d5778175 Don't notify the command sender twice if he's in the lobby or on a team while resetting zone. 2013-11-19 00:01:38 -05:00
taoneill
31a2deef0f Add zone reset complete message.
- Also, notify command sender with progress report, not just people in teams or in lobby
2013-11-18 23:53:43 -05:00
taoneill
df85b176b7 Remove broken getZoneByTeam logic
- Replaced with warzone getter on Team objects
- Should close #704
2013-11-17 23:34:31 -05:00
taoneill
97646becc3 Prevent ConcurrentModificationException while deleting a loadout.
- Closes #703
- Don't loop on an array while deleting items from it
2013-11-17 22:49:09 -05:00
Connor
b0fadd4459 Fix null string bug
Thanks @smurfofsmurf
2013-11-04 21:20:08 -06:00
cmastudios
c7e33dd1ca Fix message formatting and CS problems. Closes #700 2013-11-03 18:58:14 -06:00
cmastudios
c6d2c6cbcc Configurable war zone max size
This war config option, MAXSIZE, can be used to change the limit on war zone size. Some reasons for using this could be to have a very long war zone or to limit the size from being abused by your zone makers. Thanks to @Delgado804 for the idea.
2013-11-03 15:58:27 -06:00
cmastudios
ceeea15794 Subroutines for join/leave zone boilerplate & thief removal
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.
2013-11-01 18:05:02 -05:00
cmastudios
3791a027a0 Clear import warnings 2013-11-01 16:15:57 -05:00
cmastudios
13a6f8ba79 Warzone teleport signs 2013-10-27 17:23:43 -05:00
cmastudios
a4e8a4be83 Make sure output health is in bounds. 2013-10-27 16:59:53 -05:00
cmastudios
c44d18f8f8 Ends war in middle east. Closes #693. 2013-10-27 16:15:45 -05:00
cmastudios
215551ec15 Don't allow non-entites to damage players in spawn. Fixes #696 2013-10-27 16:10:34 -05:00
cmastudios
a039e65a8a Don't burn important blocks. Fixes #697 2013-10-27 16:03:28 -05:00
cmastudios
9e6b0d9f17 Fix color after custom item names 2013-10-27 15:59:39 -05:00
taoneill
df6f47907f Merge pull request #684 from taoneill/nimitz-file-format-r3
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.
2013-10-23 21:45:41 -07:00
cmastudios
f814f71cf3 Updated russian localization from @AlexMerser21.
Closes #692. Had to add manually because I have to convert the messages to a encoded format or they do not work in game.
Cyrillic diff: http://paste.ubuntu.com/6254326/
English diff (google translate 'rough'): http://paste.ubuntu.com/6254303/
2013-10-17 20:20:21 -05:00
cmastudios
dd6f425368 Fix for infinite exploding TNT near warzone edges. 2013-10-16 19:43:23 -05:00
cmastudios
7621bdd321 Fix some issues uncovered in review, add block features.
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.
2013-10-16 18:55:07 -05:00
cmastudios
f44c2528e7 Fix war format speed regression with metadata
Found you could still get the raw data value by converting to an ItemStack, so I am using that now to reduce the lag caused by reading the serialized form of the metadata class.
2013-10-12 21:58:38 -05:00
cmastudios
ac12c2af29 Fix nasty mass destruction volume bug when volume is moved
Have to experience it first hand yourself with your own work. Bugs suck.
2013-10-09 23:15:07 -05:00
cmastudios
60e74eff99 Load war zone blocks in batches to prevent server hangs
War zone blocks are now loaded from the database at a configurable speed of blocks per tick. This prevents an entire server from hanging whenever a war zone is reset. The speed can be increased or decreased based on your server's performance.
2013-10-06 13:31:56 -05:00
cmastudios
aacd93b960 Add new volume format. Closes #527, closes #510, closes #500, closes #255
Block items are stored as their Material name. Block data is stored with the bukkit configuration serializer. This supports custom blocks. Tested with MCPC-Plus server.
Currently supports saving some tile entity data, such as sign text, all containers, note blocks, juke boxes, skulls/heads, command blocks, and basic mob spawners. The database is easily extensible for future blocks.
2013-10-05 16:21:25 -05:00
cmastudios
1722c86a71 Remove deprecated BlockInfo in favor of Location/BlockState
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.
2013-10-05 02:04:28 -05:00
cmastudios
6e9efc7a8a Closes gh-679 - Load chest data for trapped chests 2013-10-04 23:38:07 -05:00
cmastudios
3c80815428 Fixes gh-677 - Fix for bukkit chest inventory change 2013-10-02 15:57:46 -05:00
cmastudios
5913f73fcb Internationalized player interface, Russian locale
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.
2013-09-29 00:42:35 -05:00
cmastudios
a7458bf261 Fixes gh-640 - Glassify a list of block types
Other block types than AIR and WATER are now automatically "glassified" by
the warzone wall guard.
2013-09-27 18:12:18 -05:00
cmastudios
39b0ead3bd Using more bukkit interfaces rather than IDs
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.
2013-09-27 18:11:09 -05:00
cmastudios
e38b2aa62b Add event when battle ends
Actually no, I just forgot to stage this.
2013-09-20 16:15:05 -05:00
cmastudios
a4f1b29922 Properly implement War event API, some cleaning.
I changed some of the new event API code from @BenMenking to use more
Bukkit provided frameworks like Player and use basic java structures
instead of checking integers.
2013-09-20 16:11:44 -05:00
Ben Menking
e2f6e02ae7 Added events for various gameplay events
Added the following events for other plugins to hook into:
WarPlayerDeathEvent, WarPlayerKillEvent, WarPlayerLeaveEvent,
WarPlayerThiefEvent, WarScoreCapEvent, WarTeamWinEvent,
WarThiefDeathEvent
2013-09-16 11:47:37 -04:00
cmastudios
2bddae16a2 Restore saturation and tweak some soup pvp actions 2013-09-10 19:14:39 -05:00
Nicholasntp
d94b7b3e78 Soup PvP Added
Soup PvP is now a part of warzone config.
Refer to Issue 651.
2013-09-10 19:12:02 -05:00
cmastudios
f1ce78907e Fix issues with joining a team.
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.
2013-09-10 18:57:58 -05:00
cmastudios
12b5f8350f Handle deaths after they have been counted and rewarded.
This prevents a problem where players could be rewarded after the game ends
2013-09-10 18:11:21 -05:00
cmastudios
dbac21aa44 Add MySQL kill/death logging support. Closes gh-658
War now logs kills and deaths to a MySQL database. Records are created for
every player at the end of each round with the current date and amount of
times the player killed and was killed for the entire round. It has built
in support for automatic & configurable log clearing past a certain date
(default is 1 week).
2013-09-10 17:51:30 -05:00
cmastudios
0dc7ac837f Added configurable airstrikes, based on work from @grinning. 2013-09-10 17:51:03 -05:00
cmastudios
26ec11f46c Allow the use of multiple items in rewards.
This also allows the use of XP and points as rewards.
2013-09-10 17:51:02 -05:00
cmastudios
17aef5e162 Add base for configurable KS rewards. Fixes gh-506
Killstreak rewards can be configured in the set.war.killstreak section of
war.yml. Rewards will only be applied to players if the team/warzone has
KILLSTREAK set to true.

The configuration section will get populated on generation of war.yml, or
may be manually added to older configurations.

Currently the system supports messaging the entire warzone and just the
attacker. It only supports rewards of items and health at the moment; more
are expected to arrive.

This commit also moves XPKILLMETER into the team-specific section of the
config.
2013-09-10 17:51:02 -05:00
cmastudios
c66120c4fa Fixes gh-611, gh-612 - Add kill count system and kill meters with XP.
The killstreak counter shows a message if the player has more than 5
kills. I have also added an example reward system with points, but did not
enable it yet (needs discussion).

Through the warzone option xpkillmeter the XP level will get updated with
your current kill streak amount. This gets reset every time you die and
is added to every time you kill a player. If this option is enabled,
players cannot gain XP in the warzone.
2013-09-10 17:50:40 -05:00
cmastudios
2738d2e358 Add scoreboard features and configuration options. Fixes gh-623, gh-45
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.
2013-09-10 17:27:05 -05:00
cmastudios
b367cc53ad Add ability to bypass warzone lobby. Fixes gh-669
If a zone has the property autojoin & autoassign set to true, then
players will be directly assigned to a team when they go through the
Warhub portal for the zone and brought back to the Warhub when they
leave the zone.
2013-09-07 18:10:23 -05:00
cmastudios
890e78fd5d TeamKind cleanup, warning fixes, closes gh-631
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.
2013-09-04 23:27:27 -05:00