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.
Any chance this could be updated to work with the new 7.8 griefprevention?
@Alshain01
As you can fake weather conditions to the player, you *could* do area based weather, by changing what the client see's when they enter/leave that area, but that still might be outside the scope of your project.
@switorik
I could have sworn five minutes ago that there was, but I guess not at the moment.
I have one more question, is there a keepInventory flag?
@switorik
Yep, looks like there is a bug that is causing the flag to be backward from what you would expect (false turns damage on, default is true). I'll have that fixed in the next build.
What you have done should correct it for claims, however default only applies to claims that have not had a value explicitly set. Default does not apply to the world outside of claims.
So, assuming no claims have explicitly set the flag to true you should be able to do both commands to correct it:
/flag set default PotionSplash false /flag set world PotionSplash false
You will need to do this in each world. Remember to turn it back on once you upgrade to the next version since I will be fixing that.
I'm having an issue where thrown potions do not affect players. I traced it to the flags damage module. Specifically, the PotionSplash flag.
I tried doing "/flag set default PotionSplash false" and it works in the world, but not in the nether or the end. I set the default in all three worlds. (http://pastebin.com/YkQ7MD1k)
The splash potions only work in the world. What am I doing wrong?
@Varo95
Lol, your very welcome. I'm just glad people find my plugins useful.
@Alshain01
Ty for all, love u, love your plugin and love your work, but not enough money for donate u xD
This heart for your 2013 Christmas <3
@Varo95
Stand in the subdivision and type /flag inherit false
A full list of the command actions is here
@Alshain01
Thanks for that info, but anyway to put inherit setting to false on GP 7.8 beta? :P
@Varo95
Yes, if your using GriefPrevention or Residence you can set the inherit setting to false and it will be only on the subdivision.
WorldGuard doesn't have subdivisions, it has overlapping regions. They aren't the same exactly. On WorldGuard, Flags will respect the priority assigned by WorldGuard, so if you put a region 1 inside region 2 and set region 1's priority higher than region 2, then you can define only region 1 as PvP allowed.
@Valconeye Weather can't be set in specific areas, only on a world basis and would be outside the scope of Flags. There are most likely other plugins to serve this purpose already.
Anyway to add a Weather flag? (or I missed it?)
I got WorldGuard and GriefPrevention, I just see that only work on GriefPrevention claims...
¿It's seems that can only work with one system at the same time? :|
I've got a question, if i put the pvp flag to false on a subdivision from griefprevention, it will be pvp on all land? or only in the subdivision? :|
I need to put flags by subdivision too, i can actually do that?
(I'm Spanish :| sorry if i got some fails on words expressions :P)
@ryan_the_leach
Ok, I reworked this for coming versions, will use the same UUID in the global configuration rather than create a new one.
@ryan_the_leach
Stats from Flags are only recorded on the flags page. Metrics for other plugins are only recorded on those plugin's graphs. So even though the UUID is separate, it still only matters to the plugin sending the data.
I''ll look at it again, but it's not actually using any hardcoded path, just getDataFolder().
@Alshain01
the file was created with v1.2.3 it may be a linux vs windows thing.
By having 2 different UUID's in metric you will be causing the stats of servers using flags and another plugin with metrics to double.
@ryan_the_leach
Well storing it my own folder is intended. I don't like the idea of a "global" switch. It prevents you from being able to turn it off for some plugins that send large amounts of information and not others that send smaller amounts of information like Flags. I don't feel as though my plugin should be affected by others that aren't under my control. All of the information on how to disable it in the Flags FAQ reflects that behavior which is consistent with the rules of BukkitDev.
However, it is indeed supposed to be in the Flags data folder. I'm not able to reproduce the issue though. Maybe it was a bug I fixed earlier and that file is just a remnant. Try deleting the file and see if it gets put back there on a server reload.
In case you didn't notice you are doing metrics incorrectly,
1. you are storing the metrics.yaml in your plugin directory instead of the global pluginmetrics folder.
2. you are using the wrong slash on the plugin folder.
http://i.imgur.com/0cf8SoR.png
Ok everyone, Flags 1.2.3 appears to be "compile compatible" with bukkit-1.7.2-R0.1-SNAPSHOT without modification. Remember this version has been pretty much promised to be unstable by the Bukkit team and should not be installed on live servers under any circumstances. But if you are testing, Flags 1.2.3, I believe it should run without error, however if you are testing and do find any issues when running 1.7.2 please let me know as soon as possible by creating a ticket..