Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.x' into fix/null-username
Browse files Browse the repository at this point in the history
mdcfe authored Nov 7, 2023
2 parents e2c4af7 + 3eceec8 commit 2f153b8
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -270,7 +270,7 @@ public void onPlayerQuit(final PlayerQuitEvent event) {
final String msg = ess.getSettings().getCustomQuitMessage()
.replace("{PLAYER}", player.getDisplayName())
.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("{PREFIX}", FormatUtil.replaceFormat(ess.getPermissionsHandler().getPrefix(player)))
.replace("{SUFFIX}", FormatUtil.replaceFormat(ess.getPermissionsHandler().getSuffix(player)));
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ protected void run(final Server server, final User user, final String commandLab
final Set<String> potionslist = new TreeSet<>();
for (final Map.Entry<String, PotionEffectType> entry : Potions.entrySet()) {
final String potionName = entry.getValue().getName().toLowerCase(Locale.ENGLISH);
if (potionslist.contains(potionName) || user.isAuthorized("essentials.potion." + potionName)) {
if (potionslist.contains(potionName) || user.isAuthorized("essentials.potions." + potionName)) {
potionslist.add(entry.getKey());
}
}
@@ -85,7 +85,7 @@ protected List<String> getTabCompleteOptions(final Server server, final User use
}
for (final Map.Entry<String, PotionEffectType> entry : Potions.entrySet()) {
final String potionName = entry.getValue().getName().toLowerCase(Locale.ENGLISH);
if (user.isAuthorized("essentials.potion." + potionName)) {
if (user.isAuthorized("essentials.potions." + potionName)) {
options.add("effect:" + entry.getKey());
}
}

0 comments on commit 2f153b8

Please sign in to comment.