Adjust a few config options

This commit is contained in:
Draycia committed 2020-08-02 00:30:10 -07:00
1 parent 6af75c8e86
commit 7e9aae9a9b
3 files changed
+8 -10

No files matched your search

@@ -66,7 +66,7 @@ public abstract class ChatChannel {
public abstract String getCannotUseMessage(); public abstract String getCannotUseMessage();
public abstract Boolean firstMatchingGroup(); public abstract Boolean primaryGroupOnly();
public abstract boolean testContext(ChatUser sender, ChatUser target); public abstract boolean testContext(ChatUser sender, ChatUser target);
@@ -172,7 +172,7 @@ public class CarbonChatChannel extends ChatChannel {
private String getFormat(ChatUser user) { private String getFormat(ChatUser user) {
String group = "default"; String group = "default";
if (!firstMatchingGroup()) { if (this.primaryGroupOnly()) {
if (user.isOnline()) { if (user.isOnline()) {
group = carbonChat.getPermission().getPrimaryGroup(user.asPlayer()); group = carbonChat.getPermission().getPrimaryGroup(user.asPlayer());
} else { } else {
@@ -181,7 +181,7 @@ public class CarbonChatChannel extends ChatChannel {
} else { } else {
String[] groups; String[] groups;
// TODO: this can't be done on main thread :( // TODO: this can't be done on main thread (if user is offline) :(
if (user.isOnline()) { if (user.isOnline()) {
groups = carbonChat.getPermission().getPlayerGroups(user.asPlayer()); groups = carbonChat.getPermission().getPlayerGroups(user.asPlayer());
} else { } else {
@@ -314,8 +314,8 @@ public class CarbonChatChannel extends ChatChannel {
} }
@Override @Override
public Boolean firstMatchingGroup() { public Boolean primaryGroupOnly() {
return getBoolean("first-matching-group"); return getBoolean("primary-group-only");
} }
@Override @Override
+3 -5
View File
@@ -44,8 +44,9 @@ default:
forward-format: true forward-format: true
# Enables/disables cross server chat for this channel # Enables/disables cross server chat for this channel
should-bungee: true should-bungee: true
# Determines if this channel should use the highest matching vault group found for formatting # If true, plugin will only use the format corresponding to the user's primary group (vault).
first-matching-group: false # If false, plugin will look through the user's groups and go with the first group with a corresponding format.
primary-group-only: true
channels: channels:
global: global:
@@ -100,9 +101,6 @@ item-link-placeholders:
- '%item%' - '%item%'
spy-prefix: '<color>[SPY] ' spy-prefix: '<color>[SPY] '
spy-prefix-nation: '<color>[SPY <nation>] '
spy-prefix-town: '<color>[SPY <town>] '
spy-prefix-mcmmo: '<color>[SPY <party>] '
pings: pings:
enabled: true enabled: true