Commit Graph

559 Commits

Author SHA1 Message Date
Olof Larsson
f6aa6f63ac Remove some unused zcore files. 2013-04-10 10:35:35 +02:00
Olof Larsson
3b61a2be9b Using MCore DiscUtil is easy enough since it was backported. 2013-04-10 10:34:12 +02:00
Olof Larsson
61b526e387 First pass at using Txt. 2013-04-10 10:32:04 +02:00
Olof Larsson
433d45ae4c Add MCore as a dependency, remove CraftBukkit and use Bukkit. MCore and Bukkit libs should be manually maintained for now. 2013-04-10 10:18:34 +02:00
Olof Larsson
c6ea2016cb Instance and construct pattern for Colls does not seem to work before full mcore migration. 2013-04-10 10:10:28 +02:00
Olof Larsson
879e8b4170 Taking a look in FCommand. 2013-04-10 10:00:40 +02:00
Olof Larsson
14715d1cfc Rename adapter classes. 2013-04-10 09:54:42 +02:00
Olof Larsson
3ef3492c68 Fix indentation style and note invalid approach in EconLandRewardTask. 2013-04-10 09:47:32 +02:00
Olof Larsson
d2e261a275 Get rid of old CB refference trick to get creature type. 2013-04-10 09:44:15 +02:00
Olof Larsson
57f5372d43 Removing some deprecated stuff and fixing some ASCII art. 2013-04-10 09:40:39 +02:00
Olof Larsson
27cee7d6f7 Event cleanup pass 1. 2013-04-10 09:34:14 +02:00
Olof Larsson
363a63bf3a No outer API plox. The inner classes should be improved to be good enough. 2013-04-10 08:56:10 +02:00
Olof Larsson
6d75465938 Remove warning since it won't be required after MCore introduction. 2013-04-10 08:51:37 +02:00
Olof Larsson
56ae5b9c70 Move the adapter to the adapter folder. 2013-04-10 08:48:21 +02:00
Olof Larsson
1f303aef91 More minor tweaks to TerritoryAccess 2013-04-10 08:47:52 +02:00
Olof Larsson
ab498b9f60 Use .get() method always. 2013-04-10 08:40:41 +02:00
Olof Larsson
00774087d3 Some minor cleanup to TerritoryAccess source code. 2013-04-09 14:05:00 +02:00
Olof Larsson
a891fc8a0a Decouple TerritoryAccess and it's adapter. 2013-04-09 13:53:37 +02:00
Olof Larsson
936c28d5a9 Move all in the struct package to main package. 2013-04-09 13:24:55 +02:00
Olof Larsson
a726e1c49f Rename FPlayers --> FPlayerColl 2013-04-09 13:22:23 +02:00
Olof Larsson
e3d6a4ec8e Put instance and construct logic in the top of ConfServer. 2013-04-09 13:18:05 +02:00
Olof Larsson
1b0c0a4b72 Rename Conf --> ConfServer. 2013-04-09 13:15:25 +02:00
Olof Larsson
c8870d10d4 MCorify the MPlugin class Factions slightly. 2013-04-09 13:12:13 +02:00
Olof Larsson
ecefb44d10 Remove CAPI integration since that plugin is abandoned. 2013-04-09 13:03:47 +02:00
Olof Larsson
f119fbb6f6 Remove old Essentials chat integration features. 2013-04-09 13:02:40 +02:00
Olof Larsson
c88847bd3e Rename P --> Factions. 2013-04-09 13:00:09 +02:00
Olof Larsson
8a4b26cbd9 Rename Factions --> FactionColl 2013-04-09 12:58:39 +02:00
Olof Larsson
ff4b85fcf4 Add in comment sepparators like in other MCore based plugins. 2013-04-09 12:57:33 +02:00
Olof Larsson
971d2004f2 Renaming Permission --> Perm and moving to main package. 2013-04-09 12:56:29 +02:00
Brettflan
4e6c12d995 New permission factions.claim.radius (granted to all players by default), which is now required in order to specify a radius with the claim command. 2013-01-29 19:21:33 -06:00
Brettflan
15024bf880 Added missing new permissions, and minor cleanup; switched Rel enum values back to previous values, for the sake of other plugins which might check against the actual enum value (for better compatibility with both 1.6.x and 1.7.x+ versions)
IMPORTANT NOTE:
Existing plugin users who are upgrading to this version will likely need to grant default permissions for recruits, like so:
f config factionPermDefaults door recruit
f config factionPermDefaults button recruit
f config factionPermDefaults lever recruit
f config factionPermDefaults build recruit
2013-01-26 20:38:04 -06:00
Brett Flannigan
5da296e8ca Merge pull request #207 from jastice/recruit-pr
Add recruit role for factions
2013-01-26 18:25:03 -08:00
Brettflan
8fdd07b08f minor cleanup; made econLandReward default to 0, disabled 2013-01-26 19:59:00 -06:00
Brett Flannigan
204c78886f Merge pull request #193 from AEtherSurfer/land_reward
Land reward
2013-01-26 17:54:09 -08:00
Justin Kaeser
4743c1821a Add recruit role for factions
The recruit role's goal is to enable factions to invite new members without being afraid of getting griefed instantly.

Adds a configuration option "factionRankDefault" for default rank of newly joined faction members. By default this is RECRUIT, but it can be set to any supported rank.

Adds the /f promote and /f demote commands, which leaders and officers can use to increase or decrease the rank of a faction member by one level, up to officer, or down to recruit.
This version of the recruit feature preserves the /f officer command for backward compatibility.
2013-01-06 21:44:29 +01:00
Brett Flannigan
755a957b12 Merge pull request #200 from blha303/master
Closed a possible resource leak (in currently unused code), updated README.md to point to DBO instead of Github's deprecated downloads section
2013-01-04 08:11:29 -08:00
Brett Flannigan
04d808e54d Merge pull request #201 from jastice/econfix
Handle EconomyResponse objects from Vault on all transactions.
2013-01-04 07:48:10 -08:00
Brettflan
21409a05bb tiny performance optimization to last commit 2013-01-04 09:13:27 -06:00
Brettflan
fb2a5a9a44 Update to our obsidian generator exploit prevention code (via config option "handleExploitObsidianGenerators") to address newer method involving tripwire strings instead of redstone 2013-01-04 09:06:56 -06:00
Olof Larsson
16c69d67cd Use the standard Bukkit command handling system.
Doing so will remove the possiblility for dynamic command alias assignment but makes factions compatible with all other
plugins doing stuff like blocking commands from being used (AntiGuest, NoCheatPlus, War etc) and plugins that log command
useage (Hawkeye etc).
2013-01-03 08:23:46 +01:00
Justin Kaeser
e57e9b7105 Handle EconomyResponse objects from Vault on all transactions.
Vault's EconomyResponse was ignored for some cases, such as money transfers and deposits.
This would cause money to get lost if a transfer failed. This change refunds the initiatior of a transfer and notifies them of the failure.

Failing transfers can happen often when using economy plugins based on physical currency, such as Gringotts,
for example when no space is available in an account.
2012-12-28 23:46:32 +01:00
Steven Smith
d9ca9c62cb Closed a possible resource leak, updated README.md to point to DBO instead of Github's deprecated downloads section 2012-12-28 04:54:13 +08:00
Brettflan
31faf605dc Release 1.8.0
and sneaking in a typo fix
2012-12-19 06:43:25 -06:00
Brettflan
657305a5fe fix imports for new PowerLossEvent 2012-12-19 06:15:31 -06:00
alkarin
efcf97d375 Fix for PowerLossEvent Messages 2012-12-17 11:43:57 -06:00
alkarin
6eb23a200e Fix for PowerLossEvent Messages 2012-12-17 11:34:19 -06:00
alkarin
1f5dc830be Added a new Factions event for power loss named PowerLossEvent.
PowerLossEvent happens after each player death
2012-12-17 10:10:13 -06:00
ÆtherSurfer
2f883455ee Land Reward Task up and running.
Conflicts:
	src/com/massivecraft/factions/Conf.java
	src/com/massivecraft/factions/listeners/FactionsPlayerListener.java
2012-12-01 14:23:49 -05:00
ÆtherSurfer
ca219a1fb2 Reward faction members with money every day for every plot they control divided among all the players in the faction 2012-12-01 14:16:29 -05:00
Brettflan
47f23b93da Release 1.7.9 Beta
Also fix for improper message being sent to person who changes a faction description if "broadcastDescriptionChanges" is disabled
2012-11-30 20:14:32 -06:00
Brettflan
857892738f fix for /f list command throwing an error if an invalid page number was specified (ex. 5 pages available and they run /f list 6) 2012-11-30 19:43:04 -06:00
Brettflan
9c7ed3bf38 Fix for pistons being able to push blocks into protected territory through water or lava 2012-11-11 13:05:58 -06:00
Brettflan
1c8d6919bd New setting "broadcastDescriptionChanges" (default false) which can be enabled to have faction description changes broadcast to everyone on the server. Previously description changes were always broadcast.
Also added witch and wither boss to monster list, missed that for last release.
2012-11-09 18:22:39 -06:00
Brettflan
95289e1411 fix for piston retraction not working if faction doesn't have build rights in its own territory; missed this when fixing the same thing for piston extension recently 2012-11-09 17:47:53 -06:00
Brettflan
5c45ea5ee2 Fix for command prevention routine treating Wilderness areas as neutral faction territory in 1.7 branch 2012-11-09 07:44:46 -06:00
Olof Larsson
675505e6fd Using PlayerLoginEvent instead of PlayerPreLoginEvent to fix a warning. 2012-11-07 11:39:59 +01:00
Brettflan
2f80787edd Fix for crop trampling and pressure plates not being protected due to bug introduced in recent performance overhaul 2012-11-06 15:01:37 -06:00
Brettflan
b8aaeb1053 Fix for slashless commands triggering errors in CraftBukkit on rare occasions due to being run async 2012-11-06 14:23:17 -06:00
Brettflan
20b359c11a Wither boss second stage will no longer be able to destroy blocks in territory which has explosion protection (explosion faction flag turned off) 2012-11-06 11:58:14 -06:00
Brettflan
174320c278 updated known badPotionEffects to include wither potion 2012-11-06 11:04:08 -06:00
Brettflan
3055e68e86 fix for economy check that made sure player/faction could afford specific commands not working correctly; thanks to spaceemotion for pointing out the problem and fix 2012-11-06 11:01:16 -06:00
Brettflan
a783dc33cf Protect hanging entities (paintings and item frames) from explosions; thanks to Tahkeh for the method 2012-11-06 10:06:37 -06:00
Brettflan
e83ac76b2c Added anvil and beacon to list of list of protected container materials 2012-11-06 10:00:19 -06:00
Brettflan
3e0a68fd6e Performance overhaul sponsored by rockxz3, using his large server's data for reference to help with testing and tuning. Timing numbers below are based on this data set on my test server.
* PlayerMoveEvent performance boost (from 0.047ms to 0.015ms in testing, ~313% as fast): now more thrifty in determining whether player has actually moved between chunks before doing anything else; important since this event triggers extremely quickly
* PlayerInteractEvent performance boost (from 0.068ms to 0.034ms in testing, ~200% as fast): now ignores left-clicks for interaction checks, since in CraftBukkit 1.4 left-clicks no longer open doors or activate buttons/levers/etc.; not as important as above, but still triggers quite often as people are digging or interacting with blocks
* "/f list" command performance boost (from 234ms to 30ms in testing, ~780% as fast): code was getting information for all factions, narrowed it down to only getting info for displayed page range
* "/f show" command performance boost (from 132ms to 28ms in testing, ~470% as fast): tweaked the ally & enemy listing code used
2012-11-06 09:43:27 -06:00
Brettflan
d31741fb34 Updated old painting events to new hanging events so that item frames are also protected.
Also updated CraftBukkit lib and (hopefully) further clarified error message for GSON libs not being found in CB 1.3.2+ location.
2012-10-31 16:16:21 -05:00
Brettflan
ef56ce9a51 Backups are now created of bad factions.json and players.json files if they fail to load due to a JSON parse error; same as we already do for bad conf.json 2012-10-19 01:50:37 -05:00
Brettflan
7bbb4fbf44 Update to "handleExploitTNTWaterlog" method to not destroy Ender chests or portals; sadly there's still no method provided by Bukkit to get a block's blast resistance, so we have to go by a list of block type IDs which are supposed to be TNT-proof 2012-10-19 00:11:28 -05:00
Brettflan
5f33e51fae Fix for crash on plugin startup if Worldguard integration is enabled ("worldGuardChecking") but Worldguard plugin isn't loaded on server
Also updated SpoutPlugin lib
2012-10-09 17:37:01 -05:00
Brettflan
619e52a5d4 fix for pistons not working (via pistonProtectionThroughDenyBuild) if faction doesn't have build rights in its own territory 2012-09-30 18:01:42 -05:00
Brettflan
56cb2becde added some (apparently absolutely necessary) idiot-proofing for CB version support due to changed GSON lib package name; we were getting a flood of invalid error reports because of it 2012-09-05 03:42:59 -05:00
Brettflan
f65f3a0e9e Fix for factionless players being unable to hurt each other, and fix for factionless players taking reduced damage in Wilderness (was being treated as their faction territory by damage reduction routine) 2012-08-26 18:48:49 -05:00
Brettflan
7aa4fa12f2 Modified readBytes() and writeBytes() methods in DiscUtil.java to use older file handling routines which don't require Java 7. The vastly improved file loading speed which came from Olof's recent update to this file has been retained. 2012-08-26 15:23:45 -05:00
Olof Larsson
b588d355b4 Fix crash when HeroChat was not present. 2012-08-26 12:20:56 +02:00
Brettflan
e3bfaec642 Merge branch 'master' of github.com:MassiveCraft/Factions 2012-08-26 01:02:54 -05:00
Brettflan
28206b1c25 The latest CraftBukkit builds have changed their compiled-in GSON lib's package name. Rather than us switching back to using a separate GSON lib again (with two effectively identical copies of GSON ending up loaded and wasting server resources), I'm simply switching Factions to point to CraftBukkit's refactored GSON package name instead.
In line with that, I've removed the Bukkit and GSON libs and added in CraftBukkit as a lib.
2012-08-26 01:02:31 -05:00
Olof Larsson
bc0647e51b Fixing the recipients for HeroChat integration. 2012-08-26 02:12:02 +02:00
Olof Larsson
48c5131ea4 New beta herochat integration and fixing the slow load time. This may require Java7. 2012-08-26 00:54:15 +02:00
Brettflan
3be1ecf63c nitpicking myself 2012-08-07 22:33:23 -05:00
Brettflan
8e64c7c137 clean up code from last commit a bit 2012-08-07 22:28:21 -05:00
Brett Flannigan
98f20a4ec6 Merge pull request #138 from ammaraskar/master
Fixes an ender pearl clipping exploit with blocks that occupy less than 1 block in width or length
2012-08-07 20:09:59 -07:00
Brettflan
a57132aa7d Update version to 1.7.6_pre, fix for invalid comparison 2012-08-07 21:58:41 -05:00
Brettflan
af6c4952fa Add default permissions for all members of SafeZone/WarZone factions to use territory access commands; this way, players trusted enough to be added to either system faction will be able to grant access to their claims as desired 2012-08-07 21:58:04 -05:00
Brettflan
124a46c791 Update for remaining old PlayerChatEvents, update EssentialsChat libs and integration accordingly 2012-08-07 21:51:22 -05:00
Brettflan
ddd17830c0 Switch PlayerChatEvent to AsyncPlayerChatEvent for bleeding-edge 1.3.1 Bukkit builds to prevent persistent nag from Bukkit, update Bukkit lib
UNTESTED, please confirm working... looks like chat event cancellation might be bugged in Bukkit at the moment but will hopefully be fixed soon if so
2012-08-05 19:58:50 -05:00
Olof Larsson
7f228b648a Some servers might want to disable territorial warfare alltogether. 2012-07-30 23:28:23 +02:00
Olof Larsson
a380b86a71 Bug fix for that wilderness painting on dynmap. 2012-07-19 02:56:05 +02:00
basicsensei
94816a6e52 fix evil bug with getPlayer matching online players
if the offline player had similar name with the online player
ie. online "s2", offline "s", then "s" would show as online because
getPlayer("s") will return getPlayer("s2")
this is why getPlayerExact should be used
2012-07-16 18:11:27 +02:00
Ammar Askar
0b2e9e340d Fixes an ender pearl exploit allowing players to clip through blocks who occupy less than 1 block in width or length 2012-06-10 14:22:50 +05:00
Brettflan
d7a5970b85 Release 1.7.5 alpha: one last minor fix to EssentialsChat integration needed 2012-05-16 20:34:38 -05:00
Brettflan
af1024e5a4 Changed default Spout territory faction display to upper left, since Spoutcraft client now has minimap in upper right 2012-05-16 15:31:42 -05:00
Brettflan
4460438365 Brief access info is now displayed under two circumstances: if you have been granted explicit access to the territory you are in ("access granted"), or if you are a normal member of the faction which owns the territory and access is denied to you ("access restricted"). This info will be displayed through Spout under the faction tag if possible, otherwise it will be displayed through chat.
New conf.json setting:
"spoutTerritoryAccessShow": true,  - whether to show brief access info using Spout
2012-05-16 15:29:00 -05:00
Brettflan
01d9f62bdd Removed bit of code which was apparently intended to optimize movement event code but which was actually slowing the process down a bit overall 2012-05-16 12:57:44 -05:00
Brettflan
a0909ddb5c Added back a FactionsBlockListener.playerCanBuildDestroyBlock() method which references Location instead of Block, mainly for backwards compatibility 2012-05-16 11:52:47 -05:00
Brettflan
58bec9d6dc New "access" system to replace old ownership system. Access can be granted to build, destroy, and fully interact within any chunk for specific players or factions. Access can also optionally be denied to normal members of the host faction.
Some further info display to go with this feature is yet to come, and further testing for possible bugs is also needed.

Related info:

New FPerm "ACCESS" which is granted to faction leaders and officers by default. This FPerm allows you to bypass access restrictions throughout your faction territory, and (along with the "factions.access" Bukkit permission below) allows you to change access settings for any chunk owned by your faction.

New permissions:
factions.access - Ability to grant territory access for your faction, if you have the proper "ACCESS" FPerm (defaults to leaders and officers only). Added to factions.kit.halfplayer permission kit.
factions.access.any - Ability to grant territory access for any faction on the server. Added to factions.kit.mod permission kit.
factions.access.view - Ability to view territory access info for your own faction. Added to factions.kit.halfplayer permission kit.

New command:
/f access [view|p|f|player|faction=view] [name=you] - view or change the access information for the chunk you are in. If "view" or nothing is specified, it will simply display the info. If "p" or "player" is specified, a player will be granted access, or removed from the list if they were already granted access. If "f" or "faction" is specified, the same will be done for the specified faction. The name defaults to yourself or your faction if not specified. If your own faction is specified, you will toggle restricted access for the chunk so that normal faction members can be denied access, unless they are in the access list.
Examples:
/f access - view access list, if in your own territory
/f access p SomePlayer - grant access to player "SomePlayer" for the current chunk, or remove them from the access list if already there
/f access f - toggle restricted access for the current chunk (since faction name isn't specified, uses your own faction), assuming you're in your own factions territory
2012-05-14 21:41:13 -05:00
Brettflan
d2b0fee335 Delete a couple of files which are no longer used 2012-05-14 19:53:08 -05:00
Olof Larsson
5988e8e5af Simplified the perm command. 2012-05-09 06:29:52 +02:00
Olof Larsson
a0a163056d Now using automated help. Fixed SeeChunk issues. 2012-05-09 05:56:37 +02:00
Olof Larsson
67e5aa8464 Fixing a few apperance bugs and stopped updating apparance if it was the same. 2012-05-09 05:21:21 +02:00
Olof Larsson
2c5438bf70 Some minor fixes to the previous commit. 2012-05-09 03:32:04 +02:00
Olof Larsson
ca6b185bd1 New cape system and refactored spout appearances. 2012-05-09 03:24:07 +02:00
Brettflan
1f51ee9699 Improved explosion handling speed 2012-05-08 15:14:16 -05:00
Brettflan
c32736f3f1 fix for rare case where faction home location's world being removed or renamed (world with specified name not existing) could lead to NPE 2012-05-08 12:47:46 -05:00
Olof Larsson
1459c9c057 Reworked chat completely. Added Herochat integration. New tag-parsing system. Non-monitor-breaking relation colored chat. 2012-05-02 04:45:10 +02:00
Olof Larsson
06d22549e2 Added in some deprecated methods for backwards-compat. 2012-04-27 20:29:41 +02:00
Brettflan
e3a7188b0d /f show|who command will no longer reveal players as online if they are hidden from the viewer by the Vanish API 2012-04-26 08:08:11 -05:00
Brettflan
1defa2984b Relation commands will now cancel out if the same relation is already set with the target faction. 2012-04-06 13:27:23 -05:00
Brettflan
ffa4806af4 fix for /f power command used on self incorrectly also requiring factions.power.any permission 2012-04-06 13:23:01 -05:00
Olof Larsson
10522e7048 Made a sepparate health bar listener, reduced duplicate code and added respawn listener. 2012-04-01 15:08:20 +02:00
Olof Larsson
3eed72783b Added a healthbar feature :) 2012-03-25 21:07:11 +02:00
Brettflan
6d75fa39cc New setting "handleExploitTNTWaterlog" (default false/disabled) which, if enabled, will cause TNT which explodes in liquid to actually destroy a single adjacent block in all 6 directions. This will only apply to blocks which can be destroyed by TNT normally, specifically anything other than air, bedrock, water, lava, obsidian, and enchanting tables. The destruction of these blocks will be handled as if they had been mined, dropping the appropriate item.
TNT in water/lava doesn't normally destroy any surrounding blocks, which is usually desired behavior. That's the reason this setting is disabled by default. However, it is available because it provides a method to get through waterwalls with enough persistence, and it makes cheap (non-obsidian) TNT cannons require minor maintenance between shots. Both are useful things for my server.
2012-03-19 11:18:39 -05:00
Brettflan
d77cf1fa18 Double-space (or more) after command alias is no longer accepted, i.e. "f home". Otherwise, command prevention routines (in Factions itself and in other plugins) can be bypassed. For example, preventing the "f home" command wouldn't prevent anyone from using "f home" or "f home" instead. 2012-03-19 08:21:06 -05:00
Brettflan
8333354926 New setting "handleExploitInteractionSpam" (defaults to true). If enabled, players will begin to take injury if they rapidly try interacting with anything in another faction's territory. This is to prevent people from spam-clicking on doors and chests and such in the hopes that they'll get one through. After 10 rapid interaction attempts in a row, every click will cause them damage; the damage amount is a half heart of damage for every 10 clicks (up to 1 heart at 20 clicks, 1.5 hearts at 30, etc.). After the player has stopped trying for 2 seconds, their failed interaction counter will reset.
Also removed our old workaround fix code for the bug where half-step placement wasn't detected, since the Bukkit team fixed that in 1.1-R4.
2012-03-19 07:59:41 -05:00
Brettflan
8f2e587eb9 Optional prevention of a couple of exploits.
1. Obsidian generator exploit, which converts redstone wire to obsidian. New setting "handleExploitObsidianGenerators" (enabled by default) to determine whether it's prevented or not. Some servers might want to disable this prevention, to keep it as a viable obsidian creation method. Thanks to ObGenBlocker and WorldGuard plugins for the prevention method.
2. Ender pearl exploit, which could be used to clip through doors, glass, and probably a few other things if just the right spot was targeted. New setting "handleExploitEnderPearlClipping" (enabled by default) to determine whether it's prevented or not.

Also removed our TNT exploit prevention code, since they did get it fully fixed in 1.1-R4 and it doesn't look to be coming back from the dead again like it did when they released 1.1-R2.
2012-03-19 06:55:00 -05:00
Brettflan
2df8ca0df9 Add fireball/"fire charge" to materialsEditTools list, to prevent them from being used to set things on fire like flint&steel 2012-03-19 04:18:59 -05:00
Brettflan
f3239cd9ed Should finally completely fix problem where player location world changes in the middle of the /f home smoke effect, triggering an error from trying to calculate distance between worlds
also updated Spout API lib
2012-03-19 01:28:06 -05:00
Brettflan
d8a39140fc Faction homes should no longer be lost if their target world isn't already loaded when Factions loads at server startup. This is done using a new lazy-load Location container class which only initializes the Location when it's actually needed. 2012-03-14 13:06:38 -05:00
Brettflan
7b9674dc4b Ability to pay for commands (through economy) is now checked before firing events which can be canceled, and actual payment made after making sure the event isn't canceled.
Added Econ.hasAtLeast(EconomyParticipator ep, double delta, String toDoThis) method to check if an account has at least a specified amount of money in it. Also added related FCommand.canAffordCommand(double cost, String toDoThis).
2012-03-13 09:48:34 -05:00
Brettflan
fd8ca30af6 (donington) Fixes for compiler warnings & minor .gitignore enhancement, completed the last of the creatureType/entityType renaming (a few imports and functions) 2012-03-13 08:43:45 -05:00
Brettflan
18b10ce8f9 Cleaning sweep, mainly for various stray "4 spaces" indentions to tabs 2012-03-13 08:27:03 -05:00
Brettflan
28269b7455 a bit of cleanup 2012-03-13 07:47:54 -05:00
Brett Flannigan
a53a556594 Merge pull request #103 from donington/CustomFactionEvents
Custom faction events
2012-03-13 04:31:52 -07:00
Brettflan
2856411594 Remake of radius claim method. It now starts in the current chunk and spirals outward, in a repeating task designed to keep from overloading the server. The old method tried to put together a list of chunks, and then tried to claim them immediately starting from one corner of the overall area.
New setting "radiusClaimFailureLimit" (default 9). If claims are unsuccessful that many times in a row during a radius claim, the task will cancel out. There is no longer a limit to the specified radius since the process should no longer cause major server stress, and due to the process canceling out after several failures as just described.

Added some new methods to FLocation to quickly convert between block/chunk/region positions, and rewrote the FLocation hashCode() method to make it faster.
2012-03-13 05:54:48 -05:00
donington
e2f0d049f9 Merge remote-tracking branch 'origin/master' into CustomFactionEvents 2012-03-13 04:51:32 -04:00
Brettflan
fbdc0503ba Fix for "econClaimUnconnectedFee" not working correctly 2012-03-11 22:44:38 -05:00
Brettflan
b88430a628 New setting "playersWhoBypassAllProtection" (default empty), which is a list of player names that should always bypass normal faction protections such as block destruction and placement. This is primarily for use with other plugins/mods which use a fake player to take action, which shouldn't necessarily be subject to protections provided by Factions. Note that case is important; you must preserve the exact capitalization of the name.
As with every other setting, you are advised to use /f config to modify it. Example: /f config playersWhoBypassAllProtection fakePluginPlayerName  - add/remove the specified player name

Also switched several HashSets in Conf.java to LinkedHashSets. LinkedHashSets do have slower insertion and deletion than HashSets, but importantly they have faster lookup speed (at least until you get up to several hundred entries).
2012-03-11 13:36:03 -05:00
donington
cc772b00ce Merge remote-tracking branch 'origin/master' into CustomFactionEvents 2012-03-11 13:29:37 -04:00
donington
9314b4e298 Updated Faction Event System -- Land Events
Changes:
----------
 * changed internal storage of faction from String Id to Faction for LandClaimEvent and LandUnclaimEvent
 * added getFactionId(), getFactionTag(), getPlayer() to LandClaimEvent
 * added getFactionId(), getFactionTag(), getFPlayer(), getPlayer() to LandUnclaimEvent
 * removed LandUnclaimEvent from unclaimAll() in Board.java
 * created LandUnclaimAllEvent (uncancellable) and hooked into cmdUnclaimall

Notes:
--------
 * LandUnclaimAllEvent currently only returns calling faction and fplayer information.  Location data is unavailable as it is determined in Board.java's unclaimAll().  Realistically this should be enough information for anyone hooking this event to determine what is being altered.

On branch CustomFactionEvents

	modified:   src/com/massivecraft/factions/Board.java
	modified:   src/com/massivecraft/factions/FPlayer.java
	modified:   src/com/massivecraft/factions/cmd/CmdUnclaim.java
	modified:   src/com/massivecraft/factions/cmd/CmdUnclaimall.java
	modified:   src/com/massivecraft/factions/event/LandClaimEvent.java
	new file:   src/com/massivecraft/factions/event/LandUnclaimAllEvent.java
	modified:   src/com/massivecraft/factions/event/LandUnclaimEvent.java
2012-03-11 13:28:31 -04:00
Brettflan
c0308940c8 Connected standard command handler getCommand("f"), for it to work with other plugins which directly execute commands using that interface. 2012-03-11 11:41:56 -05:00
Brettflan
2c6191b73f Removed dependence on external GSON lib in lib/gson.jar, since GSON 2.1 is now embedded in CraftBukkit itself, used by their auto-updater added shortly before 1.1-R5 was released:
0ed1d1fdbb
2012-03-11 07:39:31 -05:00
Brettflan
a888a9c5b5 Updated /f config to support modifying "factionFlagDefaults" and "factionPermDefaults". Both of these settings require an additional argument more than other settings.
Examples:
/f config factionFlagDefaults firespread false  - set default "FIRESPREAD" faction flag to false
/f config factionFlagDefaults monsters true  - set default "MONSTERS" faction flag to true
/f config factionPermDefaults build ally  - for default "BUILD" faction permission, add/remove permission for allies
/f config factionPermDefaults withdraw member  - for default "WITHDRAW" faction permission, add/remove permission for regular faction members
2012-03-11 07:33:47 -05:00
Brettflan
fd44983ae2 (donington) Consolidated chat event listeners into a single chat listener class.
(Brettflan) Fixed slashless commands not being logged if player was in faction chat or alliance chat mode. Also cleaned up chat code a bit, nothing major.
2012-03-09 21:25:01 -06:00
Brettflan
a5bb25eb44 New setting "logPlayerCommands" (default true) which can be disabled to prevent player commands from being logged. 2012-03-09 19:26:40 -06:00
donington
88bdadcb2b Merge remote-tracking branch 'origin/master' into CustomFactionEvents 2012-03-09 17:49:10 -05:00
donington
6329fd0eaf updated patrickfreed's custom event system
Patrick's Custom Event System Changes:
----------------------------------------
  * FPlayerLeaveEvent now fires for all faction players in cmdDisband()
  * FPlayerLeaveEvent removed from cmdJoin()
  * FPlayerJoinEvent now only fires when the faction is different in cmdLeade
  * Added FactionRenameEvent, firing on cmdTag()
  * Added FactionRelationEvent, firing on FRelationCommand extensions
  * Fixed FPlayerJoinEvent to fire after tag is set in cmdCreate()
  * Added getFactionId() to FactionCreateEvent

TODO:
-------
  * cmdLeader() might need a FPlayerLeaveEvent for the same reason it needs
    a FPlayerJoinEvent?

On branch CustomFactionEvents

	modified:   src/com/massivecraft/factions/cmd/CmdCreate.java
	modified:   src/com/massivecraft/factions/cmd/CmdDisband.java
	modified:   src/com/massivecraft/factions/cmd/CmdJoin.java
	modified:   src/com/massivecraft/factions/cmd/CmdKick.java
	modified:   src/com/massivecraft/factions/cmd/CmdLeader.java
	modified:   src/com/massivecraft/factions/cmd/CmdTag.java
	modified:   src/com/massivecraft/factions/cmd/FRelationCommand.java
	modified:   src/com/massivecraft/factions/event/FPlayerLeaveEvent.java
	modified:   src/com/massivecraft/factions/event/FactionCreateEvent.java
	new file:   src/com/massivecraft/factions/event/FactionRelationEvent.java
	new file:   src/com/massivecraft/factions/event/FactionRenameEvent.java
	modified:   src/com/massivecraft/factions/event/LandClaimEvent.java
2012-03-09 17:09:33 -05:00
Brettflan
1ca93948a3 Replaced deprecated CreatureType references with EntityType 2012-03-09 14:46:45 -06:00
Brettflan
0a048d6553 If plugin failed to load correctly for various reasons, it could end up wiping the board or faction list. This should now be prevented.
An example: if you loaded 1.6.6 (not 1.6.6b) on CB 1.1-R6 or newer, it would trigger an exception at startup and cause this problem.
2012-03-09 14:44:17 -06:00
patrickfreed
021bf52c62 Added Event System 2012-03-01 20:16:45 -05:00
Brettflan
2954fa621f Fix for fatal error at startup in CraftBukkit 1.1-R5 and above
Updated Bukkit lib
2012-03-01 09:40:28 -06:00
Brettflan
3af6f2737a Final attempt to fix rare non-fatal NPE from Player ending up returning null while updating Spout appearance features 2012-03-01 09:38:47 -06:00
Brettflan
460d280387 Release 1.7.3 alpha
Also I'm sneaking in another minor fix for the coloring of the faction limit error message
2012-02-26 21:34:59 -06:00
Brettflan
3c4e766ba2 fix for faction limit error message 2012-02-26 20:49:49 -06:00
Brettflan
de3c7436fe "autoLeaveAfterDaysOfInactivity" routine now runs only once every few minutes instead of running every time a player logs in. New setting "autoLeaveRoutineRunsEveryXMinutes" (default 5 minutes) to determine just how often the routine is run.
The routine is also slightly more careful about how it calculates how long a player has been offline.
2012-02-26 16:55:58 -06:00
Brettflan
d71bd15a79 Added possibility to specify a player in the /f join command (/f join <faction> [player=you]), to make a player other than yourself join the specified faction. The new permission factions.join.others (added to factions.kit.mod and above) is required to be able to specify a different player.
Note that the player cannot currently already be in another faction; if they are, you'll need to /f kick them first. Also note that if the faction isn't open (with no invitation required), the player isn't invited, and you don't have the factions.join.any permission or have admin bypass mode on, the attempt will also fail.

Also, added new log method which accepts arguments (like the msg method).
2012-02-26 12:29:44 -06:00
Brettflan
02200e5793 UNTESTED: fix for chatspy not working with CAPI chat integration
If it's still not working correctly, let me know
2012-02-25 04:44:28 -06:00
Brettflan
817a43b5e0 New setting factionMemberLimit (default 0, no limit), which will prevent players from joining any faction that has reached this membership limit. 2012-02-24 06:30:28 -06:00
Brettflan
2a667a294d Damage protection is now extended to being set on fire (by flaming arrows, for instance) and receiving harmful splash potion effects. Beneficial splash potion effects are unaffected, and prevention of harmful splash potion effects is handled on a player-by-player basis, so you can still be harmed if you're not careful where you throw them. 2012-02-23 00:09:09 -06:00
Brettflan
a0fa3863d4 Hopeful fix for rare errors where location world somehow changes in the middle of trying to show a smoke effect 2012-02-22 23:52:39 -06:00
Brettflan
8607f1c22d Merge branch 'master' of github.com:MassiveCraft/Factions 2012-02-22 13:36:35 -06:00
Brettflan
50572b388c Moved Essentials teleport integration handling to EssentialsFeatures.java 2012-02-22 13:35:26 -06:00
Olof Larsson
92116bc929 Fix some warnings in Eclipse 2012-02-22 19:08:17 +01:00