mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Fix incorrect online count in custom quit message (#5541)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This commit is contained in:
parent
fdf1875e7f
commit
3eceec87d3
@ -270,7 +270,7 @@ public class EssentialsPlayerListener implements Listener, FakeAccessor {
|
|||||||
final String msg = ess.getSettings().getCustomQuitMessage()
|
final String msg = ess.getSettings().getCustomQuitMessage()
|
||||||
.replace("{PLAYER}", player.getDisplayName())
|
.replace("{PLAYER}", player.getDisplayName())
|
||||||
.replace("{USERNAME}", player.getName())
|
.replace("{USERNAME}", player.getName())
|
||||||
.replace("{ONLINE}", NumberFormat.getInstance().format(ess.getOnlinePlayers().size()))
|
.replace("{ONLINE}", NumberFormat.getInstance().format(ess.getOnlinePlayers().size() - 1)) // Subtract 1 as the leaving player is still online during this time
|
||||||
.replace("{UPTIME}", DateUtil.formatDateDiff(ManagementFactory.getRuntimeMXBean().getStartTime()))
|
.replace("{UPTIME}", DateUtil.formatDateDiff(ManagementFactory.getRuntimeMXBean().getStartTime()))
|
||||||
.replace("{PREFIX}", FormatUtil.replaceFormat(ess.getPermissionsHandler().getPrefix(player)))
|
.replace("{PREFIX}", FormatUtil.replaceFormat(ess.getPermissionsHandler().getPrefix(player)))
|
||||||
.replace("{SUFFIX}", FormatUtil.replaceFormat(ess.getPermissionsHandler().getSuffix(player)));
|
.replace("{SUFFIX}", FormatUtil.replaceFormat(ess.getPermissionsHandler().getSuffix(player)));
|
||||||
|
Loading…
Reference in New Issue
Block a user