Better chat integration with other plugins. In fact the whole chat system has been reprogrammed. Fix ascii compass typo. Fix claim at the border of enemy territory bug. New faction chat. Some refactoring

This commit is contained in:
Olof Larsson
2011-02-12 18:05:05 +01:00
parent d554bc18ec
commit da89ff4ecd
15 changed files with 417 additions and 329 deletions

View File

@@ -58,6 +58,26 @@ public class TextUtil {
ret = ret.toLowerCase();
return ret.substring(0, 1).toUpperCase()+ret.substring(1);
}
/// TODO create tag whitelist!!
public static ArrayList<String> substanceChars = new ArrayList<String>(Arrays.asList(new String []{
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H",
"I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r",
"s", "t", "u", "v", "w", "x", "y", "z"
}));
public static String getComparisonString(String str) {
String ret = "";
for (char c : str.toCharArray()) {
if (substanceChars.contains(String.valueOf(c))) {
ret += c;
}
}
return ret.toLowerCase();
}
}