EssentialsX / Essentials

The modern Essentials suite for Spigot and Paper.
https://essentialsx.net
GNU General Public License v3.0
1.94k stars 978 forks source link

banJoin is missing placeholder for banned by #4881

Open iRobSch opened 2 years ago

iRobSch commented 2 years ago

Type of bug

Other unexpected behaviour

/ess dump all output

Not applicable.

Error log (if applicable)

No response

Bug description

The message line "banJoin=You are banned from this server. Reason\: {0}" does not support following:

  1. Hex colours
  2. The {1} variable which showcases who the player was banned by.

Steps to reproduce

Add both the variable and hex colours to the message line and see in-game.

Expected behaviour

This is how the message "banFormat=" looks in-game: image

Actual behaviour

This is how the "banJoin=" message looks in-game: image

iRobSch commented 2 years ago

Forgot to mention this, but both messages use the exact same configuration line.

banFormat=§x§d§3§3§1§f§b§lP§x§c§e§2§e§f§8§ll§x§c§9§2§b§f§5§lu§x§c§3§2§9§f§3§lt§x§b§e§2§6§f§0§la§x§b§9§2§3§e§d§ln§x§b§4§2§0§e§a§li§x§a§f§1§d§e§7§lt§x§a§9§1§b§e§5§ly§x§a§4§1§8§e§2§lM§x§9§f§1§5§d§f§lC\n\n§7You have been banned by §x§e§2§5§7§f§1{1} §7for\:\n§x§e§2§5§7§f§1{0}\n\n§cYou have been permanently banned.\n\n§fYou may appeal at §x§f§7§2§c§f§bd§x§f§3§2§b§f§ai§x§e§f§2§a§f§9s§x§e§b§2§9§f§8c§x§e§7§2§8§f§6o§x§e§3§2§7§f§5r§x§d§f§2§6§f§4d§x§d§b§2§5§f§3.§x§d§7§2§4§f§2p§x§d§3§2§3§f§1l§x§c§f§2§2§f§0u§x§c§c§2§1§e§ft§x§c§8§1§f§e§da§x§c§4§1§e§e§cn§x§c§0§1§d§e§bi§x§b§c§1§c§e§at§x§b§8§1§b§e§9y§x§b§4§1§a§e§8m§x§b§0§1§9§e§7c§x§a§c§1§8§e§5.§x§a§8§1§7§e§4n§x§a§4§1§6§e§3e§x§a§0§1§5§e§2t

Another comment: the same applies to banIpJoin=.

pop4959 commented 2 years ago

Not exactly sure what you mean by hex format, as the colors look correct to me, but I'm assuming you mean Essentials' &#RRGGBB format rather than §x§r§r§g§g§b§b. Definitely would make a lot of sense there.

JRoy commented 2 years ago

I don't plan on supporting/fixing bugs with hex colors in locale files. This will be "fixed" when minimessage support is added for locale files in #4717

When merged you could do something like:

banIpJoin=MM||<gradient:#5e4fa2:#f79459>My Network</gradient>\n<red>You've been banned for {0}\n<blue>AmongUs
pop4959 commented 2 years ago

Edited the issue to focus more on adding the "banned by" placeholder since that is still a valid feature request.

In the future also consider creating multiple issues if there are several problems/feature requests, even if they are related.