Commit Graph

550 Commits

Author SHA1 Message Date
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
147982e956 updated bukkit lib 2012-03-13 05:56:11 -05: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
54b97651b6 Release 1.7.3b ALPHA for compatibility with CB 1.1-R5 and above 2012-03-01 09:41:35 -06: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
Brettflan
546ecd6a45 Clean up integration methods with other plugins a bit 2012-02-22 11:43:53 -06:00
Brettflan
c8d6d06f90 Updated SpoutAPI, handled deprecated Spout AppearanceManager code, updated Spout event listener to new Bukkit event system 2012-02-20 17:03:37 -06:00
Brettflan
e918bc0d91 Compatibility with upcoming CB 1.1-R5 and above: updated Enderman block monitors to use EntityChangeBlockEvent, removed register event convenience methods from MPlugin (no longer working or needed)
Updated Bukkit lib to newest dev version
2012-02-20 16:59:33 -06:00
Brettflan
c208658cab update default GSON jar version to 2.1 2012-02-19 08:32:50 -06:00
Brettflan
03a45784c7 Fix for potential NPE in CraftBukkit caused by LWC location world returning null 2012-02-19 08:23:13 -06:00
Brettflan
4ba73af883 fix for command prevention routine (used by territoryEnemyDenyCommands and such) not properly covering commands with uppercase letters in them 2012-02-19 08:20:22 -06:00
Brettflan
8e96a75b56 Update our MCore event handlers to use the newer Bukkit event system 2012-02-07 17:02:54 -06:00
Brettflan
fbbf0a12af Add back support for older EssentialsChat versions
also reword leader command's "you must be leader" error message
2012-02-07 15:31:35 -06:00
Brettflan
296c783627 Try again 2012-02-07 15:23:19 -06:00
Brettflan
589e4417c7 Major bugfix: leaders of factions should no longer be able to promote members of other factions to leader of that faction (unless of course they have factions.leader.any permission) 2012-02-07 15:15:25 -06:00
Brettflan
1a109fa589 "worldsIgnorePvP" setting no longer ignores PvP damage in SafeZones and PvP damage done by players who just logged in, no matter the world it happens in 2012-02-07 15:04:19 -06:00
Brettflan
0a6991a997 Fix for error when disbanding faction from server console with economy enabled 2012-02-07 14:56:57 -06:00
Olof Larsson
c74e4baab2 Minor change to support NoCheat protection 2012-02-05 19:51:51 +01:00
Olof Larsson
37169dc6ec Added command logging as for default commands and temporairly removed Essentials old features as it does not compile in Eclipse :/ sorry about this. How would we go about getting this compile in Eclipse and Netbeans at the same time? 2012-02-05 18:55:26 +01:00
Brettflan
c8558f7bbb Release 1.7.2c: Most TNT explosions were being prevented due to a mistake on my part when I re-implemented our TNT+redstone exploit workaround fix, sorry about that. That's fixed, and the X/Z coordinates for such prevented attempts are no longer sent to players, only sent to the server console/log. 2012-02-04 16:22:55 -06:00
Brettflan
7965fcdc00 Re-enabled WorldGuard support. It actually was working, who knew? I don't use WorldGuard, and I'd only seen multiple failure reports lately and not a single indication from anyone that the integration was actually working for them, so... 2012-02-03 00:16:03 -06:00
Brettflan
c845ea2d7d Release 1.7.2 2012-02-02 19:43:20 -06:00