Commit Graph

85 Commits

Author SHA1 Message Date
Brettflan
e71a09b6e2 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:40 -05:00
Brettflan
d31bac8da8 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:44 -05:00
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
500a3d2819 Add fireball/"fire charge" to default territoryDenyUseageMaterials list, to prevent them from being used to set things on fire like flint&steel 2012-03-19 04:19:05 -05:00
Brettflan
47756a9216 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:51 -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
d7f5ee581e New setting "logPlayerCommands" (default true) which can be disabled to prevent player commands from being logged. 2012-03-09 19:26:42 -06:00
Brettflan
a999f50966 Replaced deprecated CreatureType references with EntityType 2012-03-09 14:46:46 -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
c1f5475d0c 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:18 -06:00
Brettflan
02fa6ab2c1 (Olof) (backported from 1.7 branch) New setting "homesTeleportCommandEssentialsIntegration" (default true) which, if enabled, will integrate /f home teleports with the Essentials plugin's teleport handler if Essentials is on the server. This provides teleport cooldown and/or delay to /f home based on your Essentials configuration. 2012-02-22 13:41:47 -06:00
Brettflan
a124ac6e35 (by first4ever) Added a "claimedLandsMax" option (default 0, no limit), which prevents normal factions from being able to claim more land once they've reached this limit. 2012-02-02 13:12:54 -06:00
Brettflan
784895c779 Workaround fix for EssentialsChat integration not working on Essentials 2.8+. "chatTagReplaceString" setting now defaults to "[FACTION]" instead of "{FACTION}" since Essentials now converts curly-braces to square-braces for any tags specified in their chat format setting which Essentials doesn't recognize.
For those using Essentials 2.8.x, this should hopefully be handled automatically.
2012-02-02 07:28:56 -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
db382acc17 New conf.json setting "permanentFactionsDisableLeaderPromotion" (default false) which, if enabled, will circumvent the promotion routine for permanent factions so that they can exist without a faction admin, only regular members and/or moderators. 2012-01-18 21:21:30 -06:00
Brettflan
dde10168ae New conf.json setting "econClaimUnconnectedFee" (default 0.0), which can be set as an additional economic cost for claiming land which is not connected to existing claims. This additional cost is only added if the faction has at least 1 existing claim somewhere in the current world, and is added to the cost after all other calculations are done.
This fee is not refunded from unclaiming land or even considered in actual land values.
2012-01-18 21:10:40 -06:00
Patrick
c2f0f5ad51 Added unclaim and disband chest resets to LWC 2012-01-10 19:09:15 -05:00
Patrick
1d0ba04336 LWC integration 2012-01-07 18:27:03 -05: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
e32660c188 New conf.json setting "powerPlayerStarting" (default 0.0) for the power level which new players will now start at; previously new players would start with max power, now it's configurable 2011-12-18 07:26:10 -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
7539d3f9a4 Added jukebox, brewing stand, enchantment table, and cauldron to default territoryProtectedMaterials and territoryProtectedMaterialsWhenOffline settings 2011-12-18 01:45:10 -06:00
Brettflan
8ec0173eae Added Blaze, EnderDragon, and MagmaCube to safeZoneNerfedCreatureTypes list 2011-12-16 00:30:43 -06:00
Brettflan
f8f3704cd4 Additional logging, with new conf.json settings to enable/disable logging of specific events:
"logFactionCreate": true,  - log faction creation
"logFactionDisband": true,  - log factions being disbanded, by command or by circumstance
"logFactionJoin": true,  - log player joining a faction
"logFactionKick": true,  - log player being kicked from a faction
"logFactionLeave": true,  - log player leaving a faction
"logLandClaims": true,  - log land being claimed (including safe zone and war zone)
"logLandUnclaims": true,  - log land being unclaimed (including safe zone and war zone)
"logMoneyTransactions": true,  - log money being deposited, withdrawn, and otherwise transferred in relation to faction banks

Also a fix for a potential NPE from players logging out and Spout appearance handler referencing them afterwards
2011-10-23 12:50:02 -05: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
46f5849f9f Moving over to the use of describeTo. 2011-10-21 19:20:33 +02:00
Brettflan
0b04c95990 Merge branch 'master' of github.com:MassiveCraft/Factions 2011-10-16 08:26:09 -05:00
Brettflan
1c02b35193 Fix for "allianceChatFormat" not actually being used, updated default format for it 2011-10-16 08:25:56 -05:00
Olof Larsson
3d33088f47 Merge branch 'master' of github.com:MassiveCraft/Factions 2011-10-16 11:58:21 +02:00
Brettflan
3981ca4dde Added fence gates to default "territoryProtectedMaterials" list.
Existing users should run these commands to add it to an existing config, if desired:
/f config territoryProtectedMaterials FENCE_GATE
/f config territoryProtectedMaterialsWhenOffline FENCE_GATE

Also changed first letter of "canLeaveWithNegativePower" setting to lowercase, to fit with Java standards. If you had previously changed this setting to false, you'll need to do so again.
2011-10-15 12:46:09 -05:00
Olof Larsson
3de70b6db8 Changes to the default configuration 2011-10-14 23:45:39 +02:00
Olof Larsson
00f6f4ab05 Support for the CAPI plugin. 2011-10-14 15:03:23 +02: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
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
7b5124529a Added some extra blocked commands 2011-10-10 22:45:15 +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
0ce9cce9d3 In progress: Using MassiveCraftCore and Allman indentation style and minor refactoring. 2011-10-08 22:03:44 +02:00
Brettflan
77a7b2d85c New Spout feature, for Spoutcraft client users only: current territory info will now be permanently shown at top of screen, instead of being echoed out to chat as you move around
New conf.json setting "spoutTerritoryDisplayPosition" to set the screen position at which the current territory is shown. 0 = disabled, 1 = top left, 2 = top center, 3 (default) = top right.
Moved all integration code to separate package, ofr better code organization. Also moved EssentialsChat integration code out to separate file in there, allowing us to safely remove our copy IEssentialsChatListener.java file (which is otherwise needed to prevent a nasty NoClassDefFoundError).
2011-10-05 05:13:54 -05:00
Brettflan
58d97076b8 New conf.json setting "territoryDenyEndermanBlocksWhenOffline" (default true). As might be expected, this will prevent Enderman from removing or placing blocks in the territory of a faction which has no members online. "territoryDenyEndermanBlocks" of course now only applies when a faction has members online. 2011-10-01 06:16:53 -05:00
Brettflan
feac58c6d6 Some tweaking of the faction bank code...
The new help page with bank related commands will now only be shown if banks are enabled and the Economy is enabled and hooked in.
Shortened a couple of command descriptions to fit on one line.
Made Deposit, Pay, and Withdraw commands additionally log to the server console/log.
When bank is given to person disbanding a faction, it now lets them know and logs it to the server log.
Added commands to commandDisable list in plugin.yml, along with "permanent" command which I'd missed adding before
Added new permission node factions.viewAnyFactionBalance (granted by default if using superperms), which is required to view the bank balance of other factions

For reference, about the faction bank addition as a whole...
New conf.json settings:
"bankEnabled": true,  - enable faction banks
"bankMembersCanWithdraw": false,  - have to be at least moderator to withdraw or pay money to another faction, unless this is set to true
"bankFactionPaysCosts": true,  - if true, payments for faction command costs are charged to faction bank
"bankFactionPaysLandCosts": true,  - if true, payments for land claims are charged to faction bank

New commands:
/f balance *<faction tag> - Shows the bank balance of a specified faction (if permission checks out), or the player's faction if none is specified
/f deposit <amount> - Deposit money into your faction's bank
/f pay <faction tag> <amount> - Pay money from your faction bank to another faction (requires moderator or admin status)
/f withdraw <amount> - Withdraw money from your faction's bank (requires moderator or admin status, unless "bankMembersCanWithdraw" is set to true)

New permission node:
factions.viewAnyFactionBalance - Allows the player to view the faction bank balance of all factions (default)
2011-10-01 05:59:09 -05:00
Brettflan
4cab42ec6e Merge branch 'banks' of git://github.com/eXeC64/Factions 2011-10-01 03:45:28 -05:00
Brettflan
3d62676168 Merge branch 'alliancechat' of git://github.com/eXeC64/Factions 2011-09-30 20:40:34 -05:00
Brettflan
3627996dc6 Updated SpoutAPI lib, added forgotten setPermanent permission to plugin.yml, added endermen and cave spiders and silverfish to no-spawn list for safe zones 2011-09-30 19:44:53 -05:00
Harry Jeffery
f4d56d4796 Alliance chat is now white, with ally-colour names. 2011-09-24 20:30:15 +01:00
Harry Jeffery
46abcadf93 Added alliance only chat mode. 2011-09-24 11:04:49 +01:00
Harry Jeffery
2b23f93fba Added faction banks. 2011-09-24 02:22:53 +01:00
Brettflan
28e881d905 Players now lose power over time while they are offline. New conf.json setting "powerOfflineLossPerDay" (default 1.0) is how much power they lose; note that this power loss actually occurs frequently in very tiny amounts as time passes, not just once per day. New conf.json setting "powerOfflineLossLimit" (default 0.0) which will stop offline power loss once a player's power drops to the specified amount.
As an example, the default 1.0 power loss per day offline is roughly 0.0417 power loss per hour, 0.00695 per minute, and so forth.
2011-09-22 06:33:34 -05:00