Skip to content

Merge v1.9.4 changes into 1.10 dev branch #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Development
Welcome to the public code repository for MultiChat by Revilo410. (Oliver Martin)

MultiChat is an advanced chat management system for Spigot/Bungeecord with over **15000** downloads.
MultiChat is an advanced chat management system for Spigot/Bungeecord with over **20000** downloads.

[Official Listing](https://www.spigotmc.org/resources/multichat.26204/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class MultiChat extends Plugin implements Listener {
public static final String[] ALLOWED_VERSIONS = new String[] {

LATEST_VERSION,
"1.9.4",
"1.9.3",
"1.9.2",
"1.9.1",
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