Commit Graph

41 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 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 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 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 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 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
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 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
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
Olof Larsson a0c8fd8d7d herp... 2011-10-09 18:35:39 +02:00
Olof Larsson 227d54dc5f Converting the command structure 2011-10-08 23:22:02 +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 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 60abb61cb9 Fix for "territoryEnemyProtectMaterials" and "territoryAllyProtectMaterials" not working correctly, and wrong protection message being sent to neutral players. Re-jiggered the related code a bit which handles such things based on enemy/ally/member/neutral status. 2011-09-22 16:12:35 -05:00
Brettflan 34e4afee2c Four new conf.json settings to prevent Endermen from removing or placing blocks.
"territoryDenyEndermanBlocks" (default true) for claimed territory.
"safeZoneDenyEndermanBlocks" (default true) for Safe Zones.
"warZoneDenyEndermanBlocks" (default true) for War Zones.
"wildernessDenyEndermanBlocks" (default false) for unclaimed wilderness areas.
2011-09-22 06:22:01 -05:00
Brettflan 538b387f2f Fix for players being able to hurt members of their own faction while in their own land if the "enablePVPAgainstFactionlessInAttackersLand" option is enabled 2011-09-16 01:45:23 -05:00
Brettflan b5a1151178 fix for arrow damage not being properly detected and prevented (when needed) which was broken by Bukkit's recent deprecation of EntityDamageByProjectileEvent 2011-09-08 03:20:55 -05:00
Brettflan c89db2c4d6 Fix for allies bypassing ownership if Ally options allowed them to build/interact/use in allied territory
Also consolidated some Conf lookups into new functions for Relations, to simplify and de-uglify the code a bit
2011-09-06 16:35:43 -05:00
Brettflan 82db1624c9 Added new "Ally" related protection options to complement the "Enemy" ones (added thanks to donation from BeTrayed) 2011-08-23 17:12:17 -05:00
Brettflan ef465dfcf4 New conf.json setting "worldsNoWildernessProtection", for worlds in which you don't want wilderness protections to apply 2011-08-23 00:37:31 -05:00
sp1ky b2ad4b43e4 Allow PVP vs. Factionless in attacker's faction territory 2011-08-12 16:08:11 +01:00
Brettflan 68e1313776 New "peaceful" status for factions which can only be set by server admins/moderators. Members of peaceful factions cannot deal or receive PvP damage (unless in a war zone which has friendly fire enabled), cannot claim land from another faction and likewise can't have their land claimed, and cannot be considered as ally or enemy of any other faction. Faction admins and moderators of peaceful factions can enable/disable all explosions inside their faction's territory at will. The main purpose of this is to provide a way for more peaceful players who don't want to take part in faction wars (or just want to take a break from them) to still have fun on the server. It is also meant to allow groups of players to make protected buildings, monuments, grand constructions, and so forth without having to worry about another faction destroying them.
New conf.json settings:
"peacefulTerritoryDisablePVP" (default true) prevents PvP damage for anyone inside a peaceful faction's territory
"peacefulTerritoryDisableMonsters" (default false) provides protection against monsters spawning or attacking inside a peaceful faction's territory
"peacefulMembersDisablePowerLoss" (default true) which keeps members of peaceful factions from suffering power loss when they die.

New commands:
/f peaceful [faction tag] - toggle the indicated faction's "peaceful" status
/f noboom - enable/disable explosions inside your faction's territory; only available to faction admin and faction moderators for peaceful factions

New permission nodes:
factions.setPeaceful - ability to use the /f peaceful command (admins)
factions.peacefulExplosionToggle - ability to use /f noboom (everyone)
2011-08-05 03:50:47 -05:00
Brettflan 92448ca4d2 New conf.json setting "worldsIgnorePvP" as a list of worlds which you don't want Factions to pay any attention to PvP in. No new command has been added to set this, since we now have the /f config command. So, to add/remove worlds, simply use /f config worldsIgnorePvP [YourWorldHere]. 2011-08-01 20:22:16 -05:00
Brettflan ad2bb5f4d0 "disablePVPForFactionlessPlayers" is now overridden if "warZoneFriendlyFire" is enabled and the PvP is occurring inside a War Zone 2011-08-01 18:28:34 -05:00
Brettflan 508f953ce9 Faction admins can now mark already claimed areas as owned by specific faction members. Ownership can include multiple members. New command /f owner *[player name], to set/remove ownership. This command is only available to the faction admin and optionally the faction moderators. If no player name is specified, it will either set ownership to the player running the command (if no owner is currently set) or completely clear ownership of the territory. New command /f ownerlist, to view a list of owners for the current area. Only works inside your own faction's territory. New conf.json options "ownedAreasEnabled", "ownedAreasModeratorsCanSet", "ownedAreaModeratorsBypass", "ownedAreaDenyBuild", "ownedAreaProtectMaterials", and "ownedAreaDenyUseage" (all defaulting to true) to determine whether faction moderators can set or bypass ownership (faction admin always can), and what sort of protection these owned areas have against normal members of the faction (members other than the owner(s), faction admin, and probably faction moderators). New conf.json option "ownedAreasLimitPerFaction" to limit how many owned areas can be set. New permission node "factions.ownershipBypass" which allows a player to bypass ownership protection, but only within the person's own faction.
various little tweaks and improvements to other code
moderate speed boost to FLocation code
made commandDisable permissions work for any command alias of a command, instead of just the first one
2011-07-30 20:17:00 -05:00
Brettflan 63ab41f933 New conf.json option "safeZonePreventAllDamageToPlayers" (default false) which will prevent all damage to players while they're in a Safe Zone; note that attack damage from other players and monsters is still prevented regardless 2011-07-29 06:39:20 -05:00
Brettflan e3cb829e6b If "autoLeaveAfterDaysOfInactivity" is set to 0.0 or a negative number, it's now effectively disabled
Renamed "disablePVPBetweenNeutralFaction" to "disablePVPBetweenNeutralFactions" because the grammar nazi in me calls for it
a couple of minor optimizations
finally, include gson.jar in the lib folder
2011-07-29 05:12:14 -05:00
Amrac aaa56ec40a New setting in conf.json:
"disablePVPBetweenNeutralFaction":
false whether PvP damage will be
disabled between neutral
faction

Change-Id: I08eee177fbe69d1466a267e67ec3fd0389f83499
2011-07-28 16:04:11 +02:00
Olof Larsson 8aefae5679 changed namespace to com.massivecraft 2011-07-18 22:06:02 +02:00