Commit Graph

647 Commits

Author SHA1 Message Date
Connor Monahan
ce1b60b85f Make country-specific localizations work properly
Language tags such as pt_BR and ko_KR now work correctly
2014-01-07 20:51:52 -06:00
Connor Monahan
a92b2ea4ae Magic wool block appears when hat clicked 2014-01-07 20:18:32 -06:00
Connor Monahan
c6c93ba44f Set helmets on players instead of blocks 2014-01-07 19:49:22 -06:00
Connor Monahan
20068cbb15 Fix player list spacing issue 2014-01-07 18:37:33 -06:00
Connor Monahan
b011d3a46f New active sign, gets random warzone with players 2014-01-07 17:59:08 -06:00
Connor Monahan
bc07a60b51 Only randomly teleport to zones that are enabled 2014-01-07 17:51:49 -06:00
Connor Monahan
dc764de258 Restore maven2 compatibility
Adding metrics support via shading caused a unexpected break due to versions of shade being incompatible with older versions of maven. In theory, everyone should update to maven3 if possible. However, I would like to retain compatiblity for our older CI servers.
2014-01-04 17:40:49 -06:00
Connor Monahan
a45a833e68 Merge branch 'metrics' 2014-01-04 17:08:41 -06:00
Connor Monahan
fdc4e90635 [Lang] Add FR HU KO NO PL PT localizations
This commit adds localizations for the languages French, Korean, and Norwegian. Portuguese, Hungarian, and Polish are still a work-in-progress but they have been added. The languages German, Spanish, and Russian have been updated also.
2014-01-03 20:16:28 -06:00
Connor Monahan
0805a04cad Collect metrics statistics from servers
War now collects statistics from servers running the plugin. The statistics are minimal. The goal is so the developers of the plugin can tell what areas they need to do more work in.
In addition to the default statistics collected by PluginMetrics, War sends the number of warzones and if certain plugins that War interfaces with are enabled.
To prevent your server from sending statistical data, set "opt-out" to "true" in plugins/PluginMetrics/config.yml.
Closes #716.
2013-12-27 18:13:30 -06:00
Connor Monahan
ca03c96173 [Behavior] Blockheads:true now gives leather hat
Warzones that previously used blockheads:false during the preview to get a properly colored hat now need to switch to blockheads:true for a hat. Old warzones that have blockheads:true will now have colored helmets instead of block heads.
Closes #528.
2013-12-27 15:31:11 -06:00
Connor
59779eb0e5 Merge pull request #718 from taoneill/nimitz-v2
Optimize nimitz file store

Tested on bukkit server 1.7.2 with a warzone originally created with war 1.7.4, therefore upgrade works properly.
2013-12-26 17:11:11 -08:00
cmastudios
0af348f2cb Merge branch 'master' into nimitz-v2
Conflicts:
	war/src/main/java/com/tommytony/war/Warzone.java
2013-12-24 20:40:35 -06:00
grinning
c16bc6ca5f Maybe closes gh-517
returns the code after the leaving of the zone. Not sure if it works.
Don't think it returns under all cases

Conflicts:
	war/src/main/java/com/tommytony/war/Warzone.java
2013-12-24 20:31:40 -06:00
cmastudios
228ec2299b Prevent block duplication
Closes #722, closes #723. War prevents thieves from messing with their inventory and anyone from messing with their block head.
2013-12-24 17:11:29 -06:00
cmastudios
a120393060 Fix unbreakable regression
Closes #721. Zonemakers can modify blocks in an unbreakable zone when outside of it again.
2013-12-24 16:31:51 -06:00
cmastudios
84a5750063 Store warzone structures in main zone database
Instead of storing strutures in /dat/warzone-x/volume-y.sl3 anymore, they are stored in the main database file created for the warzone in /dat/warzone-x/volume-x.sl3. Tables is created for each structure, with the prefix being structure_HASH_. The HASH is a string hashCode run through a bitwise AND with Integer.MAX_VALUE, to prevent negative values from showing.

This is a step on the road to storing everything in a single database for the warzone. My plan is to eventually store warzone configuration in the database as well. In the ideal setup, there would be a table for teams, structure definitions, loadouts, and materials. Sadly, for configuration, we would most likely have to store teamcfg & zonecfg rules in a key-value table, unless @taoneill or @grinning has another idea.

I still need to do testing to make sure everything is backward-compatible. This conversion happens properly for nimitz-format zones and zones in the process of converting from degaulle format. When messing around earlier, I found that .txt configurations were broken due to numbered teams. I need to take a look at that. Most likely it is due to WarzoneTxtMapper not being maintained. The loader will probably have to be modified to load the new volumes and teams properly.
2013-12-08 01:46:26 -06:00
cmastudios
034b51ae03 Prevent using chests while capturing flag
Stops duplication of wool.
2013-12-07 20:49:25 -06:00
cmastudios
300f2e383b Don't reopen the file during a batch reset
Connections to the SQLite warzones are now kept open when iterating a batch reset.
2013-12-07 20:34:59 -06:00
cmastudios
346fd25955 Prevent joining zone during reset 2013-12-07 19:23:12 -06:00
cmastudios
df871c1c5b Allow disabling of automatic warzone block reset
Configuration key: RESETBLOCKS
2013-12-07 16:38:48 -06:00
cmastudios
67bb509735 Stop saving Air blocks to the database
War now skips over saving Air blocks. Instead, the plugin loads all solid blocks back into the world and then sets each block to air that was not changed.

Benchmarks:
Warzone molecule
Block count 2,487,555
Speed 50,000 blocks per tick
Intel Core i7 @ 3.6 GHz * 8

Before:
File size 70 MB
Reset 23 seconds
Save 16 seconds

After:
File size 54 MB
Save 5 seconds
(no changes)
Reset 4.9 seconds
(set to air)
Reset 31.17 seconds
(set to stone)
Reset 18.23 seconds
2013-12-07 16:22:50 -06:00
cmastudios
7ef61af277 Fix logger format arguments not being applied 2013-12-07 16:15:41 -06:00
cmastudios
78ef1dd4fc Merge branch 'no-save-air' into nimitz-v2
Conflicts:
	war/src/main/java/com/tommytony/war/mapper/ZoneVolumeMapper.java
2013-12-07 03:19:36 -06:00
cmastudios
60b62c8b71 Merge branch 'master' into nimitz-v2 2013-12-07 02:44:01 -06:00
cmastudios
d040edcc4e Attempt at some slight saver speed ups 2013-12-07 02:31:11 -06:00
cmastudios
21f91a00fc Configuration setting to allow ender chests 2013-12-07 00:48:03 -06:00
taoneill
6eed5bbe19 Coalesce many metadata columns in warzone blocks table into one.
- Container, sign, skulls, and more are not just a single column
- Compacting each warzone database after migration from schema v1 to v2 (to get disk space savings, but might take a while for large zones)
- Showing a few decimals on time value in zone reset messages instead of just showing "Reset in 0 seconds" all the time
2013-12-01 00:48:11 -05:00
cmastudios
5c2474cb70 Don't modify block type/data if it has not changed 2013-11-24 16:41:26 -06:00
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