Added configurable command spy format.

This commit is contained in:
Aust1n46 2020-03-19 20:56:41 -04:00
parent 069d757c19
commit 0ed5b39a9b
3 changed files with 6 additions and 2 deletions

View File

@ -46,7 +46,10 @@ nicknames:
nickname-in-tablist: true
# {player} : player sending command
# {command} : command typed
commandspy:
format: '&6{player}: {command}'
worldeditcommands: true
antispam:

View File

@ -47,6 +47,7 @@ nicknames:
nickname-in-tablist: true
commandspy:
format: '&6{player}: {command}'
worldeditcommands: true
antispam:

View File

@ -56,11 +56,11 @@ public class CommandListener implements CommandExecutor, Listener {
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
if(p.hasCommandSpy()) {
if(wec) {
p.getPlayer().sendMessage(ChatColor.GOLD + mcp.getName() + ": " + event.getMessage());
p.getPlayer().sendMessage(Format.FormatStringAll(cs.getString("format").replace("{player}", mcp.getName()).replace("{command}", event.getMessage())));
}
else {
if(!(event.getMessage().toLowerCase().startsWith("//"))) {
p.getPlayer().sendMessage(ChatColor.GOLD + mcp.getName() + ": " + event.getMessage());
p.getPlayer().sendMessage(Format.FormatStringAll(cs.getString("format").replace("{player}", mcp.getName()).replace("{command}", event.getMessage())));
}
}
}