plot info and flags

This commit is contained in:
boy0001 2014-11-10 09:55:45 +11:00
parent f8db0ceec5
commit ec754c39b7
3 changed files with 12 additions and 12 deletions

View File

@ -246,15 +246,15 @@ public enum C {
"&6Can build&7: &a%build%"
),*/
PLOT_INFO(
"&cID: &6%id%&c, " +
"&cAlias: &6%alias%&c, " +
"&cOwner: &6%owner%&c, " +
"&cBiome: &6%biome%&c, " +
"&cCan Build: &6%build%&c, " +
"&cRating: &6%rating%&c/&610&c, " +
"&cHelpers:&6%helpers%&c, " +
"&cTrusted:&6%trusted%&c, " +
"&cDenied:&6%denied%&c, " +
"&cID: &6%id%&c\n" +
"&cAlias: &6%alias%&c\n" +
"&cOwner: &6%owner%&c\n" +
"&cBiome: &6%biome%&c\n" +
"&cCan Build: &6%build%&c\n" +
"&cRating: &6%rating%&c/&610&c\n" +
"&cHelpers: &6%helpers%&c\n" +
"&cTrusted: &6%trusted%&c\n" +
"&cDenied: &6%denied%&c\n" +
"&cFlags: &6%flags%"
),
PLOT_INFO_HELPERS("&6Helpers&7: %helpers%"),

View File

@ -169,7 +169,7 @@ public class Info extends SubCommand {
final String trusted = getPlayerList(plot.trusted);
final String denied = getPlayerList(plot.denied);
final String rating = String.format("%.1f", DBFunc.getRatings(plot));
final String flags = "&3" + (StringUtils.join(plot.settings.getFlags(), "").length() > 0 ? StringUtils.join(plot.settings.getFlags(), "&7, &3") : "none");
final String flags = "&6" + (StringUtils.join(plot.settings.getFlags(), "").length() > 0 ? StringUtils.join(plot.settings.getFlags(), "&7, &6") : "none");
final boolean build = player == null ? true : plot.hasRights(player);
String owner = "none";

View File

@ -567,7 +567,7 @@ public class SQLManager extends AbstractDB {
if (element.contains(":")) {
final String[] split = element.split(":");
try {
flags.add(new Flag(FlagManager.getFlag(split[0], true), split[1].replace("<EFBFBD>", ",").replace("<EFBFBD>", ":")));
flags.add(new Flag(FlagManager.getFlag(split[0], true), split[1].replaceAll("\u00AF", ":").replaceAll("´", ",")));
} catch (final Exception e) {
exception = true;
}
@ -640,7 +640,7 @@ public class SQLManager extends AbstractDB {
if (i != 0) {
flag_string.append(",");
}
flag_string.append(flag.getKey() + ":" + flag.getValue());
flag_string.append(flag.getKey() + ":" + flag.getValue().replaceAll(":", "\u00AF").replaceAll(",", "\u00B4"));
i++;
}
runTask(new Runnable() {