sk89q/worldguard — pull request #191 by Silthus (2012-02-11 14:15:35+00:00)
Title: Custom Flags

I added some methods to support custom flag registration.

Here is a code snipped how you would add a custom flag:

```java
public class CustomFlag {

public static final BooleanFlag WARNED = new BooleanFlag("warned");

public static void init() {
DefaultFlag.addCustomFlag(WARNED);
}
}
```
Then you can use the custom flag just like a normal flag by refrencing the static WARNED:

```java
if (region.getFlag(CustomFlag.WARNED) == null) {
setWarned(false);
} else {
this.warned = region.getFlag(CustomFlag.WARNED);
}

...

public void setWarned(boolean warned) {
region.setFlag(CustomFlag.WARNED, warned);
save();
}
```

Hopes this gets pulled.

I am already using this on my custom build of WorldGuard and had no problems so far.

Greetz Silthus