Remove prefixes from all team chats

This commit is contained in:
Ashcon Partovi 2017-12-31 03:35:10 -07:00
parent d8fc07e7de
commit 9090ad2145
No known key found for this signature in database
GPG Key ID: 97468B9EF2123630
2 changed files with 5 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.Color;
import org.bukkit.command.CommandSender;
import tc.oc.commons.core.chat.BlankComponent;
import tc.oc.commons.core.chat.Component;
import tc.oc.commons.bukkit.chat.NameStyle;
import tc.oc.commons.bukkit.util.BukkitUtils;
@ -74,7 +75,7 @@ public abstract class ObservingParty extends MultiPlayerParty {
@Override
public BaseComponent getChatPrefix() {
if(chatPrefix == null) {
chatPrefix = new Component("[Obs] ", getBungeeColor());
chatPrefix = BlankComponent.INSTANCE;
}
return chatPrefix;
}

View File

@ -21,6 +21,7 @@ import java.time.Duration;
import tc.oc.api.docs.PlayerId;
import tc.oc.api.docs.virtual.MatchDoc;
import tc.oc.commons.bukkit.chat.NameStyle;
import tc.oc.commons.core.chat.BlankComponent;
import tc.oc.commons.core.chat.ChatUtils;
import tc.oc.commons.core.chat.Component;
import tc.oc.commons.core.util.Comparables;
@ -62,7 +63,7 @@ public class Team extends MultiPlayerParty implements Competitor, SluggedFeature
private TeamMatchModule tmm;
protected @Nullable String name = null;
protected @Nullable Component componentName;
protected Component chatPrefix;
protected BaseComponent chatPrefix;
protected Optional<Integer> minPlayers = Optional.empty(),
maxPlayers = Optional.empty(),
maxOverfill = Optional.empty();
@ -256,7 +257,7 @@ public class Team extends MultiPlayerParty implements Competitor, SluggedFeature
@Override
public BaseComponent getChatPrefix() {
if(chatPrefix == null) {
this.chatPrefix = new Component("[" + getShortName() + "] ", ChatUtils.convert(getColor()));
this.chatPrefix = BlankComponent.INSTANCE;
}
return chatPrefix;
}