Skip to content

Commit

Permalink
Readd %player% placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
Refrac committed Jun 9, 2024
1 parent 1418322 commit 3347af7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public String setPlaceholders(CommandSender sender, String placeholder) {
placeholder = placeholder.replace("%prefix%", SimpleStaffChat.getInstance().getLocaleFile().getString("prefix"));

if (sender instanceof ProxiedPlayer player) {
placeholder = placeholder.replace("%player%", player.getName());
placeholder = placeholder.replace("%displayname%", player.getDisplayName());

if (LuckPermsUtil.getLuckPerms() != null) {
placeholder = placeholder.replace("%luckperms_prefix%", LuckPermsUtil.getPrefix(player));
placeholder = placeholder.replace("%luckperms_suffix%", LuckPermsUtil.getSuffix(player));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public String setPlaceholders(CommandSource sender, String placeholder) {
placeholder = placeholder.replace("%prefix%", SimpleStaffChat.getInstance().getLocaleFile().getString("prefix"));

if (sender instanceof Player player) {
placeholder = placeholder.replace("%player%", player.getUsername());

if (LuckPermsUtil.getLuckPerms() != null) {
placeholder = placeholder.replace("%luckperms_prefix%", LuckPermsUtil.getPrefix(player));
placeholder = placeholder.replace("%luckperms_suffix%", LuckPermsUtil.getSuffix(player));
Expand Down

0 comments on commit 3347af7

Please sign in to comment.