Flags
Flags is an interface plugin designed to bridge the gap between cuboid and other land management plugins and other plugins that would need to access them.
Based on similar concepts of Vault, Flags provides a single unified object or "Area" for developers to have basic access to the information it holds without the need to know which plugin created it. This allows developers to implement per-area features one time and have them work automatically with all the supported land management plugins.
Though it has grown far beyond it's original purpose, Flags gets it's name from it's ability to allow plugins to create "flags" or switches that change the behavior of the game or plugin in specific areas. Flags will automatically maintain the users choices and customizations, and the plugins that created the flags merely have to handle their behavior. Don't let the name fool you, plugins can use the API for hooking into areas without actually creating flags at all.
Features
- Multiple land area plugin support
- Modular flags allow you to choose only what you want.
- Developer API allows anyone to create flag plugins or interface with areas.
- Flags can be set for areas, the wilderness, or new area defaults.
- Trust lists allow you to choose players that can bypass flag effects in each area.
- Customizable player messages allow you to personalize all player flags per area.
- Customizable flag bundles allow you to set multiple flags in a single command.
- Multi-world support allows you to treat each world as a different area, including the wilderness and defaults.
- YAML and MySQL data storage options for flexible servers
- Vault economy support for purchasing flags and messages
Supported Area Plugins (optional)
Flags currently supports Factions, Factoid, Grief Prevention, InfinitePlots, PlotMe, PreciousStones, Residence, and WorldGuard. Flags also has an internal system it uses if no other system is detected. For more details on compatibility and feature sets, please visit the Area Plugins page.
Plug-ins and Modules
Included Modules
Included with Flags is a set of optional flag modules available that operate with just Bukkit. To install them, place the modules you want to use in your plugins folder, along with Flags.jar.
Module | Description |
Block Module | Adds flags based on block control. |
Border Patrol Module | Adds flags based on players moving into or out of an area. |
Core Module | Adds general flags that don't fit with any of the other included modules. |
Creature Spawn Module | Adds flags for stopping creatures from spawning. |
Damage Module | Adds flags for stopping types of player damage. |
Player Module | Adds flags based on player actions. |
Vehicle Module | Adds flags based on boats, minecarts, and horses. |
External Plugins and Modules
Below is a list of known plugins and modules not included with Flags that add their own flags. If you have developed a plugin with Flags support or a module and want it listed here, add a post to the developer forum!
Plugin | Description | Flags |
BlockNotif | Notifies moderators when players break certain blocks, logs it, and prevents it from occurring. | None. Flags is used to report the name or ID of the area defined by the system your using. |
FancyShop | Creates chest shops that trade in physical currencies. | Flags that allow shops to be restricted to specific areas. |
FlyNCreative | Allows server operators to set areas where creative mode and flight are enabled while maintaining inventories for those areas. | Flags to select Flight and/or Creative mode. |
HardcoreClaims | Grief Prevention extension that deletes claims and restores the land when a player dies. | Flags for choosing which claims get deleted and what areas players must die in to cause a deletion. |
PetStore | Manage ownership of tameable animals. | Flags for choosing where animals can be left for sale, give away, or released. |
RocketTeleport | Plugin that adds a new flare to warping/teleporting. | Flags for choosing where players can create rockets and landing zones. |
Flag Usage
NEW: Tutorial: Understanding Area, Wilderness, and Default
To set flags for an area, simply stand inside the area that you would like to set a flag for and issue the command /flag <action> <location> <flag> [value]. For more detailed information, consult the Commands page. Setting a default flag allows you to choose the behavior for all areas in the world that have not had a value previously set. Setting a wilderness flag allows you to choose the behavior for unclaimed areas.
The following examples can be used for the flag or bundle command and can be used with area, default, or wilderness. This is not an exhaustive list.
Command | Effect |
/flag get area Pvp | Retrieves the value of the flag |
/flag set wilderness NotifyExit true | Explicitly set the value of the flag. |
/flag set default SpawnMob | Toggle the current value of the flag. |
/flag help | Display a list of available flags |
Tools
Flags has the ability to use item based tools for some functionality. The items are configurable in config.yml. Below is a list of the tools available.
Tool | Default | Function |
FlagQuery | Feather | Right click in an area to view the flags currently set. Performs the same function as /flag get area or /flag get wilderness. |
Sector | Gold Hoe | If Sectors are enabled, use this tool to create a sector by right clicking to set the corners. Create subdivisions in the same manner inside an existing sector. |
Bundles
Bundles allow you to group flags together so you can set them with a single command. New bundles can be added by command or by the server operator editing the bundle.yml file. Bundles maintain their own permissions system, they do not require a flag permission even if the flag is in the bundle. Below is a list of default bundles which serve as examples and can be edited or removed. These bundles will only function if their respective modules are installed.
IMPORTANT: When adding new bundles by editing the file directly, the name should ALWAYS be lower case. Flag names are not case sensitive, and using or adding bundles with commands in-game are not case sensitive. You may use in-line YAML list format if you wish.
Bundle | Flags |
BuildCreature | BuildGolem, BuildSnowman, BuildWither |
Jail | AllowEntry, AllowLeave, AllowTpIn, AllowTpOut |
Notify | NotifyExit, NotifyEnter |
SpawnMonster | SpawnInvasion, SpawnJockey, SpawnLightning, SpawnMob, Spawner, SpawnChunk, SpawnOther |
Damage | DamageBlockExplode, DamageContact, DamageDrown, DamageFall, DamageBlockFall, DamageFire, DamageBurn, DamageLava, DamageLightning, DamageMagic, DamageMelting, DamagePoison, DamageStarve, DamageSuffocate, DamageSuicide, DamageThorns, DamageVoid, DamageWither, DamageOther |
Updater
Flags contains an automated updater feature that can check for updates and notify the console and players with permission when one is available. For more information on configuring or disabling the updater, click see the Configuration page.
Metrics
Flags reports non-identifying information about your server to MCStats.org. For more information on what is reported and how to disabled it if you would like to, please see the Questions page. To view the full set of data, click the graph below.
Discussion Forum
In order to provide more centralized and effective means of feedback and support for my growing list of plugins, a Discussion Forum has been provided. You don't even need a new account to use it! Please understand that I may not directly respond to comments on this page and I will not respond to plugin questions in the form of PM's. By posting on the forums you help others find answers to the same questions, and I don't have time to continually repeat the same answers if you want new features added! This forum is exclusively for plugins by Alshain01 and discussion of their use and development. For other concerns, please consult the Bukkit Forums.
@Elothiam
Inheritance is for Subdivisions, WorldGuard doesn't have them (currently only GriefPrevention and Residence do). Overlapping regions isn't the same thing as a subdivision. Subdivisions are wholly contained within another defined area and do not overlap other subdivisions.
For WorldGuard flags are taken from the highest priority region, even when overlapping. So you only have to set the flag there, and anything lower priority overlapping it will automatically inherit.
Using worldguard I have a village that acts as the parent for all other villages. I'm trying to use the inheritence action to have my other villages inherit the main village's flags. I'm standing in the child village but it just keeps telling me "Stand in the subdivision you wish to set inheritance for." Does this command not work with world guard? Am I missing or misunderstanding something here? DX
@gorea01
Please describe what exactly you want the flag to do.
Thank you for your great plugin,
I am searching for a flag "keepinventory" and i can't find it, can u please add it ? will really help
@ryan_the_leach
Just to clarify that, I would ask the CreeperHeal developers if they are interested in adding their own flags. If not I can help you develop a module to work between them.
@ryan_the_leach
I'll look into the forum thing, it's kind of new and sadly doesn't seem to have a subscription option. My concern is it will get forgotten (by me) and peoples questions won't get answered. Where as posts here, or new tickets get sent to my iPhone via e-mail.
For the CreeperHeal, that is exactly the sort of thing I designed Flags for. The modules included with Flags are specifically for Bukkit only. I do that for simplicity. There are two possible approaches for 3rd party plugins.
The reason I chose to do it this way is because before long people will be requesting support for dozens of different plugins (and why not?) and that would mean a huge list of dependencies for me to keep track of. Especially since not everyone (admittedly including myself) has moved to maven. It's already a pretty big chore ensuring the 7 dependencies I have are up to date. In the end it's a lot easier if those dozen plugins depend on Flags rather than the other way around. Especially since the Flags API at this stage is near final and won't change much.
Can you add a forum for list of 3rd party modules?
Additionally would you be willing / is it possible to create a creeperheal flag?
creeperheal has recently added some events to allow plugins to react to it.
https://github.com/nitnelave/CreeperHeal/tree/master/src/main/java/com/nitnelave/CreeperHeal/events
@wynryprocter
Thanks for pointing out the missing documentation.
@Alshain01
I literally just noticed that. Trying to work out these flags on my server currently. Thank you for the fast reply!
@wynryprocter
There is a LeafDecay flag in the block module. Looks like it just got left off the documentation here.
Can you add a toggleable leaf decay flag by chance? It'd be nice if it'd be possible to add in leaf types in the configuration as well. :)
@MohammadCreeper
You can block player damage from creeper explosions but I don't think there is a block damage flag. I'll see if I can add it. I'm sure I can, but given the plugins origins as being a GP addon, it wasn't necessary before since GP does that already.
Are you able to add creeper-block-damage in Flags?
I have identified a severe security flaw in 1.2.0 that allows players to set the server price for flags regardless of their status or permissions on the server. I will be uploading an emergency patch that reworks the permissions system and it is recommended that all operators running 1.2.0 update IMMEDIATELY as soon as BukkitDev approves it to resolve this issue (they have been pretty fast lately).
The patch will also rename most of the permissions so they will need to be reconfigured on your permissions system. I will add the new list to the documentation as soon as I get the patch uploaded.
Finally the patch includes experimental PlotMe support. I haven't tested it yet, but it won't impact you if you are not running PlotMe.
You da man! Excited to give this to my players. Maybe that will shut them up. xD
Alright fans of Factions, InfinitePlots, and GriefPreventionFlags-Vault. 1.2.0 has been uploaded and is only awaiting BukkitDev approval!
Be aware that because of the way Bukkit handles the config.yml (and all yml) that the file will not automatically update if it already exists. You have 2 choices. You can delete config.yml to get the new one. Or you can update it manually using the options on the configuration page. So if you want to disable the update checker, or enable auto-updates or set up your economy then you will need to do one of these two things. (It will use the internal file if you do not, so if you like the default you don't have to do anything.)
Thanks :D
Beta 2 is up, hopefully it fixes the messaging problems people are still having. Everyone who installs this in an old Flags installation needs to delete message.yml. It's no longer compatible.
For those interested, a Developer API page has been created to include links to source code and javadocs as well as a basics guide.
@AtroCty
Just remember to follow the instruction in the Config section to make sure it uses WorldGuard when both are installed. Of course if your using just the simpler flags, WorldGuard has that built in so the extra plugin may not be necessary. Depends on what you need.