Skip to content

Commit

Permalink
Merge pull request #126 from MultiChat/v19
Browse files Browse the repository at this point in the history
Version 1.9.4
  • Loading branch information
OllieMartin authored Jul 20, 2020
2 parents 4766dfd + 4f3a286 commit e4015c7
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion multichat/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.olivermartin.multichat</groupId>
<artifactId>multichat</artifactId>
<version>1.9.3</version>
<version>1.9.4</version>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion multichat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>xyz.olivermartin.multichat</groupId>
<artifactId>multichat</artifactId>
<version>1.9.3</version>
<version>1.9.4</version>

<repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
*/
public class MultiChat extends Plugin implements Listener {

public static final String LATEST_VERSION = "1.9.3";
public static final String LATEST_VERSION = "1.9.4";

public static final String[] ALLOWED_VERSIONS = new String[] {

LATEST_VERSION,
"1.9.3",
"1.9.2",
"1.9.1",
"1.9",
Expand Down Expand Up @@ -98,7 +99,7 @@ public class MultiChat extends Plugin implements Listener {
public static boolean hideVanishedStaffInMsg = true;
public static boolean hideVanishedStaffInStaffList = true;
public static boolean hideVanishedStaffInJoin = true;

public static List<String> legacyServers = new ArrayList<String>();

public static MultiChat getInstance() {
Expand Down Expand Up @@ -346,7 +347,7 @@ public void onEnable() {
logStaffChat = configYML.getSection("privacy_settings").getBoolean("log_staffchat");
logGroupChat = configYML.getSection("privacy_settings").getBoolean("log_groupchat");
}

// Legacy servers for RGB approximation
if (configYML.contains("legacy_servers")) {
legacyServers = configYML.getStringList("legacy_servers");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public String getPrefix(UUID uuid) {
return MultiChatUtil.approximateHexCodes(vaultChat.getPlayerPrefix(Bukkit.getServer().getPlayer(uuid)));
}

return vaultChat.getPlayerPrefix(Bukkit.getServer().getPlayer(uuid));
return MultiChatUtil.reformatRGB(vaultChat.getPlayerPrefix(Bukkit.getServer().getPlayer(uuid)));

}

Expand All @@ -50,7 +50,7 @@ public String getSuffix(UUID uuid) {
return MultiChatUtil.approximateHexCodes(vaultChat.getPlayerSuffix(Bukkit.getServer().getPlayer(uuid)));
}

return vaultChat.getPlayerSuffix(Bukkit.getServer().getPlayer(uuid));
return MultiChatUtil.reformatRGB(vaultChat.getPlayerSuffix(Bukkit.getServer().getPlayer(uuid)));

}

Expand Down Expand Up @@ -86,6 +86,7 @@ public String getDisplayName(UUID uuid) {
displayNameFormat = displayNameFormat.replaceAll("%NAME%", player.getName());
displayNameFormat = displayNameFormat.replaceAll("%PREFIX%", getPrefix(uuid));
displayNameFormat = displayNameFormat.replaceAll("%SUFFIX%", getSuffix(uuid));
displayNameFormat = MultiChatUtil.reformatRGB(displayNameFormat);
displayNameFormat = displayNameFormat.replaceAll("&(?=[a-f,0-9,k-o,r,x])", "§");

// LEGACY HACK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public String getPrefix(UUID uuid) {
Player player = opPlayer.get();

if (player.getOption("prefix").isPresent()) {
return MultiChatUtil.approximateHexCodes(player.getOption("prefix").get());
return MultiChatUtil.approximateHexCodes(MultiChatUtil.reformatRGB(player.getOption("prefix").get()));
} else {
return "";
}
Expand All @@ -45,7 +45,7 @@ public String getSuffix(UUID uuid) {
Player player = opPlayer.get();

if (player.getOption("suffix").isPresent()) {
return MultiChatUtil.approximateHexCodes(player.getOption("suffix").get());
return MultiChatUtil.approximateHexCodes(MultiChatUtil.reformatRGB(player.getOption("suffix").get()));
} else {
return "";
}
Expand Down Expand Up @@ -92,8 +92,9 @@ public String getDisplayName(UUID uuid) {
displayNameFormat = displayNameFormat.replaceAll("%NAME%", player.getName());
displayNameFormat = displayNameFormat.replaceAll("%PREFIX%", getPrefix(uuid));
displayNameFormat = displayNameFormat.replaceAll("%SUFFIX%", getSuffix(uuid));
displayNameFormat = MultiChatUtil.reformatRGB(displayNameFormat);
displayNameFormat = displayNameFormat.replaceAll("&(?=[a-f,0-9,k-o,r,x])", "§");

displayNameFormat = MultiChatUtil.approximateHexCodes(displayNameFormat);

// TODO Sponge doesn't seem to like this... So we tend to work around it by sending back our original string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import xyz.olivermartin.multichat.local.sponge.listeners.communication.LocalSpongePlayerChannelListener;
import xyz.olivermartin.multichat.local.sponge.listeners.communication.LocalSpongePlayerMetaListener;

@Plugin(id = "multichat", name = "MultiChat", version = "1.9.3", dependencies = { @Dependency(id = "placeholderapi", optional = true) })
@Plugin(id = "multichat", name = "MultiChat", version = "1.9.4", dependencies = { @Dependency(id = "placeholderapi", optional = true) })
public class MultiChatLocalSpongePlugin {

@Inject
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/bungee.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: MultiChat
main: xyz.olivermartin.multichat.bungee.MultiChat
version: 1.9.3
version: 1.9.4
author: Revilo410
api-version: 1.16
softdepends: [PremiumVanish]
2 changes: 1 addition & 1 deletion multichat/src/main/resources/chatcontrol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# DON'T EDIT #
version: "1.9.3" #
version: "1.9.4" #
##################

# 1. Chat Control Rules
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/chatcontrol_fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# NE PAS EDITER #
version: "1.9.3" #
version: "1.9.4" #
##################

# French Translation by Nogapra - Thank you !
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# DON'T EDIT #
version: "1.9.3" #
version: "1.9.4" #
##################

# 1. General
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/config_fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# NE PAS EDITER #
version: "1.9.3" #
version: "1.9.4" #
##################

# French Translation by Nogapra - Thank you !
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/joinmessages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# DON'T EDIT #
version: "1.9.3" #
version: "1.9.4" #
##################

############################################################
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/joinmessages_fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# Ne pas éditer #
version: "1.9.3" #
version: "1.9.4" #
##################

# French Translation by Nogapra - Thank you!
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/localconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# DON'T EDIT #
version: "1.9.3" #
version: "1.9.4" #
##################

# 1. Global Chat Settings
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/localconfig_fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# NE PAS EDITER #
version: "1.9.3" #
version: "1.9.4" #
##################

# French Translation by Nogapra - Thank you !
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# DON'T EDIT #
version: "1.9.3" #
version: "1.9.4" #
##################

############################################################
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/messages_fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

##################
# DON'T EDIT #
version: "1.9.3" #
version: "1.9.4" #
##################

# French Translation by Nogapra - Thank you!
Expand Down
2 changes: 1 addition & 1 deletion multichat/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: MultiChat
version: 1.9.3
version: 1.9.4
author: Revilo410
main: xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlugin
softdepend: [Vault,PlaceholderAPI]
Expand Down

0 comments on commit e4015c7

Please sign in to comment.