Commit Graph

40 Commits

Author SHA1 Message Date
Brettflan
8b5a724c03 Optimization: Factions (as objects) now maintain a list of FPlayers in the faction for faster lookup 2012-01-13 03:38:25 -06:00
Brettflan
9710ec911e Further improved safe zone and war zone auto-rename process courtesy of Olof 2011-10-23 09:36:37 -05:00
Brettflan
2e34079a8e Fix for nonworking war zone and safe zone renaming 2011-10-23 09:11:37 -05:00
Brettflan
a9b1aad956 Existing safe zones and war zones are now renamed to remove the extra " " if they have it, mainly for better /f claim compatibility but also to comply with the modified default names 2011-10-23 08:12:09 -05:00
Olof Larsson
4f7fd6dd96 Possibly solved the faction creation issue. Changed the best id match to something more reasonable 2011-10-23 12:07:20 +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
5bf38ab0aa Adding match mode for id search to MassiveCraftCore and improving the faction argument readers. 2011-10-22 14:39:01 +02:00
Olof Larsson
46f5849f9f Moving over to the use of describeTo. 2011-10-21 19:20:33 +02:00
Olof Larsson
0ce9cce9d3 In progress: Using MassiveCraftCore and Allman indentation style and minor refactoring. 2011-10-08 22:03:44 +02:00
Olof Larsson
61998f459d Merge branch 'master' of github.com:MassiveCraft/Factions 2011-10-08 18:45:08 +02:00
Olof Larsson
ba5d7a3981 Working on permissions handling 2011-10-08 18:44:47 +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
d64ed374f1 missed from last commit 2011-10-05 02:14:07 -05:00
Brettflan
7c249e1884 Added 3 new hookable functions to main Factions class, for use by other plugins:
boolean isPlayerAllowedToBuildHere(Player player, Location location)
boolean isPlayerAllowedToInteractWith(Player player, Block block)
boolean isPlayerAllowedToUseThisHere(Player player, Location location, Material material)
Also update Bukkit lib for new RB.
2011-10-04 22:46:11 -05:00
Brettflan
ce0559cda9 Autoclaim mode is now disabled when a player is removed from a faction (whether leaving, being kicked, or whatever)
Also the new permission I missed in the last commit
2011-10-01 06:10:49 -05:00
Brettflan
4cab42ec6e Merge branch 'banks' of git://github.com/eXeC64/Factions 2011-10-01 03:45:28 -05: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
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
43fdc8ae14 New command to set a faction as permanent: /f permanent <faction tag> (requires new admin-level permission "factions.setPermanent"). Permanent factions will not be deleted if they have no members, and faction admins of such factions are allowed to leave without a replacement available. Faction admins are also unable to disband their own faction if it is Permanent; only those with the admin-level "factions.disband" permission can disband such a faction while it is set as Permanent. 2011-09-13 13:14:09 -05:00
Spathi
445d10afb7 Optional disabling of WG checks 2011-08-29 04:59:49 +01:00
Brettflan
9fd79d5588 more hookable functions for use by other plugins, these for getting a list of all factions and for listing players in a specified faction 2011-08-23 17:34:40 -05:00
Brettflan
697e0cf466 Added Spout features, with Spout client required for all: relation-colored faction tags over players' heads via option "spoutFactionTagsOverNames", player's faction title over their head via option "spoutFactionTitlesOverNames", and relation-colored capes shown on faction admins and/or moderators via "spoutFactionAdminCapes" and "spoutFactionModeratorCapes" (all new settings default to true)
When a faction is disbanded or has peaceful status added or removed, all online players are now notified
Added further debug output if an UnknownFormatConversionException is triggered during relational chat messages, to help track down cause
2011-08-19 20:36:23 -05:00
Brettflan
4e7aa893a3 Move economy plugin setup process over to the Econ class 2011-08-08 04:51:06 -05: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
4ad9829fd4 Removing /f worldnoclaim and /f worldnopowerloss commands; they're redundant now that you can use /f config worldsnoclaim [world name] and /f config worldsnopowerloss [world name] respectively to set those options. Also removing factions.worldOptions permission node since it was only used for those commands. 2011-08-04 02:35:48 -05:00
Brettflan
e6ac1c0f98 Economy integration now works for EssentialsEco as well 2011-08-04 02:25:12 -05:00
Brettflan
699c22f655 New conf.json settings "territoryNeutralDenyCommands" and "territoryEnemyDenyCommands", which can have lists of commands added to them that will be denied while in the territory of a neutral or enemy faction. It is recommended you use /f config to add/remove such commands, for example /f config territoryEnemyDenyCommands spawn would prevent players from using /spawn in enemy territory. You can add the slash to the command string or not, it will work either way. If the used command starts with one of your denied commands, it will be prevented. For example, if you deny "time", both "/time night" and "/time day" will be prevented. However, if you deny "time n", /time night will be prevented but /time day won't. (thanks for some code contribution from Cal27) 2011-08-04 00:07:38 -05:00
Brettflan
2900bf372f changed findFactions() method to try matching faction tags before trying to match player names, instead of the other way around 2011-08-03 21:49:11 -05:00
Brettflan
2154b89005 Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value. 2011-08-01 18:05:01 -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
Olof Larsson
6e9fd72612 Soon to be used JarLoader. 2011-07-27 22:56:45 +02:00
Brettflan
080ea3363b New command /f power [player name] to check either your own power (if no name is specified) or another player's power (if a player name is specified). The ability for a player to view their own power is based on the standard factions.participate permission, but to check the power of other players, the new permission node factions.viewAnyPower needs to be granted. If you aren't using a Permissions plugin (instead defaulting to the built-in Bukkit permission system), the factions.viewAnyPower permission is granted by default. Otherwise, you'll need to configure your Permissions plugin to grant the new permission as needed. 2011-07-25 13:16:14 -05:00
Brettflan
c3f57d5105 added a secondary low priority event listener for chat events, to try and make sure Factions is able to handle slashless commands and faction chat before other plugins do anything 2011-07-24 06:09:58 -05:00
Brettflan
c818ddff99 New command /f config [setting] [value] which can be used to change any conf.json setting. This is mainly for people who have trouble editing the file manually, for whatever reason. It even fixes any capitalization errors, and saves the conf.json file immediately after an option is changed. Can be run by player or from server console. Uses new permission node "factions.config". 2011-07-22 07:25:12 -05:00
Brettflan
bd5d7e185e Well, this is an odd and kludgy fix... only thing I can find that allows the integration to work correctly and not give an error whether EssentialsChat is present or not 2011-07-20 19:31:28 -05:00
Brettflan
1e9c83decc New permission nodes to disable any command, factions.disableCommand.<command>, along with factions.disableCommand.none node which forcibly makes none disabled (for * permission users or similar); for <command>, you must use the first command alias given in the /f help information (for example, "show" instead of "who" for that particular command) 2011-07-20 16:22:54 -05:00
Brettflan
5686c4db9d Piston movement is now prevented if it encroaches across into territories which have the relevant DenyBuild option set (whether faction territory, safe zone, or war zone). This covers piston extension if it pushes across unacceptable borders or even if the piston head itself would cross over, and also prevents sticky pistons from pulling blocks back across such borders.
There is also a new conf.json option "pistonProtectionThroughDenyBuild" (default true) which can be disabled to turn off piston protection. This option is available due to the (untested) potential that a world with many pistons constantly repeatedly firing could result in additional lag from these piston protection events
2011-07-20 12:22:03 -05:00
Brettflan
c79692940e Update to new integration method for EssentialsChat; needs up-to-date Essentials (2.5.1 or newer)
NOTE: if Essentials is too old, this error will occur at server startup (sadly impossible to catch or otherwise handle due to how Bukkit loads plugins):
java.lang.NoClassDefFoundError: com/earth2me/essentials/chat/IEssentialsChatListener
2011-07-20 08:48:14 -05:00
Olof Larsson
8aefae5679 changed namespace to com.massivecraft 2011-07-18 22:06:02 +02:00