Configuration

Commands Permissions Area Plugins Frequently Asked Questions Developer API

Below are the configuration options available in config.yml

Database Configuration

As of version 1.3, Flags supports YAML and MySQL.

If you are upgrading from earlier versions of Flags or GriefPreventionFlags you should do this while using a YAML database only (i.e. do not attempt to create config.yml manually using the settings below until you've run Flags 1.3 at least once). You can switch to SQL after the import, but GriefPreventionFlags data cannot be imported directly to SQL and older Flags data may need to be migrated to a newer version or it will not be able to import to SQL.

Please be aware that the author of this plugin WILL NOT support database administration. If you are unable to do this or learn to do this, then you should use YAML. It is up to the server operator to create the required database/schema and direct the JDBC url to it. Flags will fill in the necessary tables automatically.

To configure a database, use the URL key. If the url is anything other than a valid MySQL JDBC connection url, then YAML is assumed. User name and password are ignored for YAML databases.

  Database:
    Url: jdbc:mysql://localhost/flags
    User: MyUserName
    Password: MyPassword

Database Import

You can import a database into SQL from YAML. There is currently no way to return data to the YAML format, existing YAML files will not be deleted but any new flags changed will not migrate back at this time. It is recommended that you use the database import, even on new servers using SQL, as the default bundles will not automatically be transferred to the SQL database.

To import a database from YAML, execute the command /flags import.

The following YAML files are imported into the database and may be removed at your discretion once the import is completed:

  • wilderness.yml
  • default.yml
  • data.yml
  • price.yml
  • bundle.yml

Land Allocation Systems

The plugin will search through the entire list of systems and stop at the first one it finds available and use it. If you install more than one system, you can change the search order to make sure the one you want is used in config.yml. If you install only one system, it is not necessary to change this value. Due to web formatting the following example list is in long format, either YAML list format is acceptable.

  AreaPlugins:
    - Factions
    - Factoid
    - GriefPrevention
    - InfinitePlots
    - PlotMe
    - PreciousStones
    - Regios
    - Residence
    - WorldGuard

Event Listeners

The Border Patrol settings determine how frequently Flags will process the PlayerMoveEvent (the only Bukkit event monitored by Flags directly). Increase the values to reduce overall lag caused by this event, however the effects of the flags controlled by the PlayerMoveEvent may fire a little later. For example, with the AllowEntry flag set to false, players may be able to get a few steps into the area before being teleported back out. Don't worry though, the flags effects will take place eventually. The higher the values, the further they will get into the area before being forced back out. You can also disable the PlayerMoveEvent monitor entirely. This of course will disable all flags that depend on it, including those in 3rd party modules or plugins. As of v1.3, Flags will automatically stop listening to the PlayerMoveEvent if no external plugin has registered for Flags' PlayerChangedAreaEvent, even if BorderPatrol is on in config.yml.


EventDivisor sets the number of events to ignore. By default every 10th event is processed.
TimeDivisor sets the number of milliseconds between a specific player's event is processed. By default every 500ms the same player's event is processed IF it wins the EventDivisor event rule.

  BorderPatrol:
    Enable: true
    PlayerMoveEventDivisor: 10
    PlayerMoveEventTimeDivisor: 500

Economy

Flags integrates with Vault to provide server operators with the ability to "sell" flags and messages to players.

BaseValue determines the point at which to charge the player for setting a flag. The available options are:

PLUGINPlayer will be charged when the new flag value differs from default provided by the flag module or plugin.
DEFAULTPlayer will be charged when the new flag value differs from operator defined default value.
ALWAYSPlayer is always charged for setting the flag value.


The refund option allows the player to recoup the cost of the flag if the value is returned back to the defined PLUGIN or DEFAULT value. If BaseValue is ALWAYS, refunds will only be give if the flag is removed entirely. It is important to be aware that players are always refunded the current price. It is possible for a player to buy a flag at one price and then be refunded a higher or lower price if the price is changed after the initial purchase.

  Economy:
    BaseValue: PLUGIN
    Refund:
      Flag: true
      Message: false

Sectors

Flags posses a simplistic cuboid system called "sectors". This feature is enabled only of no other land management system is detected at startup. Sector creation is handled by left & right clicks using a tool specified below. Sectors will extend to a specified depth. Sectors allow flags and bundles to be set like any other land system and support subdivisions as well.

  Sector:
     DefaultDepth: 25

Tools

The Tools section allows you to configure the material type of the various tools in Flags. Materials must conform to Bukkit's MATERIAL enumeration. It is highly reccomended you use tools that are either not heavily used (gold tools are almost worthless in Minecraft) or tools that do not have a right click function (stick, leather, feather, etc). Query tools will not interfere with other plugins using the same tool, so it is possible to multipurpose a tool and get all the area data with one click.

  Tools:
    FlagQuery: 'FEATHER'
    Sector: 'GOLD_HOE'

Mr. Clean

Mr. Clean is a feature for supported land management systems that helps keep the Flags database small and tidy. If the land management system provides events for when it's specific area is unclaimed or deleted, Mr. Clean will remove the associated data from the Flags database. As of 1.3.1, you may disable this functionality.

  MrClean: true

Update Checking

Flags can automatically check for updates and notifiy you when they are available. All players with the flags.admin.notifyupdate permission will be notified when an update is available.

The ServerModsAPIKey is currently optional, however if you wish to provide it you can locate it here. Please to not share this key with anyone. Flags will upload it directly to BukkitDev and no author of Flags will be allowed to see it.

  Update:
    Enabled: true
    Interval: 1440
    ServerModsAPIKey: null

Metrics Reporting

This option is provided to disable reporting to MCStats. For more information please consult the FAQ.

  Metrics:
    Enabled: true

Debug

This should always be set to false unless the plugin author instructs you to enable it in an effort to troubleshoot a particular problem. Enabling it will cause a massive amount of debugging messages to be sent to the console. It also disables some features such as Metrics.

  Debug: false