Allow chat format of unmarried players to be changed #25

This commit is contained in:
Lennart ten wolde 2017-02-26 17:32:51 +01:00
parent c30a33f0e8
commit 0b4507c4a6
2 changed files with 2 additions and 1 deletions

View file

@ -38,6 +38,7 @@ public class Settings {
}) })
public static final ConfigOption<String> PM_FORMAT = new ConfigOption<>("chat.pm-format", "&4{icon:heart}&c{name}&4{icon:heart} &7{message}"); public static final ConfigOption<String> PM_FORMAT = new ConfigOption<>("chat.pm-format", "&4{icon:heart}&c{name}&4{icon:heart} &7{message}");
public static final ConfigOption<String> CHAT_FORMAT = new ConfigOption<>("chat.status-format", "&4&l<3 &r"); public static final ConfigOption<String> CHAT_FORMAT = new ConfigOption<>("chat.status-format", "&4&l<3 &r");
public static final ConfigOption<String> CHAT_FORMAT_UNMARRIED = new ConfigOption<>("chat.unmarried-status-format", "");
public static final ConfigOption<String> CHATSPY_FORMAT = new ConfigOption<>("chat.spy-format", "&c[CHAT SPY] &7{sender} -> {receiver}&f: {message}"); public static final ConfigOption<String> CHATSPY_FORMAT = new ConfigOption<>("chat.spy-format", "&c[CHAT SPY] &7{sender} -> {receiver}&f: {message}");
public static final ConfigOption<Boolean> FORCE_FORMAT = new ConfigOption<>("chat.force-status-format", true); public static final ConfigOption<Boolean> FORCE_FORMAT = new ConfigOption<>("chat.force-status-format", true);
public static final ConfigOption<Boolean> FORCE_GENDER_FORMAT = new ConfigOption<>("chat.force-gender-format", true); public static final ConfigOption<Boolean> FORCE_GENDER_FORMAT = new ConfigOption<>("chat.force-gender-format", true);

View file

@ -80,7 +80,7 @@ public class ChatListener implements Listener {
// Marriage status // Marriage status
if(format.contains("{marriage_status}")) { if(format.contains("{marriage_status}")) {
String status = ""; String status = Settings.CHAT_FORMAT_UNMARRIED.value();
if(mplayer.isMarried()) { if(mplayer.isMarried()) {
String partner = player.hasMetadata("marriedTo") ? player.getMetadata("marriedTo").get(0).asString() : ""; String partner = player.hasMetadata("marriedTo") ? player.getMetadata("marriedTo").get(0).asString() : "";
status = Settings.CHAT_FORMAT.value() status = Settings.CHAT_FORMAT.value()