Fixed CSV->YAML conversion.

This commit is contained in:
sk89q 2011-04-02 12:15:40 -07:00
parent 9322eedb4e
commit 762b10cb17
2 changed files with 6 additions and 2 deletions

View File

@ -262,7 +262,11 @@ private void parseFlags(ProtectedRegion region, String data) {
}
StateFlag flag = DefaultFlag.getLegacyFlag(flagStr);
if (flag != null) {
region.setFlag(flag, curState);
} else {
logger.warning("Legacy flag '" + flagStr + "' is unsupported");
}
}
}
}

View File

@ -74,7 +74,7 @@ public static Flag<?>[] getFlags() {
*/
public static StateFlag getLegacyFlag(String flagString) {
for (Flag<?> flag : flagsList) {
if (flag instanceof StateFlag && flagString.equals(flag.getLegacyCode())) {
if (flag instanceof StateFlag && flagString.equals(String.valueOf(flag.getLegacyCode()))) {
return (StateFlag) flag;
}
}