mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Ux improvements
This commit is contained in:
1 parent
b0a474c6ee
commit
02732d5b5d
4 files changed
+24
-4
No files matched your search
@@ -39,6 +39,15 @@ bukkit {
|
||||
depend = ['PlaceholderAPI', 'Vault']
|
||||
softDepend = ['LuckPerms']
|
||||
loadBefore = ["Essentials"]
|
||||
permissions {
|
||||
'carbonchat.channels.Global.see' {
|
||||
setDefault("TRUE")
|
||||
}
|
||||
|
||||
'carbonchat.channels.Global.use' {
|
||||
setDefault("TRUE")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.build.dependsOn tasks.shadowJar
|
||||
|
||||
@@ -107,6 +107,14 @@ public class CarbonChatChannel extends ChatChannel {
|
||||
return;
|
||||
}
|
||||
|
||||
String displayName;
|
||||
|
||||
if (user.isOnline()) {
|
||||
displayName = user.asPlayer().getDisplayName();
|
||||
} else {
|
||||
displayName = user.asOfflinePlayer().getName();
|
||||
}
|
||||
|
||||
// Iterate through players who should receive messages in this channel
|
||||
for (ChatUser target : recipients) {
|
||||
// Call second format event. Used for relational stuff (placeholders etc)
|
||||
@@ -124,6 +132,7 @@ public class CarbonChatChannel extends ChatChannel {
|
||||
|
||||
TextComponent formattedMessage = (TextComponent) carbonChat.getAdventureManager().processMessage(formatEvent.getFormat(),
|
||||
"br", "\n",
|
||||
"displayname", displayName,
|
||||
"color", "<" + getColor(target).asHexString() + ">",
|
||||
"phase", Long.toString(System.currentTimeMillis() % 25),
|
||||
"server", carbonChat.getConfig().getString("server-name", "Server"),
|
||||
@@ -151,6 +160,7 @@ public class CarbonChatChannel extends ChatChannel {
|
||||
|
||||
TextComponent consoleMessage = (TextComponent) carbonChat.getAdventureManager().processMessage(consoleFormatEvent.getFormat(),
|
||||
"br", "\n",
|
||||
"displayname", displayName,
|
||||
"color", "<" + getColor(user).asHexString() + ">",
|
||||
"phase", Long.toString(System.currentTimeMillis() % 25),
|
||||
"server", carbonChat.getConfig().getString("server-name", "Server"),
|
||||
|
||||
@@ -30,7 +30,8 @@ public class MeCommand extends BaseCommand {
|
||||
format = format.replace("<message>", "<pre><message></pre>");
|
||||
}
|
||||
|
||||
Component component = carbonChat.getAdventureManager().processMessage(format, "br", "\n", "message", message);
|
||||
Component component = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
|
||||
"displayname", player.getDisplayName(), "message", message);
|
||||
|
||||
ChatUser user = carbonChat.getUserService().wrap(player);
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ default:
|
||||
formats:
|
||||
# Placeholders: <username>, <displayname>, <channel>, <server>, <message>, <primaryrole>, <color>
|
||||
# Also supports PlaceholderAPI
|
||||
staff: '<gray>{[%vault_prefix%<gray>]} %player_displayname% <reset><gray>» <color><message>'
|
||||
default: '<gray>[%vault_prefix%<gray>] %player_displayname%<reset><gray>: <color><message>'
|
||||
staff: '<white>Staff <<displayname><reset><white>> <message>'
|
||||
default: '<white>Player <<displayname><reset><white>> <message>'
|
||||
# CarbonChat will look for a matching group in the list below when choosing which group to use for formatting.
|
||||
# If there are no matches, the plugin will fall back to the primary-group-only option.
|
||||
# It's advised to set this option to [] if you don't want to use this.
|
||||
@@ -115,7 +115,7 @@ language:
|
||||
other-nickname-reset: '<green><user><reset>''s nickname was reset!'
|
||||
|
||||
# The following messages are compatible with PlaceholderAPI and MiniMessage/MineDown
|
||||
me: '<italic><dark_purple>*%player_displayname% <reset><message>*</dark_purple></italic>'
|
||||
me: '<italic><dark_purple>*<displayname> <reset><message>*</dark_purple></italic>'
|
||||
ignoring-user: '<green>You are now ignoring <gold><player><reset><green>!'
|
||||
not-ignoring-user: '<green>You are no longer ignoring <gold><player><reset><green>!'
|
||||
ignore-exempt: '<red>User <player> <red>is exempt from being ignored!'
|
||||
|
||||
Reference in new issue
Block a user