Skip to content

Commit

Permalink
Fix %player% placeholder issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Refrac committed Jun 10, 2024
1 parent 3347af7 commit 568fe29
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion SimpleStaffChat-Bungee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>me.refracdevelopment</groupId>
<artifactId>SimpleStaffChat</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ public void onJoin(ServerConnectEvent event) {
return;

RyMessageUtils.broadcast(player, Permissions.STAFFCHAT_SEE, plugin.getConfig().JOIN_FORMAT
.replace("%player%", player.getName())
.replace("%server%", event.getTarget().getName()));

RyMessageUtils.sendConsole(true, plugin.getConfig().JOIN_FORMAT
.replace("%player%", player.getName())
.replace("%server%", event.getTarget().getName()));

DiscordImpl.sendJoin(JoinType.JOIN, player, event.getTarget().getName(), "");
Expand All @@ -61,10 +63,12 @@ public void onSwitch(ServerSwitchEvent event) {
return;

RyMessageUtils.broadcast(player, Permissions.STAFFCHAT_SEE, plugin.getConfig().SWITCH_FORMAT
.replace("%player%", player.getName())
.replace("%server%", player.getServer().getInfo().getName())
.replace("%from%", event.getFrom().getName()));

RyMessageUtils.sendConsole(true, plugin.getConfig().SWITCH_FORMAT
.replace("%player%", player.getName())
.replace("%server%", player.getServer().getInfo().getName())
.replace("%from%", event.getFrom().getName()));

Expand All @@ -81,10 +85,13 @@ public void onQuit(PlayerDisconnectEvent event) {
return;

RyMessageUtils.broadcast(player, Permissions.STAFFCHAT_SEE, plugin.getConfig().QUIT_FORMAT
.replace("%player%", player.getName())
.replace("%server%", player.getServer().getInfo().getName()));

RyMessageUtils.sendConsole(true, plugin.getConfig().QUIT_FORMAT
.replace("%player%", player.getName())
.replace("%server%", player.getServer().getInfo().getName()));

DiscordImpl.sendJoin(JoinType.LEAVE, player, player.getServer().getInfo().getName(), "");
}

Expand Down
2 changes: 1 addition & 1 deletion SimpleStaffChat-Spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>me.refracdevelopment</groupId>
<artifactId>SimpleStaffChat</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ public void onJoin(PlayerJoinEvent event) {
if (!player.hasPermission(Permissions.STAFFCHAT_JOIN))
return;

RyMessageUtils.sendStaffChat(player, Permissions.STAFFCHAT_SEE, this.plugin.getSettings().JOIN_FORMAT);
RyMessageUtils.sendStaffChat(player, Permissions.STAFFCHAT_SEE, this.plugin.getSettings().JOIN_FORMAT
.replace("%player%", player.getName())
);

RyMessageUtils.sendConsole(true, this.plugin.getSettings().JOIN_FORMAT
.replace("%player%", player.getName())
);

RyMessageUtils.sendConsole(true, this.plugin.getSettings().JOIN_FORMAT);
DiscordImpl.sendJoin(JoinType.JOIN, player);
}

Expand All @@ -52,9 +57,14 @@ public void onQuit(PlayerQuitEvent event) {
if (!player.hasPermission(Permissions.STAFFCHAT_QUIT))
return;

RyMessageUtils.sendStaffChat(player, Permissions.STAFFCHAT_SEE, this.plugin.getSettings().QUIT_FORMAT);
RyMessageUtils.sendStaffChat(player, Permissions.STAFFCHAT_SEE, this.plugin.getSettings().QUIT_FORMAT
.replace("%player%", player.getName())
);

RyMessageUtils.sendConsole(true, this.plugin.getSettings().QUIT_FORMAT
.replace("%player%", player.getName())
);

RyMessageUtils.sendConsole(true, this.plugin.getSettings().QUIT_FORMAT);
DiscordImpl.sendJoin(JoinType.LEAVE, player);
}

Expand Down
2 changes: 1 addition & 1 deletion SimpleStaffChat-Velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>me.refracdevelopment</groupId>
<artifactId>SimpleStaffChat</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.refracdevelopment</groupId>
<artifactId>SimpleStaffChat</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<packaging>pom</packaging>

<name>SimpleStaffChat</name>
Expand Down

0 comments on commit 568fe29

Please sign in to comment.