mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Added configurable command spy format.
This commit is contained in:
parent
069d757c19
commit
0ed5b39a9b
@ -46,7 +46,10 @@ nicknames:
|
|||||||
|
|
||||||
nickname-in-tablist: true
|
nickname-in-tablist: true
|
||||||
|
|
||||||
|
# {player} : player sending command
|
||||||
|
# {command} : command typed
|
||||||
commandspy:
|
commandspy:
|
||||||
|
format: '&6{player}: {command}'
|
||||||
worldeditcommands: true
|
worldeditcommands: true
|
||||||
|
|
||||||
antispam:
|
antispam:
|
||||||
|
@ -47,6 +47,7 @@ nicknames:
|
|||||||
nickname-in-tablist: true
|
nickname-in-tablist: true
|
||||||
|
|
||||||
commandspy:
|
commandspy:
|
||||||
|
format: '&6{player}: {command}'
|
||||||
worldeditcommands: true
|
worldeditcommands: true
|
||||||
|
|
||||||
antispam:
|
antispam:
|
||||||
|
@ -56,11 +56,11 @@ public class CommandListener implements CommandExecutor, Listener {
|
|||||||
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
||||||
if(p.hasCommandSpy()) {
|
if(p.hasCommandSpy()) {
|
||||||
if(wec) {
|
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 {
|
else {
|
||||||
if(!(event.getMessage().toLowerCase().startsWith("//"))) {
|
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())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user