Commit Graph

96 Commits

Author SHA1 Message Date
Brettflan
03b0a2bb5f 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:54:59 -05:00
Brettflan
30c2eaeac3 (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:55 -05:00
Brettflan
03fe63cda0 Cleaning sweep, mainly for various stray "4 spaces" indentions to tabs 2012-03-13 08:26:54 -05:00
Brettflan
4db904182e 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:07 -05:00
Brettflan
fbfdf8fe23 (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:24:58 -06:00
Brettflan
84ee922ac1 "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:57 -06:00
Brettflan
503233b916 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:26 -06:00
Brettflan
967870a582 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:19 -06:00
Brettflan
639dc16bf5 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:18 -06:00
Brettflan
ff56162c12 fix for command prevention routine (used by territoryEnemyDenyCommands and such) not properly covering commands with uppercase letters in them 2012-02-19 08:21:03 -06:00
Brettflan
3ed879ca18 "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:20 -06:00
Brettflan
5ef1c1a15e Release 1.6.5c: 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
32da53f459 Preemptive EssentialsChat 3.x support, since they'll be removing the old local chat integration method; new implementation will need improvement to support relation coloring, but for now it otherwise works.
When chat event hits an UnknownFormatConversionException which requires better chat configuration, the quick dirty fix of setting chatTagInsertIndex to 0 is now automatically applied.
2012-02-02 19:31:34 -06:00
Brettflan
487a3457f2 Adding TNT exploit workaround fix back; they finally fixed the exploit in CraftBukkit 1.1-RC1, but broke it again in 1.1-RC3. :( 2012-02-02 15:13:53 -06:00
Brettflan
7a38ee42a7 zero-value economy gains/losses are now skipped over ("X gained 0.0 for claiming this land" and similar is a bit odd)
CLeaned up warning given for UnknownFormatConversionException chat exception; the debug info is no longer useful for us, and a distraction for users.
2012-01-31 11:07:48 -06:00
Brettflan
ff91cdfed7 Players no longer regain power while dead; no more waiting to respawn in order to regain power
Also added AuthDB to softdepend list, so it has first shot at Factions commands in case it needs to cancel one
2012-01-28 05:59:10 -06:00
Brettflan
fc04e0a446 Update to new Bukkit Event system
Also remove leftover TNT exploit prevention code which I missed earlier
2012-01-28 04:37:55 -06:00
Brettflan
84e137049e removed TNT exploit handling code, since they did finally fix the bug in the CraftBukkit 1.1-RC1 release 2012-01-28 04:07:23 -06:00
Brettflan
84b6278529 Workaround fix for half-step placement on existing half-steps not being prevented; it's caused by a CraftBukkit bug:
https://bukkit.atlassian.net/browse/BUKKIT-646

Fix for a potential NPE in FPlayer autoLeaveOnInactivityRoutine.

Added CaptureThePoints and CombatTag to our softdepend list so they can potentially cancel Factions commands.
2012-01-28 03:16:28 -06:00
Brettflan
da1fb45ea0 Fix for error when deleting a faction if Vault wasn't present;
Fix for slashless Factions commands not working for player in faction chat or alliance chat modes
2012-01-20 11:19:35 -06:00
Brettflan
03b368e9c4 New conf.json setting "permanentFactionMemberDenyCommands" (list, default empty), which can be used to prevent members of permanent factions from using specific commands.
Also, a minor fix for the help page regarding faction banks being shown if "bankEnabled" setting was enabled but "econEnabled" setting was false (economy as a whole disabled).
2012-01-18 23:31:37 -06:00
Brettflan
90d91180af fix for factions-specific commands not being prevented properly if they were in "territoryNeutralDenyCommands" or "territoryEnemyDenyCommands"
also got rid of a command preprocess listener which is now unnecessary
2012-01-18 22:42:56 -06:00
Brettflan
a44336ff04 self-inflicted damage (such as ender pearl usage) is no longer prevented with a message like "you cannot hurt you" 2012-01-17 02:56:22 -06:00
Brettflan
9534a72d44 improved TNT exploit prevention
Now, canceled exploit attempts don't injure players or mobs as if the TNT had successfully exploded, and if it's the case of an existing TNT block which a redstone torch is attempted to be placed next to, it no longer drops a free TNT item. In that case, the existing TNT block is still destroyed itself, but... oh well, it's close enough to perfect.
2012-01-17 01:57:25 -06:00
Brettflan
336edd85be when redstone torches or TNT were attempted to be placed in protected territory but prevented, it could previously still trigger a TNT explosion due to a longstanding unfixed CraftBukkit exploit. A workaround is now in place to prevent this, and any such attempts are logged and announced to everyone on the server.
For reference: https://bukkit.atlassian.net/browse/BUKKIT-89

also, added missed new java file for chat spy
2012-01-15 11:41:13 -06:00
Brettflan
fb32fc7f51 (courtesy of eXeC64) Added chat spy feature for admins 2012-01-15 01:42:56 -06:00
Brettflan
aa88c974fd Players auto-removed due to inactivity or due to being banned now have their data deleted immediately; this should fix the log spam of the same players repeatedly being marked for deletion 2012-01-09 21:38:00 -06:00
Brettflan
b3796c31f2 Added soil to the default "territoryProtectedMaterials" and "territoryProtectedMaterialsWhenOffline" settings, so people who aren't in your faction won't be able to trample crops in your territory (soil trampling is handled as an Interact event, for whatever reason)
For servers updating from older versions of Factions, you should use these commands to update your configuration:
f config territoryProtectedMaterials SOIL
f config territoryProtectedMaterialsWhenOffline SOIL
2011-12-18 08:39:52 -06:00
Brettflan
281021ce46 When a faction admin is kicked from his faction for whatever reason (not logging in for too long, a server admin running the /f kick command on him, the player being banned from server), another player will now be promoted to faction admin in his place. If the faction has at least one moderator, one of them will be chosen. Otherwise, a normal member will be promoted. If the faction admin was the last/only member, the faction will of course be disbanded. 2011-12-18 07:47:15 -06:00
Brettflan
fc5d45d8c4 New conf.json setting "removePlayerDataWhenBanned" (default true), which can be disabled to prevent Factions from deleting player data for players when they are banned from the server 2011-12-18 02:47:56 -06:00
Brettflan
e66e71f36b fix for Spout faction labels not updating for players who have /f map on 2011-12-16 00:31:23 -06:00
Brettflan
e0aaa395a7 1.6.1 stuff 2011-12-16 00:19:41 -06:00
Brettflan
3e8faad156 Updated Spout features to improve consistency (of code, and of displayed information) 2011-10-23 09:03:28 -05:00
Olof Larsson
32624e0339 Fixing a string format error and possibly solving a money rights issue 2011-10-23 02:43:25 +02:00
Olof Larsson
a78a4dff98 Managed to get rid of some commands. This needs to be rethought even more though. 2011-10-22 17:03:49 +02:00
Olof Larsson
45d6a6628a Claim command refactoring in progress. 2011-10-22 16:00:24 +02:00
Olof Larsson
46f5849f9f Moving over to the use of describeTo. 2011-10-21 19:20:33 +02:00
Olof Larsson
f42fb8e8bf Removing some old code and try to read colors in the listeners. 2011-10-21 18:14:04 +02:00
Brettflan
38e128010c Fix for /f permanent and /f peaceful commands giving an NPE if run from console
Fix for rare NPE when Spout territory info update is run and affected player disconnects at precisely that moment
Clarified "cannot attack neutral faction" messages to indicate enemy status is needed
Updated Bukkit lib to correspond with CB 1337
2011-10-20 18:08:55 -05:00
Brettflan
1c02b35193 Fix for "allianceChatFormat" not actually being used, updated default format for it 2011-10-16 08:25:56 -05:00
Brettflan
358186764d Territory owner list was not being shown to people who aren't running the Spoutcraft client, when Spout was hooked... fixed 2011-10-13 14:30:47 -05:00
Brettflan
1a38007d64 With Spout, the territory indicator now also has an ownership indicator below it (but only if the current territory has any owners set), and a larger centered territory notice below which goes away after a couple of seconds.
These effectively replace the related chat notices if enabled.
Also, updated libs.
2011-10-13 14:09:47 -05:00
Olof Larsson
0039370f05 Some effect for the f home teleport command 2011-10-13 12:17:23 +02:00
Brettflan
329cef6465 Fix for messed up ownership protection handling in regards to ally/enemy status
In the process, removed the separate painting handling and made it use the standard block place/destroy checking routine, and otherwise cleaned up the related code a bit
2011-10-12 22:31:18 -05:00
Olof Larsson
b202acb685 Almost finished money refactoring 2011-10-12 17:25:01 +02:00
Brettflan
f5190db257 Moved some Spout code out to a separate listener, for slightly better organization and more importantly to prevent NoClassDefFoundErrors on servers not running Spout
The text scale (size) can now be set for the territory display using conf.json setting "spoutTerritoryDisplaySize" (default 1.0), and "spoutTerritoryDisplayShowDescription" (default true) can be disabled to have only the faction tag/name displayed and not the description as well
2011-10-10 21:09:58 -05:00
Olof Larsson
3cc7766fa7 Some bugs fixed. 2011-10-10 01:21:05 +02:00
Olof Larsson
a0c8fd8d7d herp... 2011-10-09 18:35:39 +02:00
Olof Larsson
10f535e637 Halfway through refactoring of commands and permissions 2011-10-09 14:53:38 +02:00
Olof Larsson
227d54dc5f Converting the command structure 2011-10-08 23:22:02 +02:00